Skip to content

Tighten up docs on hash mismatch#1138

Open
kasbah wants to merge 2 commits intomainfrom
kb/docs-hash-mismatch
Open

Tighten up docs on hash mismatch#1138
kasbah wants to merge 2 commits intomainfrom
kb/docs-hash-mismatch

Conversation

@kasbah
Copy link
Copy Markdown
Member

@kasbah kasbah commented Mar 17, 2026

These are a bit too wordy for a situation where we normally "just want to get the check to pass". Also they talk about "instructions given below the error message" which don't seem to exist.

@kasbah kasbah added the documentation Improvements or additions to documentation label Mar 17, 2026
@kasbah kasbah marked this pull request as ready for review March 17, 2026 14:21
@kasbah kasbah requested a review from jmoggr March 17, 2026 14:22
@kasbah kasbah force-pushed the kb/docs-hash-mismatch branch from 8480aa7 to a950774 Compare March 17, 2026 14:23
Copy link
Copy Markdown
Collaborator

@jmoggr jmoggr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those instructions appear for hash mismatches that are not related to pnpm. pnpm.fetchDeps rolls their own hash checking, so it has a non-standard error message. I'll open a follow up PR with this clarification.

@kasbah
Copy link
Copy Markdown
Member Author

kasbah commented Mar 17, 2026

Wait, why do we set the pnpmDeps.hash to empty? I just ran it without doing that and it tells me the hash that I need to copy in.


$ nix build .#frontend
error: hash mismatch in fixed-output derivation '/nix/store/4wpp80j18vvm232ii1ajl2kqnbfgvzq2-frontend-pnpm-deps.drv':
         specified: sha256-vuBwhtNTTRbpgPZS+AQDybASYM9rwWYG8l0bscVQUso=
            got:    sha256-sxczRF8IsYqQzmAAv+IiFeWJygqHCVnSk8fEuy5d1JM=

@jmoggr
Copy link
Copy Markdown
Collaborator

jmoggr commented Mar 17, 2026

Yeah... we only need to do that for non pnpm.fetchDeps hashes, since pnpm.fetchDeps is special (with nicer behavior!). At the time I wrote the docs there were more "standard" hash mismatch issues and I muddled up the issues in the docs. The instructions will still get you the same results.

@jmoggr
Copy link
Copy Markdown
Collaborator

jmoggr commented Mar 17, 2026

I'm working on the fixes, I'll push them here.

@jmoggr
Copy link
Copy Markdown
Collaborator

jmoggr commented Mar 23, 2026

I pushed the changes. The pnpm specific docs are improved and we kept the docs for other hash mismatches.

@kasbah
Copy link
Copy Markdown
Member Author

kasbah commented Mar 23, 2026

Somehow, later on a different branch, I was not getting the "got" hash when I was doing this again and had to put in empty string. I'm really not sure what I was doing differently.

@jmoggr
Copy link
Copy Markdown
Collaborator

jmoggr commented Mar 23, 2026

I vaguely recall seeing something like that at some point, but dismissed it since there were bigger nixy changes. I'll have claude try to grind out a reproduction.

@kasbah
Copy link
Copy Markdown
Member Author

kasbah commented Mar 23, 2026

We could just put the advice back to put in the empty string since that always works even if it's a tiny bit more work.

Copy link
Copy Markdown
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge when you're satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants