about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-02-10T15·26-0500
committerclbot <clbot@tvl.fyi>2024-02-20T23·53+0000
commit5ced8e7292384fc93dd8dad652c2612be4ba5d4a (patch)
treeb1ec8a7852dad9f4901daba6aabf40a930cd91de /tvix/eval/src/builtins
parent1b233024c7ffcf1acceec5431cf2100b837d31db (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/src/builtins')
-rw-r--r--tvix/eval/src/builtins/mod.rs10
1 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);