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

chore: update to rust 1.80 #2344

Merged
merged 4 commits into from
Aug 7, 2024
Merged

chore: update to rust 1.80 #2344

merged 4 commits into from
Aug 7, 2024

Conversation

ellie
Copy link
Member

@ellie ellie commented Aug 5, 2024

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@ellie
Copy link
Member Author

ellie commented Aug 5, 2024

I ran nix flake update, but it looks like things are more broken than an outdated lockfile 😞

Do either of you know what's up? cc @arcuru @Sciencentistguy

Here's the error:

<super super long stack trace that's impossible to read>

… while evaluating the argument passed to builtins.fromTOML

       … while calling the 'readFile' builtin
         at /nix/store/f5ykynf933aab7nd1arqz6dm79hdh91q-source/lib/trivial.nix:722:24:
          721|   importTOML = path:
          722|     builtins.fromTOML (builtins.readFile path);
             |                        ^
          723|

       … while realising the context of path '/nix/store/99hlq6kn4ww9y617wc093pnng24kbidc-channel-rust-1.80.toml'

       error: hash mismatch in fixed-output derivation '/nix/store/iv1pn1rf4c487gz0vv2yxwgmila27dbm-channel-rust-1.80.toml.drv':
         specified: sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=
            got:    sha256-6eN/GKzjVSjEhGO9FhWObkRFaE1Jf+uqMSdQnb8lcB4=

@arcuru
Copy link
Contributor

arcuru commented Aug 7, 2024

It's just a hash mismatch, it looks like he never explained how to update.

The method that you're using for the Rust toolchain requires pinning the hash of the toolchain file in flake.nix. So you need to manually update that as well every time you update the Rust Toolchain.

error: hash mismatch in fixed-output derivation '/nix/store/iv1pn1rf4c487gz0vv2yxwgmila27dbm-channel-rust-1.80.toml.drv':
         specified: sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=
            got:    sha256-6eN/GKzjVSjEhGO9FhWObkRFaE1Jf+uqMSdQnb8lcB4=

Just change the line in the flake.nix file from "sha256-Ngiz..." to the new "sha256-6eN..." and it should work fine. I tested locally.

@ellie
Copy link
Member Author

ellie commented Aug 7, 2024

Thanks you!

That's weird 🤔 It doesn't update when I run nix flake update?

Ahhh I see. I misunderstood and thought this was originating from the lockfile! Thanks 🙏

@Sciencentistguy
Copy link
Contributor

Yeah the fenix library requires you to specify the hash of your toolchain file. In theory this isn't needed, as it is a local file and versioned by git, but the library does not have the ability to detect this. (the hash is needed for non-local files to ensure reproducability)

In general with Nix issues if there's a hash mismatch the solution is to update the mismatched hash with the new one, fwiw.

@ellie
Copy link
Member Author

ellie commented Aug 7, 2024

Thank you both! I managed this with the last update too 🤦‍♀️

sorry for the needless ping!

@ellie ellie merged commit b764ee3 into main Aug 7, 2024
19 checks passed
@ellie ellie deleted the ellie/rust-1.80 branch August 7, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants