diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-31T10·35-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-31T12·36+0000 |
commit | 9ada456260c0fff256f08a6aa87c436a0027f318 (patch) | |
tree | 311ccff4540eb29a254023ddd120437ae512d766 /tvix/eval/src/tests | |
parent | 98a981a73718d4d1ed190796c862863514c1b102 (diff) |
fix(tvix/eval): nix_eq() must recurse r/5226
The current implementation of nix_eq will force one level of thunks and then switch to the (non-forcing) rust Eq::eq() method. This gives incorrect results for lists-of-thunks. This commit changes nix_eq() to be recursive. A regression test (which fails prior to this commit) is included. This fix also causes nix_tests/eval-okay-fromjson.nix to pass, so it is moved out of notyetpassing. Change-Id: I655fd7a5294208a7b39df8e2c3c12a8b9768292f Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7142 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/tests')
-rw-r--r-- | tvix/eval/src/tests/nix_tests/eval-okay-fromjson.exp (renamed from tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.exp) | 0 | ||||
-rw-r--r-- | tvix/eval/src/tests/nix_tests/eval-okay-fromjson.nix (renamed from tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.nix) | 0 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.nix | 1 |
4 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.exp b/tvix/eval/src/tests/nix_tests/eval-okay-fromjson.exp index 27ba77ddaf61..27ba77ddaf61 100644 --- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.exp +++ b/tvix/eval/src/tests/nix_tests/eval-okay-fromjson.exp diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.nix b/tvix/eval/src/tests/nix_tests/eval-okay-fromjson.nix index e1c0f86cc4e4..e1c0f86cc4e4 100644 --- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-fromjson.nix +++ b/tvix/eval/src/tests/nix_tests/eval-okay-fromjson.nix diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.exp new file mode 100644 index 000000000000..27ba77ddaf61 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.exp @@ -0,0 +1 @@ +true diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.nix new file mode 100644 index 000000000000..5dbcb515295b --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-eq-nested-list.nix @@ -0,0 +1 @@ +[["f" ""]] == [["f" ""]] |