-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 optional deps in multiple sections #5480
Conversation
r? @matklad (rust_highfive 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.
r=me with typos(?) fixed
src/cargo/core/resolver/context.rs
Outdated
if !reqs.deps.is_empty() { | ||
let unknown = reqs.deps.keys().map(|s| &s[..]).collect::<Vec<&str>>(); | ||
let features = unknown.join(", "); | ||
// Any entries in `reqs.dep` which wrent' used are bugs in that the |
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.
s/wrent'/weren't/
tests/testsuite/build_script.rs
Outdated
); | ||
let p = p.build(); | ||
|
||
// assert_that(p.cargo("run"), execs().with_status(0).with_stdout("0\n")); |
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.
Why is this commented out? We probably should uncomment or delete it?
@bors: r=matklad Indeed, typos! |
📌 Commit 5f0bf04 has been approved by |
⌛ Testing commit 5f0bf0472af01ae891e55d53bc3d844d55d45962 with merge 4993ff1dcaacfb722acdcd0135858a4ccbf9bf6f... |
💔 Test failed - status-travis |
This commit fixes an issue where an optional dependency was listed multiple times in a manifest (multiple sections). This regression was introduced by rust-lang#5415 and happened because in the resolver we didn't record a `Dependency` as it was accidentally deduplicated too soon. The fix here was to ensure that all `Dependency` annotations make their way into `Resolve` now that we rely on the listed `Dependency` values for correctness. Closes rust-lang#5475
@bors: r=matklad |
📌 Commit 2f88a70 has been approved by |
Fix optional deps in multiple sections This commit fixes an issue where an optional dependency was listed multiple times in a manifest (multiple sections). This regression was introduced by #5415 and happened because in the resolver we didn't record a `Dependency` as it was accidentally deduplicated too soon. The fix here was to ensure that all `Dependency` annotations make their way into `Resolve` now that we rely on the listed `Dependency` values for correctness. Closes #5475
☀️ Test successful - status-appveyor, status-travis |
FIx false positive warning We warn if a feature was specified corresponding to a dependency which is not optional. However, a dependency can be both optional and required, and we shouldn't warn in that case. cc #5480 r? @alexcrichton
This commit fixes an issue where an optional dependency was listed multiple
times in a manifest (multiple sections). This regression was introduced by #5415
and happened because in the resolver we didn't record a
Dependency
as it wasaccidentally deduplicated too soon.
The fix here was to ensure that all
Dependency
annotations make their way intoResolve
now that we rely on the listedDependency
values for correctness.Closes #5475