-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bug: resolving features fails when the same package is included multiple times with different versions #69
Bug: resolving features fails when the same package is included multiple times with different versions #69
Comments
Thank you for the repro, will look into this later. |
Thanks for the rapid turnaround! The fix has fixed the issue present in the minimal reproduction but when I got back to my original project it still doesn't work. I've made a new similar minimal reproduction but now the issue is only triggered when there are an odd number of crates:
With this config I get:
As soon as I have an even number of dependencies it works (I've tested this with random crates up to N=11):
I eventually discovered the issue in krates and I'm about to make a PR to fix it. |
Describe the bug
When a project depends on multiple versions of the same crate where the different versions support different features (see minimal reproduction) I get:
I've tested 3 versions, and it appears it was introduced in 0.14.4:
cargo deny check advisories
works ✔️cargo deny check advisories
fails withinternal error: entered unreachable code: unable to locate sensitive-headers for crate tower-http 0.4.4
❌cargo deny check advisories
fails with the same error ❌To reproduce
Create a new cargo project
cargo new example
, then populate theCargo.toml
with:While trying to get a minimal reproducible example I noticed that renaming the 0.5.0 version of the package away from "tower-http" meant that the bug didn't appear, for example the following
Cargo.toml
works fine:cargo-deny version
0.14.4,0.14.5
What OS were you running cargo-deny on?
Linux
Additional context
No response
The text was updated successfully, but these errors were encountered: