elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.51k stars 656 forks source link

Add line and column numbers to file path in compilation errors #2228

Open JohanWinther opened 2 years ago

JohanWinther commented 2 years ago

Quick Summary: Some IDEs support navigating to a file by ctrl+clicking file paths that show up in the terminal. You can also end up in the right place in the file if the path includes a line and column number: src/Main.elm:10 -> cursor at line 10 src/Main.elm:10:4 -> cursor at line 10, column 4

It would be nice if compilation error messages contained the line and column number when printing the file path.

Example error message where line and column number is added to the file path:

-- TOO MANY ARGS ------------------------ src/Main.elm:851:8

The `Person` constructor expects 1 argument, but it got 2 instead.

849|>    Person
850|         "John"
851|         "Smith"

Are there any missing commas? Or missing parentheses?

SSCCE

github-actions[bot] commented 2 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.