This would allow jumping from the generated source code to the gleam source file.
On target Erlang the file attribute could be used:
Setting File and Line
The same syntax as for module attributes is used for changing the pre-defined macros ?FILE and ?LINE:
-file(File, Line).
This attribute is used by tools, such as Yecc, to inform the compiler that the source program is generated by another tool. It also indicates the correspondence of source files to lines of the original user-written file, from which the source program is produced.
As one effect, this would help tools like stacky to allow jumping into the gleam source file from the stack trace.
On target JS if there is any standard solution, that could be used? Otherwise we can just setup a convention?
Optional: Maybe the compiler could be told to not include such details for security reasons, by a compiler flag, or is this a no-issue if the pathes are relative not absolute?
This would allow jumping from the generated source code to the gleam source file.
On target Erlang the file attribute could be used:
Source: https://www.erlang.org/doc/reference_manual/modules#setting-file-and-line
As one effect, this would help tools like stacky to allow jumping into the gleam source file from the stack trace.