Skip to content

Stacktraces omit the function that was called #467

@russell

Description

@russell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions