Liking cljdoc? Tell your friends :D

hive-gimp.doctor.verdict

PROMOTE. The doctor's judgements, as pure functions over values.

Separated from hive-gimp.doctor, which runs the stages and touches the transport. The judgements are the part worth pinning: whether GIMP 2.10 is acceptable, what an unreadable version means, whether a newer major is a refusal or a warning. Behind an I/O call those cases are awkward to reach and end up untested; over a value they are three lines each.

The version gate is the reason this namespace exists. The command contract is derived from a GIMP 3.x plugin (Gimp.get_images, Gegl.Color, PyGObject). GIMP 2.10 exposes a different Python API entirely (pdb.gimp_*, gimpfu), so against a 2.10 host the failures surface deep inside GIMP and read as nonsense. Saying so before the first command is the whole point.

Portable (.cljc since 2026-09-20): clojure.string only. hive-gimp.doctor, which runs the stages, is the part that needs a host.

PROMOTE. The doctor's judgements, as pure functions over values.

Separated from `hive-gimp.doctor`, which runs the stages and touches the
transport. The judgements are the part worth pinning: whether GIMP 2.10 is
acceptable, what an unreadable version means, whether a newer major is a
refusal or a warning. Behind an I/O call those cases are awkward to reach
and end up untested; over a value they are three lines each.

The version gate is the reason this namespace exists. The command contract
is derived from a GIMP 3.x plugin (`Gimp.get_images`, `Gegl.Color`,
PyGObject). GIMP 2.10 exposes a different Python API entirely (`pdb.gimp_*`,
`gimpfu`), so against a 2.10 host the failures surface deep inside GIMP and
read as nonsense. Saying so before the first command is the whole point.

Portable (.cljc since 2026-09-20): clojure.string only. `hive-gimp.doctor`,
which runs the stages, is the part that needs a host.
raw docstring

connection-hintclj/s

(connection-hint reason)

What to do about a failed connection, keyed by the reason the pipeline reported.

A pure table rather than a case inside the stage, so adding a reason is a data change and so the mapping can be asserted exhaustively.

What to do about a failed connection, keyed by the reason the pipeline
reported.

A pure table rather than a `case` inside the stage, so adding a reason is a
data change and so the mapping can be asserted exhaustively.
sourceraw docstring

find-versionclj/s

(find-version payload)

A version out of whatever shape get_gimp_info answered with.

Walks the payload rather than reading a fixed path, for the reason above: the useful field moves between GIMP releases, and a doctor that cannot find the version is a doctor that reports unknown on a perfectly good install.

A version out of whatever shape `get_gimp_info` answered with.

Walks the payload rather than reading a fixed path, for the reason above:
the useful field moves between GIMP releases, and a doctor that cannot find
the version is a doctor that reports `unknown` on a perfectly good install.
sourceraw docstring

parse-versionclj/s

(parse-version s)

A version string to {:major :minor :patch :raw}, or nil.

Takes the first thing that looks like a version anywhere in the string. The plugin reports its version through several different accessors depending on the GIMP release, and none of them is guaranteed to be present, so matching a fixed prefix would fail on exactly the hosts that need diagnosing.

A version string to `{:major :minor :patch :raw}`, or nil.

Takes the first thing that looks like a version anywhere in the string. The
plugin reports its version through several different accessors depending on
the GIMP release, and none of them is guaranteed to be present, so matching
a fixed prefix would fail on exactly the hosts that need diagnosing.
sourceraw docstring

summarizeclj/s

(summarize stages)

The one line a reader should act on: the first required stage that failed.

Optional stages are excluded, because a doctor that reports red for an optional capability trains its reader to ignore it.

The one line a reader should act on: the first required stage that failed.

Optional stages are excluded, because a doctor that reports red for an
optional capability trains its reader to ignore it.
sourceraw docstring

supported-majorclj/s

The GIMP major version this command contract describes.

The GIMP major version this command contract describes.
sourceraw docstring

version-verdictclj/s

(version-verdict version)

Whether a detected version is one this contract can drive.

Four outcomes, not two. unknown and too old are both not ok but call for opposite responses: one says proceed and treat failures as suspect, the other says stop and install a different GIMP.

Whether a detected version is one this contract can drive.

Four outcomes, not two. `unknown` and `too old` are both `not ok` but call
for opposite responses: one says proceed and treat failures as suspect, the
other says stop and install a different GIMP.
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