Skip to content
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

Allow generating tree/graph for a union of subgraphs of the project #141

Closed
giannissc opened this issue Oct 27, 2022 · 3 comments · Fixed by #143
Closed

Allow generating tree/graph for a union of subgraphs of the project #141

giannissc opened this issue Oct 27, 2022 · 3 comments · Fixed by #143

Comments

@giannissc
Copy link

Currently focus-on can be used to generate a tree/graph for a single file using cargo modules --focus-on "crate::module". I would like the option to specify multiple module to generate the tree for cargo modules --focus-on "crate{module1, module2, module3}"

Is there some way to to this already or would this have to be a new feature?

@regexident
Copy link
Owner

regexident commented Oct 30, 2022

That would probably not work for generate tree since it would generate disconnected sub-graphs which by definition are not a tree any more. Unless one was to search for the corresponding root nodes of each disconnected sub-graph/-tree and print out multiple trees. But then again that isn't too bad actually and being able to focus on more than one path seems useful, indeed. 🤔

It would require a couple of internal logic changes, as well as a change from --focus-on accepting a single Path (e.g. foo:bar) to a UseTree (e.g. foo::bar::{self, baz}).

@regexident regexident changed the title Allow generating tree/graph for a subset of the project Allow generating tree/graph for a union of subgraphs of the project Oct 30, 2022
@regexident
Copy link
Owner

@giannissc you might want to give v0.7.0 a test run, which added support for accepting a full use-tree (e.g. foo:bar::{self, baz, blee::*}) for --focus-on, instead of just simple paths. 😉

@giannissc
Copy link
Author

Will give it a shot! Thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants