-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Content-addressing derivations with shallow traces #12464
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
Draft
Ericson2314
wants to merge
15
commits into
NixOS:master
Choose a base branch
from
obsidiansystems:build-trace-rework
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,524
−1,607
Conversation
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
6f610de
to
be5cfe4
Compare
be5cfe4
to
7b01c8b
Compare
7b01c8b
to
546d826
Compare
539b7ca
to
a031df7
Compare
…tput In the case where the store object doesn't exist, we do correctly move (rather than copy) the scratch data into place. In this case, the destination store object already exists, but we still want to clean up after ourselves.
This allows refactoring without changing wire protocol by mistake.
There is now a clean separation between successful and failing build results.
Realisations are conceptually key-value pairs, mapping `DrvOutputs` (the key) to information about that derivation output. This separate the value type, which will be useful in maps, etc., where we don't want to denormalize by including the key twice.
It should be the responsibility of implementations that don't implement it to say so. See also PR NixOS#9799, and issue NixOS#5729
Tests the realisation functionality we just added.
a031df7
to
4f9435b
Compare
This test ends up being skipped, since the bug has not yet been fixed. A future commit will fix the bug. Progress on NixOS#13247, naturally.
This prepares the way for fixing a few issues.
Resolve the derivation before creating a building goal, in a context where we know what output(s) we want. That way we have a chance just to download the outputs we want. Fix NixOS#13247
The refactor in the last commit fixed the bug it was supposed to fix, but introduced a new bug in that sometimes we tried to write a resolved derivation to a store before all its `inputSrcs` were in that store. The solution is to defer writing the derivation until inside `DerivationBuildingGoal`, just before we do an actual build. At this point, we are sure that all inputs in are the store. This does have the side effect of meaning we don't write down the resolved derivation in the substituting case, only the building case, but I think that is actually fine. The store that actually does the building should make a record of what it built by storing the resolved derivation. Other stores that just substitute from that store don't necessary want that derivation however. They can trust the substituter to keep the record around, or baring that, they can attempt to re resolve everything, if they need to be audited.
This reverts commit bab1cda.
4f9435b
to
46fde9b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c api
Nix as a C library with a stable interface
fetching
Networking with the outside (non-Nix) world, input locking
new-cli
Relating to the "nix" command
store
Issues and pull requests concerning the Nix store
with-tests
Issues related to testing. PRs with tests have some priority
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.
Motivation
#11897 and #11928 and #11896
Don't even bother reviewing yet. It compiles but fails tests and none of the interesting things are done.
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.