feat(tvix/eval): add configuration of Nix search path to public API
This is required for passing through NIX_PATH from the CLI. Change-Id: If129df79ef9c3ffab31408adb85679909276c4f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7544 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
9d6ee5b6a6
commit
9bc1e6ef05
2 changed files with 33 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ pub enum WarningKind {
|
|||
UnusedBinding,
|
||||
ShadowedGlobal(&'static str),
|
||||
DeprecatedLegacyLet,
|
||||
InvalidNixPath(String),
|
||||
|
||||
/// Tvix internal warning for features triggered by users that are
|
||||
/// not actually implemented yet, but do not cause runtime failures.
|
||||
|
|
@ -80,6 +81,10 @@ impl EvalWarning {
|
|||
"legacy `let` syntax used, please rewrite this as `let .. in ...`".to_string()
|
||||
}
|
||||
|
||||
WarningKind::InvalidNixPath(ref err) => {
|
||||
format!("invalid NIX_PATH resulted in a parse error: {}", err)
|
||||
}
|
||||
|
||||
WarningKind::NotImplemented(what) => {
|
||||
format!("feature not yet implemented in tvix: {}", what)
|
||||
}
|
||||
|
|
@ -95,6 +100,7 @@ impl EvalWarning {
|
|||
WarningKind::UnusedBinding => "W003",
|
||||
WarningKind::ShadowedGlobal(_) => "W004",
|
||||
WarningKind::DeprecatedLegacyLet => "W005",
|
||||
WarningKind::InvalidNixPath(_) => "W006",
|
||||
WarningKind::NotImplemented(_) => "W999",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue