elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
173 stars 17 forks source link

Suggestion: include line number or line and column number next to file path #273

Closed alex-tan closed 5 years ago

alex-tan commented 5 years ago

Including the line number/and or column number next to a file path in an error message would allow you to command click it in VSCode and perhaps other editors as well to jump to a particular location in a file: /app/Main.hs:39:24. This is how the Haskell compiler does it and it makes debugging much nicer.

evancz commented 5 years ago

I want the error messages to be formatted for human reading, and I remember that I was always confused by the condensed output like that when I was learning different languages. The compiler outputs errors in a JSON format with --report=json which is what editor plugins should be using. It gives information like line numbers and column numbers such that editor plugin authors can make choices like this specific to the editor.