feat(tvix/eval): builtins.hasContext: placeholder implementation
Currently this just `throw`s a message explaining that it is not implemented. This is necessary in order to allow enumerating the nixpkgs release attrset (afaict only one package uses this builtin). Change-Id: I45266d46af579ddb5856b192b6be4b481369543c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10302 Autosubmit: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
531f0c0c42
commit
012b44244b
1 changed files with 8 additions and 0 deletions
|
@ -498,6 +498,14 @@ mod pure_builtins {
|
|||
Ok(Value::Bool(xs.contains(k.as_str())))
|
||||
}
|
||||
|
||||
#[builtin("hasContext")]
|
||||
#[allow(non_snake_case)]
|
||||
async fn builtin_hasContext(_co: GenCo, #[lazy] _e: Value) -> Result<Value, ErrorKind> {
|
||||
Ok(Value::Catchable(CatchableErrorKind::UnimplementedFeature(
|
||||
"hasContext".to_string(),
|
||||
)))
|
||||
}
|
||||
|
||||
#[builtin("head")]
|
||||
async fn builtin_head(co: GenCo, list: Value) -> Result<Value, ErrorKind> {
|
||||
match list.to_list()?.get(0) {
|
||||
|
|
Loading…
Reference in a new issue