From 1ddfed98255ad89acb51e9a4d25b4d8c3db79627 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 12 Dec 2023 03:33:18 -0800 Subject: fix(tvix/eval): builtins.filter: propagate catchables This commit fixes builtins.filter so it propagates catchables correctly. Change-Id: Ib23a383bc5e272e42052205ffd1e94649a0ebc47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10313 Autosubmit: Adam Joseph Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/builtins/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tvix/eval/src/builtins') diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 295d94b73523..4844ae8f1b53 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -316,8 +316,11 @@ mod pure_builtins { for value in list { let result = generators::request_call_with(&co, pred.clone(), [value.clone()]).await; - - if generators::request_force(&co, result).await.as_bool()? { + let verdict = generators::request_force(&co, result).await; + if verdict.is_catchable() { + return Ok(verdict); + } + if verdict.as_bool()? { out.push_back(value); } } -- cgit 1.4.1