From 1015f2f8e7c37c5c4b4ebca799579c5f6c0d5100 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 23 Sep 2022 00:51:19 +0300 Subject: fix(tvix/eval): manually count entries in recursive scopes The previous version had a bug where we assumed that the number of entries in an attribute set AST node would be equivalent to the number of entries in the runtime attribute set, but due to inherit nodes containing a variable number of entries, this did not work out. Fixes b/199 Change-Id: I6f7f7729f3512b297cf29a2e046302ca28477854 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6749 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.nix | 1 + 2 files changed, 2 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.nix (limited to 'tvix/eval/src/tests/tvix_tests') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.exp new file mode 100644 index 000000000000..ffcd4415b08f --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.exp @@ -0,0 +1 @@ +{ } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.nix new file mode 100644 index 000000000000..a1181431deca --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-empty-rec-inherit.nix @@ -0,0 +1 @@ +rec { inherit; } -- cgit 1.4.1