about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-10T18·01+0300
committertazjin <tazjin@tvl.su>2022-08-25T11·34+0000
commit058e77bab20db90347ce1d91c41076ef56b61b26 (patch)
tree95198e36be78d26ce14bf40cb0a5cfb4d536cce6 /tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix
parentfa2d250d1a65ba3bf8522fdbbe72dca21fa7ee66 (diff)
feat(tvix/eval): implement attrset update (`//`) operator r/4475
The underlying implementation does a few tricks based on which pair of
attrset representations is encountered.

Particularly the effect of short-circuiting the empty cases might be
relevant in nixpkgs/NixOS, due to the use of lib.optionalAttrs.

Change-Id: I22b978b1c69af12926489a71087c6a6219c012f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6140
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix
new file mode 100644
index 0000000000..9596be22b8
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-attrs-update-empty-lhs.nix
@@ -0,0 +1 @@
+{} // { a = "ok"; }