From 68c8ac05879f201a9570b6cf68f66ec6a3518017 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 05 Aug 2022 18:49:25 +0000 Subject: [PATCH] fix(stdlib): std.trace should be lazy --- --- a/crates/jrsonnet-stdlib/src/lib.rs +++ b/crates/jrsonnet-stdlib/src/lib.rs @@ -383,13 +383,13 @@ s: State, loc: CallLocation, str: IStr, - rest: Any, + rest: Thunk, ) -> Result { this.settings .borrow() .trace_printer - .print_trace(s, loc, str); - Ok(rest) as Result + .print_trace(s.clone(), loc, str); + Ok(Any(rest.evaluate(s)?)) } #[builtin] -- gitstuff