-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix dep/feat syntax with hidden implicit optional dependencies #12130
Conversation
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the tests this seems fine but I don't feel the resolver changes are clear enough without digging a lot more into the implementation for me to feel comfortable merging this. The change causes us to skip some parts but its not obvious from this that this allows the rest to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is good. r=weihanglo
when you're ready.
Co-authored-by: Weihang Lo <[email protected]>
@bors r=weihanglo |
☀️ Test successful - checks-actions |
Update cargo 8 commits in 13413c64ff88dd6c2824e9eb9374fc5f10895d28..09276c703a473ab33daaeb94917232e80eefd628 2023-05-10 13:46:18 +0000 to 2023-05-16 21:43:35 +0000 - docs: Clarify that crates.io doesn't link to docs.rs right away. (rust-lang/cargo#12146) - docs(ref): Clarify MSRV is generally minor (rust-lang/cargo#12122) - Fix `check_for_file_and_add`'s check for conflict file (rust-lang/cargo#12135) - Fixes: Incorrect document link (rust-lang/cargo#12143) - doc: intra-doc links and doc comments for build script (rust-lang/cargo#12133) - Add Cargo team charter. (rust-lang/cargo#12010) - Remove useless drop of copy type (rust-lang/cargo#12136) - Fix dep/feat syntax with hidden implicit optional dependencies (rust-lang/cargo#12130) r? ghost
…is set The syntax used was equivalent to "dep:xenstore-rs/static", and a bug in Rust 1.70 (fixed by rust-lang/cargo#12130 in 1.71) was triggered.
Our dependency `env_logger` suffers from a bug in versions of Cargo older than 1.71, fixed by rust-lang/cargo#12130 (the one we suffered from before the "Cargo: don't let feature "static" pull xenstore-rs unless "xenstore" is set" fix). Note that some of our dependencies already required 1.70 or later. Signed-off-by: Yann Dirson <[email protected]>
This fixes an issue with
dep/feat
syntax in the[features]
table where it wouldn't work if the optional dependency had its implicit feature removed via thedep:
syntax.The problem is that both resolvers were expecting that
dep/feat
would be able to activate a feature named "dep". But if that implicit feature wasn't created, then it would fail with an error.This was just an oversight (which probably happened in #9574).
Fixes #10788