Use conventional FILE:LINE format for locations in stacktraces #9468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today, when printing an Erlang stacktrace, we return location information in a custom
(PATH, line LINE)
format. E.g.:A more common notation would be
/path/to/filename:line_number
, which is used in many programming tools and languages to specify a location in a file. This would also be in line with what the Erlang compiler returns:While the
PATH:NUMBER
does not seem to be an official standard, it's a widely adopted and understood convention across various development communities.Switching to the new format would simplify a number of tasks. For example, terminals such as
iTerm
would recognize this as a link and would allow developers to jump to the correct line number from terminal with a single click.This change will most likely break some tests, but before fixing them I'm opening the PR to check how open would you be to the change.