From 2664a216e57169ec57d7f51be1b8383c1be83fd5 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Tue, 28 Dec 2021 15:30:06 +0300 Subject: flake.cc: computeLocks: Only verify overrides when they could change When we check for disappeared overrides, we can get "false positives" for follows and overrides which are defined in the dependencies of the flake we are locking, since they are not parsed by parseFlakeInputs. However, at that point we already know that the overrides couldn't have possible been changed if the input itself hasn't changed (since we check that oldLock->originalRef == *input.ref for the input's parent). So, to prevent this, only perform this check when it was possible that the flake changed (e.g. the flake we're locking, or a new input, or the input has changed and mustRefetch == true). --- tests/flakes.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/flakes.sh') diff --git a/tests/flakes.sh b/tests/flakes.sh index 942d07010..20e6d09c1 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -716,11 +716,10 @@ cat > $flakeFollowsA/flake.nix < $flakeFollowsB/flake.nix < $flakeFollowsC/flake.nix <