Skip to content

Test Lazy trees with integration tests#13235

Open
Mic92 wants to merge 2 commits intoNixOS:masterfrom
Mic92:lazy-trees-ci
Open

Test Lazy trees with integration tests#13235
Mic92 wants to merge 2 commits intoNixOS:masterfrom
Mic92:lazy-trees-ci

Conversation

@Mic92
Copy link
Copy Markdown
Member

@Mic92 Mic92 commented May 20, 2025

This was a TODO according to the original PR: #13225

edolstra and others added 2 commits May 19, 2025 16:45
This adds a setting 'lazy-trees' that causes flake inputs to be
"mounted" as virtual filesystems on top of /nix/store as random
"virtual" store paths. Only when the store path is actually used as a
dependency of a store derivation do we materialize ("devirtualize")
the input by copying it to its content-addressed location in the
store.

String contexts determine when devirtualization happens. One wrinkle
is that there are cases where we had store paths without proper
contexts, in particular when the user does `toString <path>` (where
<path> is a source tree in the Nix store) and passes the result to a
derivation. This usage was always broken, since it can result in
derivations that lack correct references. But to ensure that we don't
change evaluation results, we introduce a new type of context that
results in devirtualization but not in store references. We also now
print a warning about this.
this is so we can see what would break.
@github-actions github-actions bot added new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority store Issues and pull requests concerning the Nix store fetching Networking with the outside (non-Nix) world, input locking labels May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants