From d1b7e0872608b2d78ddcb2ee473ec9bdbf9695a8 Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 15 Mar 2024 14:36:34 +0100 Subject: fix(tvix/eval): don't force lambda arg in map, mapAttrs & genList It is pretty pointless to force the function argument if we are going to use a suspended call later since forcing the function may fail in ways that are not covered by Catchables (non-recoverable errors, infinite recursions). From this, it kind of seems as if using #[catch] is never correct and should be replaced by #[lazy]. Also we should probably try to come up with more test cases for stuff where laziness gets us out of the jam as an equivalent to the catchable tests for nonrecoverable errors. Fixes b/386. Change-Id: Ia926df4ac1b440ec430403ab7b40924a0c97221b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11153 Reviewed-by: tazjin Tested-by: BuildkiteCI Autosubmit: sterni --- tvix/verify-lang-tests/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tvix/verify-lang-tests') diff --git a/tvix/verify-lang-tests/default.nix b/tvix/verify-lang-tests/default.nix index 276a57f12935..772c1c532078 100644 --- a/tvix/verify-lang-tests/default.nix +++ b/tvix/verify-lang-tests/default.nix @@ -76,11 +76,14 @@ let # b72bc4a972fe568744d98b89d63adcd504cb586c "eval-okay-identifier-formatting.nix" = [ nix ]; - # Different catchable behavior between nix 2.3 and 2.18 + # Differing strictness in the function argument for some builtins in Nix 2.18 + # https://github.com/NixOS/nix/issues/9779 "eval-okay-builtins-map-propagate-catchable.nix" = [ nix_latest ]; "eval-okay-builtins-gen-list-propagate-catchable.nix" = [ nix_latest ]; "eval-okay-builtins-replace-strings-propagate-catchable.nix" = [ nix_latest ]; + "eval-okay-builtins-map-function-strictness.nix" = [ nix_latest ]; + "eval-okay-builtins-genList-function-strictness.nix" = [ nix_latest ]; # TODO(sterni): support diffing working directory and home relative paths # like C++ Nix test suite (using string replacement). -- cgit 1.4.1