Make nix flake metadata|update|lock lazy#12432
Make nix flake metadata|update|lock lazy#12432edolstra wants to merge 7 commits intoNixOS:masterfrom
nix flake metadata|update|lock lazy#12432Conversation
|
👍
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. |
roberth
left a comment
There was a problem hiding this comment.
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
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/minimize-download-of-dependency-flakes-on-demand/62064/5 |
|
Still seems useful if we want to make progress on lazy paths. |
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 metadatanow 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 .pathshould 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.