about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2022-10-10T18·19-0400
committerclbot <clbot@tvl.fyi>2022-10-10T20·58+0000
commit75f637c1f5920cd6290ac078fa9ec51372173a68 (patch)
tree14d82980f975d8eb66d4f21074bc5fdd6bda81bb /tvix/eval/src/tests/tvix_tests
parent25921134353e785b509d4debeb11b3bf209c92b3 (diff)
fix(tvix/eval): path resolution errors are catchable r/5091
Despite this not being documented, `tryEval` is empirically able to
catch errors caused by a <...> path not resolving (and nixpkgs depends
on this).

Change-Id: Ia3b78a2d9d2d0c603aba829518b351102dc55396
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6926
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp2
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix1
2 files changed, 2 insertions, 1 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp
index 2b2e6fa711f4..770a5b6db405 100644
--- a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp
@@ -1 +1 @@
-{ x = { success = true; value = "x"; }; y = { success = false; value = false; }; z = { success = false; value = false; }; }
+{ w = { success = false; value = false; }; x = { success = true; value = "x"; }; y = { success = false; value = false; }; z = { success = false; value = false; }; }
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix
index 629bc440a85a..8915032abd6f 100644
--- a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix
@@ -1,4 +1,5 @@
 {
+  w = builtins.tryEval <nope>;
   x = builtins.tryEval "x";
   y = builtins.tryEval (assert false; "y");
   z = builtins.tryEval (throw "bla");