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

Optional dependency that is not enabled still considered as part of the license checks #216

Closed
sdroege opened this issue Jun 22, 2020 · 2 comments · Fixed by #219
Closed
Labels
bug Something isn't working

Comments

@sdroege
Copy link

sdroege commented Jun 22, 2020

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/tree/master/gstreamer
  2. Check the Cargo.toml and notice the gstreamer-rs-lgpl-docs crate as an optional dependency hidden behind a feature flag
  3. Try running cargo deny check in the whole cargo workspace after removing the licenses.exceptions from deny.toml
  4. Notice that cargo deny complains about there being a copyleft license involved, and that LGPL-2.0 is not a allowed license

Expected behavior

No problematic license would be found as the feature flag is not enabled by anything in the repository.

@sdroege sdroege added the bug Something isn't working label Jun 22, 2020
@Jake-Shadle
Copy link
Member

Jake-Shadle commented Jun 25, 2020

This is because we gather metadata with --all-features enabled, I will add support for the normal cargo feature-related options so that you can specify which ones you want enabled when checking, as long as you specify a specific crate's manifest path and not a workspace.

@sdroege
Copy link
Author

sdroege commented Jun 25, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants