diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-26T21·20+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-03T21·55+0000 |
commit | e4fadfaaf8b7e821b77ce4dc41b915ff83f8e240 (patch) | |
tree | 449f9fbfc5e311b993d8aef7253008d9a9ae461e /tvix | |
parent | 1163ef3e413d239282b8a5fc24b708ee62c6f6a7 (diff) |
chore(tvix/eval): print node representation for compiler errors r/4624
Better for development flow. Change-Id: I038efb39caca804f28a44fd4c83457e90abbcee4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6290 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/eval.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index add621af6cc3..d61e51e6afc2 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -42,7 +42,11 @@ pub fn interpret(code: &str, location: Option<PathBuf>) -> EvalResult<Value> { } for error in &result.errors { - eprintln!("compiler error: {:?} at {:?}", error.kind, error.node,); + eprintln!( + "compiler error: {:?} at {:?}", + error.kind, + error.node.as_ref().map(|node| node.text()) + ); } if let Some(err) = result.errors.last() { |