EmbarkStudios / krates

📦 Creates graphs of crates from cargo metadata 🦀
Apache License 2.0
58 stars 18 forks source link

Dev only features aren't pruned #60

Closed Tastaturtaste closed 10 months ago

Tastaturtaste commented 10 months ago

Describe the bug

A comment in another issue describing the differing behaviour with context

In the PR linked above, I use cargo tree -i intel-mkl-src --all-features -e "no-dev,features" to see if there is a non-dev-dependency on intel-mkl-src, which has a license I don't want to introduce.

  1. Using resolver = "1" in the workspace intel-mkl-src is present due to feature unification with a dev-dependency
  2. Using resolver = "2" in the workspace it is not present anymore (which is what I want)

However cargo deny --log-level error --all-features --exclude-dev check licenses still complains about intel-mkl-src regardless of the used resolver. I would expect cargo-deny to use the same resolver cargo itself uses.

To reproduce

  1. Clone this
  2. Add resolver = "2" in the workspace Cargo.toml
  3. Run cargo tree -i intel-mkl-src --all-features -e "no-dev,features"
  4. Run cargo deny --log-level error --all-features --exclude-dev check licenses
  5. Observe the difference in resolved dependencies

cargo-deny version

cargo-deny 0.14.3

What OS were you running cargo-deny on?

Windows

Additional context

If you need any more context or information please let me know.

Tastaturtaste commented 10 months ago

Thanks for the quick fix for this issue. I confirmed it works with cargo install cargo-deny (without --locked). Can you tell me what the expected time frame is until this change is reflected in the cargo-deny-action?