Liking cljdoc? Tell your friends :D

hive-elm.report

Promote: the output of elm make --report=json to a Report value, and a Report to the text an LLM reads. Pure.

Wire shapes, measured against elm 0.19.1 (fixtures in test/resources/elm):

{"type" "compile-errors" "errors" [{"path" abs "name" module "problems" [{"title" s "region" {"start" {"line" n "column" n}} "message" [chunk ...]}]}]} {"type" "error" "path" "elm.json" "title" s "message" [chunk ...]}

A chunk is a string, or a styled span {"string" s "color" ... "bold" ...}. The report is written to stderr; stdout carries progress only.

Promote: the output of `elm make --report=json` to a Report value, and a
Report to the text an LLM reads. Pure.

Wire shapes, measured against elm 0.19.1 (fixtures in test/resources/elm):

  {"type" "compile-errors"
   "errors" [{"path" abs "name" module
              "problems" [{"title" s "region" {"start" {"line" n "column" n}}
                           "message" [chunk ...]}]}]}
  {"type" "error" "path" "elm.json" "title" s "message" [chunk ...]}

A chunk is a string, or a styled span {"string" s "color" ... "bold" ...}.
The report is written to stderr; stdout carries progress only.
raw docstring

chunk-textclj

(chunk-text chunk)
source

decodeclj

(decode s)

The JSON object in s, or nil when s is not one.

The JSON object in `s`, or nil when `s` is not one.
sourceraw docstring

failed?clj

(failed? report)
source

fingerprintclj

(fingerprint report)

Identity of a report's problems: equal for the same failure seen twice.

Identity of a report's problems: equal for the same failure seen twice.
sourceraw docstring

headlineclj

(headline {:problem/keys [title] :as p})
source

locationclj

(location {:problem/keys [path line column]})

src/Main.elm:11:8, as far as the problem is located.

`src/Main.elm:11:8`, as far as the problem is located.
sourceraw docstring

max-raw-charsclj

Cap on non-JSON compiler output kept as a problem message.

Cap on non-JSON compiler output kept as a problem message.
sourceraw docstring

message-textclj

(message-text chunks)

The plain text of a styled message: colours and underlines dropped.

The plain text of a styled message: colours and underlines dropped.
sourceraw docstring

problems-ofclj

(problems-of root decoded)

Every problem in a decoded report, in compiler order.

Every problem in a decoded report, in compiler order.
sourceraw docstring

relativizeclj

(relativize root path)

path relative to root when it lies under it, else path unchanged.

`path` relative to `root` when it lies under it, else `path` unchanged.
sourceraw docstring

renderclj

(render report)
(render report
        {:keys [max-problems max-chars] :or {max-problems 3 max-chars 4000}})

The report as text for a reader that cannot see the terminal. At most :max-problems problems (default 3) and :max-chars characters (default 4000); what was left out is counted, never silently dropped.

The report as text for a reader that cannot see the terminal. At most
`:max-problems` problems (default 3) and `:max-chars` characters
(default 4000); what was left out is counted, never silently dropped.
sourceraw docstring

render-problemclj

(render-problem p)
source

report-ofclj

(report-of root {:keys [exit err] :as result})

The Report for a finished compiler process {:exit :out :err}.

The Report for a finished compiler process `{:exit :out :err}`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close