Skip to content
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

Restore crates.io's SourceId hash value to before #9397

Merged
merged 2 commits into from
Apr 23, 2021

Commits on Apr 23, 2021

  1. 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.
    alexcrichton committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    4567826 View commit details
    Browse the repository at this point in the history
  2. Clarify some versions

    alexcrichton committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    d99c35c View commit details
    Browse the repository at this point in the history