tvl-depot/tvix/eval/src
Adam Joseph 9ada456260 fix(tvix/eval): nix_eq() must recurse
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>
2022-10-31 12:36:15 +00:00
..
builtins feat(tvix/eval): Implement builtins.sort 2022-10-29 14:04:12 +00:00
compiler refactor(tvix/eval): search-and-replace changes 2022-10-27 22:00:39 +00:00
tests fix(tvix/eval): nix_eq() must recurse 2022-10-31 12:36:15 +00:00
value fix(tvix/eval): nix_eq() must recurse 2022-10-31 12:36:15 +00:00
chunk.rs feat(tvix/eval): deduplicate overlap between Closure and Thunk 2022-10-19 10:38:54 +00:00
errors.rs feat(tvix/eval): add TvixBug error kind 2022-10-22 18:30:12 +00:00
eval.rs feat(tvix/eval): builtins.import without RefCell 2022-10-27 21:36:01 +00:00
lib.rs feat(tvix/eval): builtins.import without RefCell 2022-10-27 21:36:01 +00:00
main.rs feat(tvix/eval): Allow directly evaluating an expr via main 2022-10-11 00:33:49 +00:00
nix_search_path.rs fix(tvix): distinguish search- and relative path resolution errors 2022-10-21 00:11:29 +00:00
observer.rs feat(tvix/eval): initial attempt at setting lambda names 2022-10-23 15:58:53 +00:00
opcode.rs docs(tvix/eval): StackIdx, LocalIdx UpvalueIdx 2022-10-26 14:27:37 +00:00
pretty_ast.rs fix(tvix/eval): more faithfully serialise ast::Literal 2022-10-16 23:35:59 +00:00
properties.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
source.rs feat(tvix/eval): fancy-format parse errors returned by rnix 2022-10-08 17:27:57 +00:00
spans.rs refactor(tvix/eval): implement ToSpan directly for rnix::TextRange 2022-10-08 10:58:42 +00:00
systems.rs fix(tvix/eval): correct wasm32-unknown-unknown to wasm32-none 2022-10-27 23:23:22 +00:00
test_utils.rs test(tvix/eval): Add proof-of-concept test for Chunk 2022-09-18 17:55:06 +00:00
upvalues.rs feat(tvix/eval): deduplicate overlap between Closure and Thunk 2022-10-19 10:38:54 +00:00
vm.rs feat(tvix/eval): Implement comparison for lists 2022-10-29 10:45:51 +00:00
warnings.rs refactor(tvix/eval): introduce source::SourceCode type 2022-10-05 10:29:47 +00:00