-
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 #2595 by skipping reflexive replacements #2879
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Could you explain a bit at a high level what happened here? I'm trying to decipher this from the commit itself but "Replace bug" isn't very helpful nor is the PR description... |
@alexcrichton Oh sorry! I thought I already edited it to take the top line of the last commit not the branch name. |
Ok so before this, if a dependency matches the replacement, it will be replaced with itself (at least according to the lockfile). Replaced packages don't have their dependencies listed, so while the reflexive replacement itself works, Cargo assume the package has zero deps. In the example, local replaces |
Ok, thanks! That sounds like it'd definitely do the trick. |
NP! Again sorry about the awful PR title. |
* {}\n * {}\n\nboth specifications match: {}", | ||
matched_spec.unwrap(), spec, summary.package_id()); | ||
} | ||
// get around lack of non-lexical lifetimes |
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.
It's ok to remove comments like this
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.
Should I force--push? (I wrote that, as opposed to just moved it around, to be clear.)
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.
If it bounces sure but otherwise it's fine
Looks good to me, thanks @Ericson2314! |
Fix #2595 by skipping reflexive replacements If you know of something better than `source_id == source_id`, I'd gladly change it.
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
If you know of something better than
source_id == source_id
, I'd gladly change it.