[Enhancement]: make trace_fmt!()
emit full file and line/column information
#1471
Labels
ux
User experience (end-user invoking XLS and its related tools)
The
trace_fmt!()
output recently improved by actually printing the file name and line number the trace is happening.What is
But the output is still not as useful as it could
LOG(INFO)
, but that is not super-helpful: we're running a test and not a long-running server, so the exact microsecond something happened is just noise.This is how things look now:
bazel build -c opt xls/dslx:interpreter_main && bazel-bin/xls/dslx/interpreter_main xls/examples/protobuf/varint_streaming_decode.x --alsologtostderr
What should
Instead of re-using the internal absl logging with different goals, make
trace_fmt!()
useful, possibly with a flag e.g.--trace_out
, that then formats with with full relevant information for an IDE to jump to an step to each message, in the standard<filename>:<line>:<colrange>:
format, but no unnecessary fluff:Nice-to-have, but not needed in first implementation:
isatty(output_fd)
, color the filename.Why is this important ?
Well, the example above shows that it is already much more relevant for a human when debugging xls code. But it is also easier for an IDE to pick up information.
I am working towards a feature where you have a 'play' button next to the test in xls (like in emacs in rust files). That will help to have a much more interactive way to interact with the code.
The text was updated successfully, but these errors were encountered: