-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use to Cargo's experimental lockfile format #63579
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
cc @ehuss |
Do you have any ideas on how to measure this? I'm concerned most people, when they hit a conflict or build error, will just silently fix it and we won't know about it. Like when there are spurious test errors, and people just |
This looks good from an implementation standpoint to me. Cc @Centril for roll-up awareness. I personally am not too worried about gathering statistics, if necessary I think we can get at least some data from bors merge conflict comments when they're in the expanded from (usually but not always the case? I feel like I've seen both recently). It's also something that'll just naturally pervolate, historically I think I've hit a Cargo.lock conflict quite a few times and presumably that'll go down with this change. |
Hopefully it will almost never happen. I did tests with historical conflicts and I was only able to cause problems simulating when two PRs try to update the same dependencies, which should be extremely rare. The concern is when it doesn't cause a conflict, but then either the build fails or Is anything archiving azure logs (particularly for PR builds)? The retention isn't clear. |
👋 |
It's true yeah that I don't really know how we can rigorously and quantitatively measure the impact of this change. I was personally hoping moreso for a "gut feeling" from developers and folks who frob Cargo.lock a lot. (for example rollup managers, @ehuss for updating Cargo, etc) |
I personally think that's the way to go and we can probably go ahead and merge (r=me). |
@bors: r=Mark-Simulacrum |
📌 Commit e4a12206e801bf60f370f367478b03986062b6fe has been approved by |
@bors p=3 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #63640) made this pull request unmergeable. Please resolve the merge conflicts. |
e4a1220
to
4cadf87
Compare
@bors: r=Mark-Simulacrum |
📌 Commit 4cadf879ab221ea78d25501c65b6c1742fb6e794 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
This commit changes the lock file format of this repository to an experimental format that isn't rolled out by default in Cargo but is intended to eventually become the default. The new format moves information around and compresses the lock file a bit. The intention of the new format is to reduce the amount of git merge conflicts that happen in a repository, with rust-lang/rust being a prime candidate for testing this. The new format wille ventually become the default but for now it is off-by-default in Cargo, but Cargo will preserve the format if it sees it. Since we always build with a beta version of Cargo for the rust-lang/rust repository it should be safe to go ahead and change the lock file format here and everyone building this repository will automatically pick it up. It's intended that we'll evaluate this lock file format in the rust-lang/rust repository to see if it reduces the number of perceived merge conflicts for changes that touch the lock file. This will in turn help inform the development of the feature in Cargo and whether we choose to stabilize this and turn it on by default. Note that this commit does not actually change the contents of the lock file in terms of a resolution graph, it simply reencodes the lock file with a new format.
Use to Cargo's experimental lockfile format This commit changes the lock file format of this repository to an experimental format that isn't rolled out by default in Cargo but is intended to eventually become the default. The new format moves information around and compresses the lock file a bit. The intention of the new format is to reduce the amount of git merge conflicts that happen in a repository, with rust-lang/rust being a prime candidate for testing this. The new format wille ventually become the default but for now it is off-by-default in Cargo, but Cargo will preserve the format if it sees it. Since we always build with a beta version of Cargo for the rust-lang/rust repository it should be safe to go ahead and change the lock file format here and everyone building this repository will automatically pick it up. It's intended that we'll evaluate this lock file format in the rust-lang/rust repository to see if it reduces the number of perceived merge conflicts for changes that touch the lock file. This will in turn help inform the development of the feature in Cargo and whether we choose to stabilize this and turn it on by default. Note that this commit does not actually change the contents of the lock file in terms of a resolution graph, it simply reencodes the lock file with a new format.
☀️ Test successful - checks-azure |
This commit backs out rust-lang#46539 in order to fully leverage rust-lang#63579 where `git` should be able to merge `Cargo.lock` nowadays with only minimal conflicts.
…rk-Simulacrum Allow git to merge `Cargo.lock` This commit backs out rust-lang#46539 in order to fully leverage rust-lang#63579 where `git` should be able to merge `Cargo.lock` nowadays with only minimal conflicts.
Looks like since this PR, stable cargo cannot parse our |
Tools like |
The cargo on crates.io tracks stable. So, such tools can only do the update once there is a stable cargo that has that feature. Which, for the new lockfile format, there isn't. |
The way the Cargo.lock file is encoded on stable Rust is quite unfriendly to Git when multiple pull requests change that file at the same time, how version numbers are everywhere and all checksums are in the same place often produces merge conflicts for nothing. This patch brings the new Cargo.lock format to Servo. rust-lang/rust#63579 The main caveat is that for now, cargo-tree and similar tools won't work anymore. I checked that the duplicate crate tidy check still does its job though.
The way the Cargo.lock file is encoded on stable Rust is quite unfriendly to Git when multiple pull requests change that file at the same time, how version numbers are everywhere and all checksums are in the same place often produces merge conflicts for nothing. This patch brings the new Cargo.lock format to Servo. rust-lang/rust#63579 The main caveat is that for now, cargo-tree and similar tools won't work anymore. I checked that the duplicate crate tidy check still does its job though.
The way the Cargo.lock file is encoded on stable Rust is quite unfriendly to Git when multiple pull requests change that file at the same time, how version numbers are everywhere and all checksums are in the same place often produces merge conflicts for nothing. This patch brings the new Cargo.lock format to Servo. rust-lang/rust#63579 The main caveat is that for now, cargo-tree and similar tools won't work anymore. I checked that the duplicate crate tidy check still does its job though.
I made a very small tool to go back to the previous format, just in case. |
Switch to the new Cargo.lock format The way the Cargo.lock file is encoded on stable Rust is quite unfriendly to Git when multiple pull requests change that file at the same time, how version numbers are everywhere and all checksums are in the same place often produces merge conflicts for nothing. This patch brings the new Cargo.lock format to Servo. rust-lang/rust#63579 The main caveat is that for now, cargo-tree and similar tools won't work anymore. I checked that the duplicate crate tidy check still does its job though. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24334) <!-- Reviewable:end -->
Switch to the new Cargo.lock format The way the Cargo.lock file is encoded on stable Rust is quite unfriendly to Git when multiple pull requests change that file at the same time, how version numbers are everywhere and all checksums are in the same place often produces merge conflicts for nothing. This patch brings the new Cargo.lock format to Servo. rust-lang/rust#63579 The main caveat is that for now, cargo-tree and similar tools won't work anymore. I checked that the duplicate crate tidy check still does its job though. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24334) <!-- Reviewable:end -->
This commit changes the lock file format of this repository to an
experimental format that isn't rolled out by default in Cargo but is
intended to eventually become the default. The new format moves
information around and compresses the lock file a bit. The intention of
the new format is to reduce the amount of git merge conflicts that
happen in a repository, with rust-lang/rust being a prime candidate for
testing this.
The new format wille ventually become the default but for now it is
off-by-default in Cargo, but Cargo will preserve the format if it sees
it. Since we always build with a beta version of Cargo for the
rust-lang/rust repository it should be safe to go ahead and change the
lock file format here and everyone building this repository will
automatically pick it up.
It's intended that we'll evaluate this lock file format in the
rust-lang/rust repository to see if it reduces the number of perceived
merge conflicts for changes that touch the lock file. This will in turn
help inform the development of the feature in Cargo and whether we
choose to stabilize this and turn it on by default.
Note that this commit does not actually change the contents of the lock
file in terms of a resolution graph, it simply reencodes the lock file
with a new format.