From 06ec4bebe7e3a9a06a7f300f0a9f7c090d809f08 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 10 Oct 2022 16:50:28 -0400 Subject: fix(tvix/eval): Actually trace spans for thunks Currently, the span on *all* thunk force errors is the span at which the thunk is forced, which for recursive thunk forcing ends up just being the same span over and over again. This changes the span on thunk force errors to be the span at which point the thunk is *created*, which is a bit more helpful (though the printing atm is a little... crowded). To make this work, we have to thread through the span at which a thunk is created into a field on the thunk itself. Change-Id: I81474810a763046e2eb3a8f07acf7d8ec708824a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6932 Autosubmit: grfn Reviewed-by: Adam Joseph Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/builtins/impure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src/builtins') diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs index 2315904f143b..26422e263002 100644 --- a/tvix/eval/src/builtins/impure.rs +++ b/tvix/eval/src/builtins/impure.rs @@ -151,7 +151,7 @@ pub fn builtins_import( // Compilation succeeded, we can construct a thunk from whatever it spat // out and return that. - Ok(Value::Thunk(Thunk::new(result.lambda))) + Ok(Value::Thunk(Thunk::new(result.lambda, vm.current_span()))) }, ) } -- cgit 1.4.1