diff options
-rw-r--r-- | tvix/eval/src/observer.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tvix/eval/src/observer.rs b/tvix/eval/src/observer.rs index 970a644a3d43..29e4fb2d9c06 100644 --- a/tvix/eval/src/observer.rs +++ b/tvix/eval/src/observer.rs @@ -166,7 +166,14 @@ impl<W: Write> TracingObserver<W> { fn write_stack(&mut self, stack: &[Value]) { let _ = write!(&mut self.writer, "[ "); - for val in stack { + // Print out a maximum of 6 values from the top of the stack, + // before abbreviating it to `...`. + for (i, val) in stack.iter().rev().enumerate() { + if i == 6 { + let _ = write!(&mut self.writer, "..."); + break; + } + self.write_value(&val); } |