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

Add --no-owns CLI flag for dependencies command #348

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Add --no-owns CLI flag for dependencies command #348

merged 4 commits into from
Dec 10, 2024

Conversation

regexident
Copy link
Owner

@regexident regexident commented Nov 24, 2024

This option filters out structural edges, as well as any nodes with a degree of 0 (i.e. disconnected nodes).

Fixes #274


Without --no-owns

cargo run --release -- dependencies --manifest-path "tests/projects/smoke"  > ./graph-without-owns.dot

smoke-with-owns-edges

With --no-owns

cargo run --release -- dependencies --manifest-path "tests/projects/smoke" -
-no-owns > ./graph-without-owns.dot

smoke-without-owns-edges

@wduminy
Copy link
Contributor

wduminy commented Nov 30, 2024

I think this feature works well. I attached the two images below.

Notice some blocks does not show in the second image which helps to create the view I wanted.
Thanks!

Args to produce image:

cargo-modules dependencies -p rc-bot --no-externs --no-owns --no-types --no-traits --no-fns | dot -Tsvg -ono-owns.svg

With owns:
image

Without owns
image

@regexident
Copy link
Owner Author

I think this feature works well.

Cool! I guess I'll leave this open until next week's release (Tuesday/Wednesday-ish) then and merge it if no major concerns with the implementations have come up by then.

@regexident regexident merged commit 8ce8b72 into main Dec 10, 2024
7 checks passed
@regexident regexident deleted the no-owns branch December 10, 2024 09:50
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 this pull request may close these issues.

Feature request: dependencies --no-owns
2 participants