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

Show information of all dependencies #4657

Closed
gnzlbg opened this issue Oct 24, 2017 · 3 comments
Closed

Show information of all dependencies #4657

gnzlbg opened this issue Oct 24, 2017 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Oct 24, 2017

It would be nice to have an option to recursively query information of all dependent crates.

Imagine I want to ship a binary, and would like to include the license / copyright of all crates that the binary uses. Ideally, I should be able to just do cargo info --license --all and that should output it to the screen.

Another user would be crates.io itself. Lot's of crates say they have the Apache license, but then rely on dependencies with licenses that I bet nobody has checked, or that might change between releases.

I would like crates.io to tell me that a package has the Apache license, and that all its dependencies have so as well, so that I know that by using it I wouldn't be pulling in any crate with an incompatible license.

This would make it much easier to use Rust / cargo in companies that ship software.

@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Oct 25, 2017
@maghoff
Copy link

maghoff commented Nov 15, 2017

I've started on something to this effect. I tailor-made it to my present use-case, but it might be reusable or extendible beyond that. In case it is of interest: https://github.com/maghoff/cargo-license-hound

@lunixbochs
Copy link

lunixbochs commented Sep 16, 2020

I couldn't get cargo-license-hound to work on my mac, so I wrote this, which just uses cargo metadata and github to get the actual license text and print it, preferring MIT when dual licensed where possible just to limit the number of long licenses.

https://bochs.info/p/nhgj9h

@epage epage changed the title Show information of all dependent crates Show information of all dependencies Oct 17, 2023
@epage
Copy link
Contributor

epage commented Oct 17, 2023

We offer cargo metadata to get a certain form of dependency information. We lack the more particulars of platform/build-target/feature combinations but have issues on those.

cargo info is being tracked in #948. Doing all of the licensing work for you is unlikely to happen though.

Some existing tools that resolve the licensing workflows

As this issue seems to be focused on the querying of dependencies and that is offered, I'm going to go ahead and close this. If there is interest in resolving specific use cases (generating notices, license verification), I'd recommend creating dedicated issues.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

5 participants