EmbarkStudios / cargo-about

📜 Cargo plugin to generate list of all licenses for a crate 🦀
http://embark.rs
Apache License 2.0
545 stars 32 forks source link

Support ignoring private crates outside of the workspace #185

Closed danielnelson closed 2 years ago

danielnelson commented 2 years ago

Is your feature request related to a problem? Please describe. Setting private = { ignore = true } will ignore any crates in the current workspace that are set publish = false, but I also have some private crate dependencies that I include from other git repositories. When using these dependencies cargo-about will warn about the licenses for these crates.

Describe the solution you'd like Add an option to extend ignoring private crates outside of the workspace. Perhaps the toml choices could be:

private = { ignore = true }
private = { ignore = "all" }
private = { ignore = "workspace" }

Describe alternatives you've considered I think it might be possible to do with clarifications, if I added a clarification for each external dependency. It also might be possible to use a LicenseRef-xyz in these dependencies, but I really just rather not bother with all of this.

danielnelson commented 2 years ago

I don't need control over in-workspace vs out-of-workspace crates either, perhaps it would make sense to always ignore out of workspace private crates when ignore = true without any changes to the toml?

Jake-Shadle commented 2 years ago

I think that is fine, there is just a single check right now that determines if the private ignore is used, which is whether it is a workspace crate, I just didn't consider git/path dependencies would also be private since in most cases those are forks of public crates, but not always as your use case shows.