forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore crates.io's
SourceId
hash value to before
This commit restores the hash value of the crates.io `SourceId` to what it was before rust-lang#9384. In rust-lang#9384 the enum variants of `SourceKind` were reordered which accidentally changed the hash value of the `SourceId` for crates.io. A change here means that users with a new version of Cargo will have to redownload the index and all crates, which is something that we strive to avoid forcing. In changing this, though, it required a manual implementation of `Ord` to still contain the actual fix from rust-lang#9384 which is to sort `SourceKind` differently from how it's defined. I was curious as to why this was necessary since it wasn't ever necessary in the past and this led to an odd spelunking which turned up some interesting information. Turns out Rust 1.47 and after had a breaking change where Cargo would sort dependencies differently. This means that rust-lang#9334 *could* have been opened up much earlier, but it never was. We ironically only saw an issue when we fixed this regression (although we didn't realize we were fixing a regression). This means that we are now permanently codifying the regression in Cargo.
- Loading branch information
1 parent
4bcbf87
commit 4567826
Showing
1 changed file
with
101 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters