elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

Errors from header-parse phase do not get put in --report=json #118

Closed pauldijou closed 6 years ago

pauldijou commented 7 years ago

This will probably join the meta issue for the JSON report but it looks like SYNTAX PROBLEM errors will always return the string to display on the screen rather than a valid JSON. For example, even with --report=json, this is the output of elm-make:

-- SYNTAX PROBLEM -------------- /src/Private.elm

I ran into something unexpected when parsing your code!

16| import Core.Context as Context exposing (PrivateContext)aze
                                                            ^
I am looking for one of the following things:

    whitespace
process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

7sharp9 commented 7 years ago

I was just looking at tooling issues with non reported errors in the vscode Elm addin and encountered this, it would be good to report all errors to the editor users, I suppose there are work arounds by parsing textually on failure but thats nasty.

For any new user having errors silent is a big issue.

evancz commented 6 years ago

Added to #98. The compiler needs to treat all possible errors exactly the same for this to be plausible. It seems best to batch that with an overall pass for "get editor stuff better" so I added it to a meta issue on that for now. Thanks for the report!