From afcfa7836401d90bbb131b170a3a69b3cf794b1c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 31 Aug 2022 04:47:54 +0300 Subject: feat(tvix/eval): semi-strictly evaluate output values of the VM This essentially makes the VM behave like `nix-instantiate --eval --strict`, i.e. data structures are traversed strictly and thunks are forced. Thunks embedded in closures are not forced. This allows us to re-enable tests that were disabled because they needed to output nested thunk contents, but is overall a behaviour that must be configurable later on, as it is not cmopatible with e.g. an evaluation of nixpkgs. Change-Id: I5303a5c8e4322feab1384fdb7712fecb950afca5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6372 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/disabled-identity-nested-attrs.nix | 3 --- tvix/eval/src/tests/tvix_tests/identity-nested-attrs.nix | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 tvix/eval/src/tests/tvix_tests/disabled-identity-nested-attrs.nix create mode 100644 tvix/eval/src/tests/tvix_tests/identity-nested-attrs.nix (limited to 'tvix/eval/src/tests/tvix_tests') diff --git a/tvix/eval/src/tests/tvix_tests/disabled-identity-nested-attrs.nix b/tvix/eval/src/tests/tvix_tests/disabled-identity-nested-attrs.nix deleted file mode 100644 index f8dacf3e084a..000000000000 --- a/tvix/eval/src/tests/tvix_tests/disabled-identity-nested-attrs.nix +++ /dev/null @@ -1,3 +0,0 @@ -# TODO: temporarily disabled because need "strict output" (b is -# thunked) -{ a = { b = null; }; } diff --git a/tvix/eval/src/tests/tvix_tests/identity-nested-attrs.nix b/tvix/eval/src/tests/tvix_tests/identity-nested-attrs.nix new file mode 100644 index 000000000000..6a139452ef28 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/identity-nested-attrs.nix @@ -0,0 +1 @@ +{ a = { b = null; }; } -- cgit 1.4.1