-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: dependencies --no-owns #274
Comments
This seems related to #265. |
This would be quite useful in decipering the graph I get by running the tool on yer Edges running over nodes are also not helping the situation.
|
I am specifically looking for circular dependencies like this one between My mistake; undo does not |
Would any of you mind giving this PR's branch a try and report back on whether it addresses your needs? Edit: Oops, had the wrong link. 🫣 Fixed. |
No! But I'll give #348 a try later today. |
This is what #348 produces for the Without
|
Given that finding an optimal minimally-crossing graph layout (which deals with edge-crossings, but feels related in nature) is known to be NP-complete on arbitrary graphs this issue feels somewhat out-of-scope for the tool itself. 😅
If picking a different layout algorithm doesn't fix the edge-overlap issue, then setting digraph {
graph [
// ...
splines="curved"
]
// ...
} IIRC Another obvious caveat of this approach is that you have to manually make that change yourself, which may get in the way of one's workflow cycle. I've thought about exposing more graphviz settings (i.e. |
I appreciate this is a dot rendering issue. But I think it's totally possible to create such dependency ( |
@muhuk Try this to see if it resolves the overlap issue you mention above. cargo modules dependencies --no-externs --no-fns --no-traits --no-types --no-sysroot --no-owns | dot -Gsplines=curved -Tsvg > mods.svg |
@wduminy this is better, but the hierarchy in the architecture is still kind of hidden, because of the haphazard placement of nodes. This time I can clearly see, for example, there are no depenceny cycles with |
Sorting by the "hierarchy" of the architecture is difficult (at least without applying extensive network analysis to derive the most-likely hierarchy from the graph) since the graph isn't a DAG. I generally find the
The |
Yeah, that's unfortunately an inherent problem of network analysis and a lot of research has gone into visual graph navigation over the years, with no clear winners though, imho. The |
@regexident have you had the chance to look at the graph I shared here? Notice all the arrows go from left to right, lower-level modules (that mostly get incoming dependencies) are on the right, higher-level modules (that have more dependencies than incoming dependencies) are on the left.
But my use case is to figure out if there are circular dependencies. |
Thank for for creating this great utility.
A new option
--no-owns
on thedependencies
command would help me to create a cleaner usage graph.Looking at the graph below, applying the
--no-owns
option could create a view that shows only theuses
links.Perhaps also removing those nodes that do not participate in such a relation.
The text was updated successfully, but these errors were encountered: