fix(tvix/eval): path resolution errors are catchable

Despite this not being documented, `tryEval` is empirically able to
catch errors caused by a <...> path not resolving (and nixpkgs depends
on this).

Change-Id: Ia3b78a2d9d2d0c603aba829518b351102dc55396
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6926
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2022-10-10 14:19:42 -04:00 committed by clbot
parent 2592113435
commit 75f637c1f5
3 changed files with 3 additions and 2 deletions

View file

@ -162,7 +162,7 @@ impl ErrorKind {
/// Returns `true` if this error can be caught by `builtins.tryEval`
pub fn is_catchable(&self) -> bool {
match self {
Self::Throw(_) | Self::AssertionFailed => true,
Self::Throw(_) | Self::AssertionFailed | Self::PathResolution(_) => true,
Self::ThunkForce(err) => err.kind.is_catchable(),
_ => false,
}