fix(tvix/eval): propagate catchables through builtins.attrNames

Change-Id: Id14e39543239272aed041998fd9a78465c9cb8b2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10359
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Adam Joseph 2023-12-13 05:53:58 -08:00 committed by tazjin
parent 9cb3cd10f5
commit 4b3f27ebc9
3 changed files with 5 additions and 0 deletions

View file

@ -121,6 +121,9 @@ mod pure_builtins {
#[builtin("attrNames")]
async fn builtin_attr_names(co: GenCo, set: Value) -> Result<Value, ErrorKind> {
if set.is_catchable() {
return Ok(set);
}
let xs = set.to_attrs()?;
let mut output = Vec::with_capacity(xs.len());

View file

@ -0,0 +1 @@
false

View file

@ -0,0 +1 @@
(builtins.tryEval (builtins.attrNames (throw "fred"))).success