about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-10T16·10+0300
committertazjin <tazjin@tvl.su>2022-08-24T21·25+0000
commit8235384d2d72514e1ef67de1782dc9f604039435 (patch)
treebfdc0ce3e53285a53d80827f525eae3742395a1f /tvix
parent5685f7c59402439af33f7b6fc1114557f0c33477 (diff)
chore(tvix/eval): only print AST if requested r/4463
Change-Id: If32c7fd03458a27aecb8c473f2c48b12f8cb5175
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6128
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/eval.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs
index 5e6c53cd8bf5..a12add48b552 100644
--- a/tvix/eval/src/eval.rs
+++ b/tvix/eval/src/eval.rs
@@ -10,7 +10,9 @@ pub fn interpret(code: &str) -> EvalResult<Value> {
         todo!()
     }
 
-    println!("{}", ast.root().dump());
+    if let Ok(_) = std::env::var("TVIX_DISPLAY_AST") {
+        println!("{}", ast.root().dump());
+    }
 
     let code = crate::compiler::compile(ast)?;
     println!("code: {:?}", code);