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

Separate direct and indirect dependencies #49

Closed
jayvdb opened this issue Jan 9, 2023 · 1 comment
Closed

Separate direct and indirect dependencies #49

jayvdb opened this issue Jan 9, 2023 · 1 comment

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Jan 9, 2023

Currently DEPENDENCIES_STR can have lots of dups in it, like

... windows-sys 0.32.0, windows-sys 0.36.1, windows-sys 0.42.0, windows_aarch64_gnullvm 0.42.0, windows_aarch64_msvc 0.32.0, windows_aarch64_msvc 0.36.1, windows_aarch64_msvc 0.42.0, windows_i686_gnu 0.32.0, windows_i686_gnu 0.36.1, windows_i686_gnu 0.42.0, windows_i686_msvc 0.32.0, windows_i686_msvc 0.36.1, windows_i686_msvc 0.42.0, windows_x86_64_gnu 0.32.0, windows_x86_64_gnu 0.36.1, windows_x86_64_gnu 0.42.0, windows_x86_64_gnullvm 0.42.0, windows_x86_64_msvc 0.32.0, windows_x86_64_msvc 0.36.1, windows_x86_64_msvc 0.42.0, winreg 0.10.1

c.f. https://stackoverflow.com/questions/51714866/is-it-documented-that-cargo-can-download-and-bundle-multiple-versions-of-the-sam for some context.

As DEPENDENCIES_STR and DEPENDENCIES already have both direct and indirect dependencies, IMO a new function should be used to make those only include direct or indirect dependencies. e.g. opts.set_direct_dependencies(true) and opts.set_indirect_dependencies(true). Or have an enum for DIRECT_ONLY, INCLUDE_INDIRECT (as I don't believe anyone is interested in "indirect only") and then something like opts.set_dependency_filter(DIRECT_ONLY).

@jayvdb
Copy link
Contributor Author

jayvdb commented Jan 9, 2023

Worth copying a mention from #5 , https://github.com/rust-secure-code/cargo-auditable provides a better way of storing the dependency tree.

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

No branches or pull requests

1 participant