Rerouted (archive, verified). The original repository is gone. This copy comes from an archive (Software Heritage). The Lamdera package server serves a copy recovered from swh:1:rev:ccedc9b26200893c07fe8295a6a061cb4d4b8e7f (Software Heritage, origin https://github.com/eco-pro/project-metadata-utils).
What we checked: Software Heritage archived tag 1.0.0 of github.com/eco-pro/project-metadata-utils at commit ccedc9b26200; its commit ccedc9b26200 is from 2021-02-20 17:08 UTC, before the version was published (2021-02-20 17:14 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, made from Software Heritage's copy of the files Elm uses, so its SHA-1 is not the published one.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/eco-pro/project-metadata-utils/zipball/1.0.0/
When elm make --report=json fails, this module helps you turn the
resulting JSON into HTML.
When elm make --report=json fails, there are two major categories of
error. Usually you have ModuleProblems like an unknown variable name or type
mismatch, but you can also get a GeneralProblem like cyclic modules or an
invalid elm.json file. The latter are much less common, but because they
never have a Region they need to be handled separately.
When I cannot compile a module, I am able to report a bunch of problems at once. So you may see a bunch of naming errors or type errors.
A problem in an Elm module.
A chunk of text to show. Chunks will contain newlines here and there, so
I recommend using white-space: pre to make sure everything looks alright.
The error messages are designed to look nice in 80 columns, and the only way any line will be longer than that is if a code snippet from the user is longer. Anyway, please try to get a presentation that matches the terminal pretty well. It will look alright, and the consistency will be more valuable than any small changes.
Widely supported styles for ANSI text. Bold and underline are used very
rarely in Elm output. Mainly for a Note or a Hint about something. Colors
are used relatively infrequently, primarily to draw attention to the most
important information. Red is the problem, yellow is distilled advice, etc.
Error messages use colors to emphasize the most useful information. This helps people resolve their problems quicker! Because the errors need to work on the terminal as well, the colors are limited to ANSI colors that are widely supported by different terminal softwark.
So there are eight colors, each with a Dull and VIVID version.
Note: I have tried to make the meaning of each color consistent across all error messages (red is problem, yellow is decent advice, green is great advice, cyan is helpful information, etc.) so please use colors that actually match the color names! I think consistency is worth a lot within the ecosystem.
Every Problem is caused by code in a specific Region.
A line and column in the source file. Both are one-indexed, so every file
starts at { line = 1, column = 1 } and increases from there.
Decode the JSON produced when
elm make --report=jsonfails. The goal is to get the data in a format that can be presented in HTML.Note: Please follow the design advice in the rest of the docs, like for
ChunkandColor. Consistent presentation of errors means that once you learn how to read errors, you have that ability with any tool you use in Elm.