-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make nix flake metadata|update|lock
lazy
#12432
base: master
Are you sure you want to change the base?
Conversation
👍
This could still be done by hashing without copying, but that behavior is still slower than ideal, so it should be removed (as you did) or be put behind a flag perhaps if it is needed. I feel like it's not "metadata" though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces some new code paths for which it would have been nice to remove the old, strict / copying ones, but that'd be too soon. Looks ok.
🎉 All dependencies have been resolved ! |
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`.
a15123a
to
2890a2e
Compare
Motivation
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 (i.e. without having to copy the inputs to the store) without risk of any semantic change in the evaluator.However, as a result,
nix flake metadata
now no longer prints the store path, which is a breaking change (but unavoidable if we want lazy trees). So calls likenix flake metadata --json | jq .path
should be replaced bynix flake prefetch --json | jq .storePath
.Depends on #12421.
TODO: add release note.
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.