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

tree-sitter cargoHash has changed #599

Closed
nifoc opened this issue Jul 30, 2024 · 7 comments · Fixed by #600
Closed

tree-sitter cargoHash has changed #599

nifoc opened this issue Jul 30, 2024 · 7 comments · Fixed by #600

Comments

@nifoc
Copy link

nifoc commented Jul 30, 2024

I'm not sure how/why this is happening, especially since the version/tarball hasn't been updated, but the cragoHash of tree-sitter has apparently changed:

Old: cargoHash = "sha256-U2YXpNwtaSSEftswI0p0+npDJqOq5GqxEUlOPRlJGmQ=";
New: cargoHash = "sha256-44FIO0kPso6NxjLwmggsheILba3r9GEhDld2ddt601g=";

Getting the following error on macOS (arm) and Linux (amd64 and arm64):

error: hash mismatch in fixed-output derivation '/nix/store/nz112bna1008b22daafrqmyjn54ag9k1-tree-sitter-0.22.6-vendor.tar.gz.drv':
         specified: sha256-U2YXpNwtaSSEftswI0p0+npDJqOq5GqxEUlOPRlJGmQ=
            got:    sha256-44FIO0kPso6NxjLwmggsheILba3r9GEhDld2ddt601g=
@GaetanLepage
Copy link
Member

GaetanLepage commented Jul 30, 2024

Are you overwriding the neovim input of our flake ?
With the current source that we use, the hash is the correct one. I cannot reproduce this failure...

@nifoc
Copy link
Author

nifoc commented Jul 30, 2024

No, I'm not overriding the neovim input.

I am overriding the other inputs, but I tried removing all of those and am still getting this error.

I'm using nixos-unstable-small and I started seeing the error 2 days ago. Maybe it hasn't hit nixpkgs-unstable yet.

@nifoc
Copy link
Author

nifoc commented Jul 30, 2024

Sorry for the noise, but I am able to reproduce this by doing the following:

$ git clone https://github.com/nix-community/neovim-nightly-overlay
$ cd neovim-nightly-overlay
# change nixpkgs flake input to nixos-unstable-small and update the flake
$ nix build ".#neovim"
...
error: hash mismatch in fixed-output derivation '/nix/store/mrn2lgvk25dq4k3cjb38vxw1cndf5d7c-tree-sitter-0.22.6-vendor.tar.gz.drv':
         specified: sha256-U2YXpNwtaSSEftswI0p0+npDJqOq5GqxEUlOPRlJGmQ=
            got:    sha256-44FIO0kPso6NxjLwmggsheILba3r9GEhDld2ddt601g=
error: 1 dependencies of derivation '/nix/store/yaq0siaxq467nflp68g1fipldphd8wr3-tree-sitter-0.22.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l4hcnwh4r2i469x9zw7pxi1fl4kza7if-neovim-unwrapped-nightly.drv' failed to build

@Parsifa1
Copy link

To me, this problem only seems to occur when using overlay

@willruggiano
Copy link
Contributor

willruggiano commented Jul 30, 2024

I don't know if it is the best approach but this seems to resolve this specific issue, which is that it seems the derivation version is used to compute the cargoHash.

You both are effectively doing the same thing which is overriding this flake's package set (@nifoc via overriding inputs.nixpkgs, @Parsifa1 via using the overlay) and, notably, doing so "at your own risk". You should not be surprised to see these sort of errors with this setup; this is the root of many issues documented in #533.

@nifoc
Copy link
Author

nifoc commented Jul 30, 2024

Thank you @willruggiano!

I'm aware that what I'm doing isn't strictly supported and again, I'm very sorry for the noise.
But am I correct in assuming that this would've been an issue with nixpkgs-unstable too (once it updates again)?

@willruggiano
Copy link
Contributor

Thank you @willruggiano!

I'm aware that what I'm doing isn't strictly supported and again, I'm very sorry for the noise.

But am I correct in assuming that this would've been an issue with nixpkgs-unstable too (once it updates again)?

No worries! This is nightly software so I'm not scolding you 😆 just cautioning about of the problems that might arise.

Yes, this would be a problem with any package set whose treesitter wasn't v0.22.5 (or whatever it was).

Now this specific case shouldn't be a problem. But there may be dragons yet... hence my cautious advice :)

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 a pull request may close this issue.

4 participants