feat(tvix/glue): make unimplemented-structuredAttrs catchable

This commit adjusts the error produced by STRUCTURED_ATTRS so that
it is catchable.  This way we are able to enumerate the release
packageset, and the enumeration process will simply treat the few
derivations using structured attributes as being broken, rather than
killing the whole eval session.

Change-Id: I2e17638b8e3227f88543c3718aaf505deaec22ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10306
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Adam Joseph 2023-12-12 03:04:20 -08:00 committed by clbot
parent 29464fc65b
commit 07ca556a94

View file

@ -247,7 +247,9 @@ pub(crate) mod derivation_builtins {
// TODO: the JSON serialisation has to happen here.
if let Some(sa) = input.select(STRUCTURED_ATTRS) {
if generators::request_force(&co, sa.clone()).await.as_bool()? {
return Err(ErrorKind::NotImplemented(STRUCTURED_ATTRS));
return Ok(Value::Catchable(CatchableErrorKind::UnimplementedFeature(
STRUCTURED_ATTRS.to_string(),
)));
}
}