-
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
Git merge can produce inconsistent Cargo.lock files #2302
Comments
Note that once in that situation, even |
Thanks so much for the detailed writeup @SimonSapin! (especially the script to reproduce) This should indeed be relatively easy enough to detect and provide a nicer error message. |
See also #1818 which, if resolved, might provide a resolution for this. |
Can someone test if this still happens after #5831 ? |
Seems to be fixed with #5831:
|
This is a reduction of what happened in servo/servo#9380.
Cargo.lock
.matches
version 0.1.1.A
, another crate gets a dependency onmatches
added. The version stays 0.1.1.B
,matches
is updated to 0.1.2Cargo.lock
now lists a"matches 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)"
dependency from branch A, but has no[[package]]
section for that version. (The one section formatches
was updated to 0.1.2. in branchB
.)Cargo.lock
is fixed up manually.Maybe Cargo could detect this kind of situation and repair it automatically?
This test script can be run in an empty directory:
Here is the output:
The text was updated successfully, but these errors were encountered: