diff options
author | Aspen Smith <root@gws.fyi> | 2024-02-10T15·26-0500 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-20T23·53+0000 |
commit | 5ced8e7292384fc93dd8dad652c2612be4ba5d4a (patch) | |
tree | b1ec8a7852dad9f4901daba6aabf40a930cd91de /tvix/eval | |
parent | 1b233024c7ffcf1acceec5431cf2100b837d31db (diff) |
fix(tvix/eval): Propagate catchables in builtins.groupBy r/7580
One last place where we needed to wrap the forcing of the element of a list in `try_value!`. This fixes a previously `notyetpassing` test Change-Id: I8827a3e39630e6959013b70bdfa9cbcb93f4e91c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10789 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 10 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.exp (renamed from tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.exp) | 0 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.nix (renamed from tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.nix) | 0 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index c070bd44b1d1..131f2b7bb201 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -558,11 +558,13 @@ mod pure_builtins { async fn builtin_group_by(co: GenCo, f: Value, list: Value) -> Result<Value, ErrorKind> { let mut res: BTreeMap<NixString, imbl::Vector<Value>> = BTreeMap::new(); for val in list.to_list()? { - let key = generators::request_force( - &co, - generators::request_call_with(&co, f.clone(), [val.clone()]).await, + let key = try_value!( + generators::request_force( + &co, + generators::request_call_with(&co, f.clone(), [val.clone()]).await, + ) + .await ) - .await .to_str()?; res.entry(key).or_default().push_back(val); diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.exp index 48e341f4d85c..48e341f4d85c 100644 --- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.exp +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.exp diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.nix index 182601abb18c..182601abb18c 100644 --- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-group-by-propagate-catchable.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-group-by-propagate-catchable.nix |