about summary refs log tree commit diff
path: root/tvix/eval/src/warnings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/warnings.rs')
-rw-r--r--tvix/eval/src/warnings.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs
index aa567f302755..e007d9c34f2d 100644
--- a/tvix/eval/src/warnings.rs
+++ b/tvix/eval/src/warnings.rs
@@ -17,6 +17,7 @@ pub enum WarningKind {
     DeadCode,
     EmptyInherit,
     EmptyLet,
+    ShadowedOutput(String),
 
     /// Tvix internal warning for features triggered by users that are
     /// not actually implemented yet, but do not cause runtime failures.
@@ -100,6 +101,11 @@ impl EvalWarning {
 
             WarningKind::EmptyLet => "this `let`-expression contains no bindings".to_string(),
 
+            WarningKind::ShadowedOutput(ref out) => format!(
+                "this derivation's environment shadows the output name {}",
+                out
+            ),
+
             WarningKind::NotImplemented(what) => {
                 format!("feature not yet implemented in tvix: {}", what)
             }
@@ -120,6 +126,7 @@ impl EvalWarning {
             WarningKind::DeadCode => "W008",
             WarningKind::EmptyInherit => "W009",
             WarningKind::EmptyLet => "W010",
+            WarningKind::ShadowedOutput(_) => "W011",
 
             WarningKind::NotImplemented(_) => "W999",
         }