From 3fb0697a713cdd5b0c22b3c511419ba3a281746a Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Fri, 9 Feb 2024 12:59:04 -0500 Subject: fix(tvix/eval): Propagate catchables in NixAttrs::construct Correctly propagate the case where the *key* of an attrset is a Value::Catchable (eg { "${builtins.throw "c"}" = "b"; }) in `NixAttrs::construct`, by converting the return type to `Result, ErrorKind>` (ugh!!) and correctly handling that everywhere (including an `expect` in the Deserialize impl for NixAttrs, since afaict this is impossible to hit when deserializing from stuff like JSON). Change-Id: Ic4bc611fbfdab27c0bd8a40759689a87c4004a17 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10786 Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp new file mode 100644 index 000000000000..c508d5366f70 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-attr-key-catchable.exp @@ -0,0 +1 @@ +false -- cgit 1.4.1