fix(tvix/eval): baseNameOf: propagate catchables

Change-Id: Id8dc772ea8f338dfd243210f4108f79072570c3b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10324
Autosubmit: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Adam Joseph 2023-12-12 04:27:05 -08:00 committed by clbot
parent 2565a21aa9
commit c5f58d4af3
3 changed files with 3 additions and 0 deletions

View file

@ -135,6 +135,7 @@ mod pure_builtins {
async fn builtin_base_name_of(co: GenCo, s: Value) -> Result<Value, ErrorKind> { async fn builtin_base_name_of(co: GenCo, s: Value) -> Result<Value, ErrorKind> {
let span = generators::request_span(&co).await; let span = generators::request_span(&co).await;
let s = match s { let s = match s {
val @ Value::Catchable(_) => return Ok(val),
// it is important that builtins.baseNameOf does not // it is important that builtins.baseNameOf does not
// coerce paths into strings, since this will turn them // coerce paths into strings, since this will turn them
// into store paths, and `builtins.baseNameOf // into store paths, and `builtins.baseNameOf

View file

@ -0,0 +1 @@
(builtins.tryEval ( builtins.baseNameOf (throw "jill") )).success