Realisations use regular drv paths again#15322
Merged
Mic92 merged 2 commits intoNixOS:masterfrom Mar 2, 2026
Merged
Conversation
e5d0f93 to
73dc7fd
Compare
73dc7fd to
ccb423f
Compare
This reverts commit 100e7cc. Unlike the last version, this fixes `--print-out-paths` for old clients When the client lacks `featureRealisationWithPath` (worker) or version < 2.8 (serve), the daemon was sending an empty `StringMap` for `builtOutputs`, causing `--print-out-paths` to print nothing. This commit constructs the old wire format instead, using a dummy `sha256:` hash since the derivation hash no longer exists. Old clients only need the output name and path from the JSON.
ccb423f to
faca7db
Compare
Ericson2314
approved these changes
Mar 2, 2026
Member
Ericson2314
left a comment
There was a problem hiding this comment.
@Mic92 tested this and it is not causing problems anymore
The previous commit changed CA derivation realisations to be keyed by store path instead of hash modulo, affecting binary cache and wire protocols. Users and tool authors need to understand the impact on binary cache layout, protocol negotiation, and what migration looks like. This documents the key changes: the new build-trace-v2/ cache directory, the split key/value JSON format, worker protocol feature negotiation, serve protocol version bump, and the fact that non-CA users are unaffected.
This was referenced Mar 23, 2026
brittonr
pushed a commit
to brittonr/nix
that referenced
this pull request
Apr 1, 2026
Realisations use regular drv paths again
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is a redo of #12464 with a bug fix applied
Motivation
Fix #11897
As described in the issue, this makes for a simpler and much more intuitive notion of a realisation key. This is better for pedagogy, and interoperability between more tools.
Context
The way the issue was written was that we would switch to only having shallow realisations first, and then do this. But going to only shallow realisations is more complex change, and it turns out we weren't even testing for the benefits that derivation hashes (modulo FODs) provided in the deep realisation case, so I now just want to do this first.
Doing this gets the binary cache data structures in order, which will unblock the Hydra fixed-output-derivation tracking work. I don't want to delay that work while I figure out the changes needed for shallow-realisations only.
Revert "Use the hash modulo in the derivation outputs"
This reverts commit bab1cda.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.