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

cargo deny list doesn't seem to honor the targets config #117

Closed
luser opened this issue Jan 24, 2020 · 2 comments · Fixed by #118
Closed

cargo deny list doesn't seem to honor the targets config #117

luser opened this issue Jan 24, 2020 · 2 comments · Fixed by #118
Labels
bug Something isn't working

Comments

@luser
Copy link
Contributor

luser commented Jan 24, 2020

I added a targets section to our deny.toml, and then ran cargo deny list to get a list of licenses in use and populated the licenses.allow section with all of the listed licenses. When I then ran cargo deny check licenses it produced warnings telling me that some of the licenses in the allow list were not in use.

Here's some snippets of output from running the commands locally:

$ cargo deny list
<...>
Apache-2.0 WITH LLVM-exception (1): wasi@0.7.0
<...>
$ cargo deny check licenses
warning: license was not encountered

    ┌── <...>/deny.toml:26:5 ───
    │
 26 │     "Apache-2.0 WITH LLVM-exception",
    │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no crate used this license

Expected behavior
Crates that are not built using the set of listed targets should not show up in cargo deny list output.

@luser luser added the bug Something isn't working label Jan 24, 2020
@Jake-Shadle
Copy link
Member

Yes, right now the configuration is only taken into account for the check subcommand. I think if you pass the -t, --target option list will respect that. Should include the targets config in the list though, thanks!

@luser
Copy link
Contributor Author

luser commented Jan 24, 2020

For the record: yes, explicitly listing --target=... for each target in our targets list does produce the expected output.

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