You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
When reading the JSON from elm-make, for each warning / error, you have overview and details fields containing text info about the problem. Regarding the naming of the fields, I would expect the first one to be a "short" summary of the issue and the other one diving deeper on what exactly is the problem and how to eventually solve it. Sometime it's exactly that:
[{"tag":"missing type annotation",
"overview":"Top-level value `test` does not have a type annotation.",
"details":"I inferred the type annotation so you can copy it into your code:\n\ntest : number",
"region":{"start":{"line":6,"column":1},"end":{"line":6,"column":5}},
"type":"warning",
"file":"src/Test.elm"}]
If you only print overview, it's enough to understand the problem. But some other times, you are forced to use both of them or the message will not make any sense.
[{"tag":"SYNTAX PROBLEM",
"overview":"I need whitespace, but got stuck on what looks like a new declaration. You are\neither missing some stuff in the declaration above or just need to add some\nspaces here:",
"subregion":null,
"details":"I am looking for one of the following things:\n\n whitespace",
"region":{"start":{"line":6,"column":1},"end":{"line":6,"column":1}},
"type":"error",
"file":"Main.elm"}]
As we can see, displaying only the overview will result in a truncated message missing the end. It's kind of a bummer if you are building a tool based on this report and only display the overview by default.
Also, I might be wrong, but it feels strange to have \n inside the JSON. It forces how to render the result while I consider JSON to be only about raw data. I would expect to have such newlines added when actually printing the message on the shell (or somewhere else).
The text was updated successfully, but these errors were encountered:
Don't think so. In short: overview and details should be standalone rather than being forced to concatenate them to have the full message (otherwise, only one field would be enough) and not contain any styling, only the raw message (no \n and no ).
When reading the JSON from
elm-make
, for each warning / error, you haveoverview
anddetails
fields containing text info about the problem. Regarding the naming of the fields, I would expect the first one to be a "short" summary of the issue and the other one diving deeper on what exactly is the problem and how to eventually solve it. Sometime it's exactly that:If you only print
overview
, it's enough to understand the problem. But some other times, you are forced to use both of them or the message will not make any sense.As we can see, displaying only the
overview
will result in a truncated message missing the end. It's kind of a bummer if you are building a tool based on this report and only display theoverview
by default.Also, I might be wrong, but it feels strange to have
\n
inside the JSON. It forces how to render the result while I consider JSON to be only about raw data. I would expect to have such newlines added when actually printing the message on the shell (or somewhere else).The text was updated successfully, but these errors were encountered: