-
Notifications
You must be signed in to change notification settings - Fork 249
Closed
Labels
Description
Hey,
It can be really hard to debug expressions when there are more than one or 2 function calls 😭
Using the test program
local identity(a) = a;
local foo = {
bar(a): (
assert false;
a
),
baz(): self,
};
foo.baz().bar(identity(1))
when running the golang version, the top of the stack is missing, so the information we have to debug this is that somewhere on the line foo.baz().bar(identity(1)) there is an issue.
$ jsonnet test.jsonnet
RUNTIME ERROR: Assertion failed
test.jsonnet:12:1-27 $
During evaluation
from the c++ implementation, indicates what function call resulted in the error, that indicates that the error came from this part of the file
assert false;
a
$ jsonnet test.jsonnet
RUNTIME ERROR: Assertion failed.
test.jsonnet:(6:5)-(7:6) function <anonymous>
test.jsonnet:12:1-27