-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: add '--uses' ie: cargo modules structure --no-fns --no-traits --no-types --uses #265
Comments
Ho Cameron, do you have a sort of sketch of how you would envision such |
This is something I want as well. My use case is when I start to read an existing codebase and want to identify the "leaves" of dependency forest. "owns" relationship is already reflected by the directory structure of the code. But, I don't think such an output can be a tree form like A more elaborate presentation would be a layered graph. The leaf nodes are on the top layer. Then, nodes that are directly dependent on them are on the next layer. And so forth. Towards the bottom, modules are increasingly more dependent on other modules. That will be similar to the "tech tree" presentation on video games. We may need to deal with cycles by breaking cycles favoring certain edges or by treating cycles as groups (aka Tarjan's strongly-connected component). |
While --uses might not seems as logical under the
structure
sub-command as thedependencies
, I think it could be useful for some people.On the project I am working on,
dependencies
even with--focus-on
produces graphs that are far too busy to be usable. (I have tried many of the--layout
options)So, I think being able to see the
uses
in thestructure
view would be quiet useful.Thank you for making
cargo-modules
, it is really great!The text was updated successfully, but these errors were encountered: