aboutsummaryrefslogtreecommitdiff
path: root/tests/flakes/follow-paths.sh
diff options
context:
space:
mode:
authorVertex <5567402+VertexA115@users.noreply.github.com>2023-08-15 10:10:27 +0100
committerGitHub <noreply@github.com>2023-08-15 10:10:27 +0100
commit20d9c672d14de3f05a791251a67618d679cf4173 (patch)
tree3cb7346e644fb77de2a6c08b3f3ef16a833d45c9 /tests/flakes/follow-paths.sh
parent37a509ca2d7ab4b6a94ba35462483494253bf231 (diff)
Update tests/flakes/follow-paths.sh
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Diffstat (limited to 'tests/flakes/follow-paths.sh')
-rw-r--r--tests/flakes/follow-paths.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/flakes/follow-paths.sh b/tests/flakes/follow-paths.sh
index a70d9acb2..f9d5c8c80 100644
--- a/tests/flakes/follow-paths.sh
+++ b/tests/flakes/follow-paths.sh
@@ -150,6 +150,25 @@ nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override fo
nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'"
# Now test follow path overloading
+# This tests a lockfile checking regression https://github.com/NixOS/nix/pull/8819
+#
+# We construct the following graph, where p->q means p has input q.
+# A double edge means that the edge gets overridden using `follows`.
+#
+# A
+# / \
+# / \
+# v v
+# B ==> C --- follows declared in A
+# \\ /
+# \\/ --- follows declared in B
+# v
+# D
+#
+# The message was
+# error: input 'B/D' follows a non-existent input 'B/C/D'
+#
+# Note that for `B` to resolve its follow for `D`, it needs `C/D`, for which it needs to resolve the follow on `C` first.
flakeFollowsOverloadA=$TEST_ROOT/follows/overload/flakeA
flakeFollowsOverloadB=$TEST_ROOT/follows/overload/flakeA/flakeB
flakeFollowsOverloadC=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC