Skip to content

Lazy trees v2 #27

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
wants to merge 17 commits into
base: detsys-main
Choose a base branch
from
Draft

Lazy trees v2 #27

wants to merge 17 commits into from

Conversation

edolstra
Copy link
Collaborator

@edolstra edolstra commented Apr 8, 2025

Motivation

Less invasive variant of NixOS#6530. We now mount lazy accessors on top of /nix/store without materializing them, and only materialize them to the real store if needed (e.g. in the derivation primop).

The virtual store paths for the lazy accessors are currently random. This could be replaced by something more deterministic if desired.

Incorporates NixOS#12432.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

These don't need to evaluate anything (except for the flake metadata
in flake.nix) so we can make these commands operate on lazy trees
without risk of any semantic change in the evaluator.

However, `nix flake metadata` now no longer prints the store path,
which is a breaking change (but unavoidable if we want lazy trees).
For the top-level flake, we don't need a NAR hash. But for inputs, we
do.

Also, add a test for the lazy behaviour of `nix flake metadata|lock`.
We now mount lazy accessors on top of /nix/store without materializing
them, and only materialize them to the real store if needed (e.g. in
the `derivation` primop).
Copy link

github-actions bot commented Apr 8, 2025

@github-actions github-actions bot temporarily deployed to pull request April 8, 2025 22:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 9, 2025 21:36 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 10, 2025 11:17 Inactive
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 this pull request may close these issues.

1 participant