jplatte / cargo-depgraph

Creates graphviz dependency graphs for Rust projects that use Cargo
GNU General Public License v3.0
151 stars 8 forks source link

Add a `--workspace-only` option. #12

Closed nathan-at-least closed 1 year ago

nathan-at-least commented 1 year ago

This change adds a --workspace-only option that prunes the graph to only crates within a workspace. I didn't add any unit tests and only verified manually it works on one of my projects. I'm also uncertain about interaction with other cli switches like --focus or --exclude.

jplatte commented 1 year ago

Hi, thanks for the PR! I think this option makes a lot of sense, but I don't like that it first builds the whole graph with non-workspace dependencies and then removes them again. That is, it should really work more like --exclude rather than like --hide. I will update the implementation.

jplatte commented 1 year ago

There doesn't have to be any interaction with --focus, but I just tested the interaction with --exclude and it works fine :)