Make `nix flake metadata|update|lock` lazy
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 like nix flake metadata --json | jq .path should be replaced by nix flake prefetch --json | jq .storePath.
Depends on #12421.
TODO: add release note.
Context
Add :+1: to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.
:+1:
no longer prints the store path, which is a breaking change (but unavoidable if we want lazy trees)
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.
:tada: All dependencies have been resolved !
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.