Skip to main content

Module explain

Module explain 

Source
Expand description

Why a setting has the value it has.

hk’s config explain is the best of its kind in the fleet — it names the winning source and the exact identifier, and it does per-item provenance for lists. It also costs about two hundred lines, and it is written against a second merge function that exists only to answer this question. Two merges can disagree, and when they do the explanation describes a resolution that never happened.

Here there is one merge and its provenance is the answer, so this module is a renderer and nothing more. Every adopter gets the command; none of them writes it.

The output is plain text on purpose. A CLI that wants JSON has the same Resolved this reads and better taste than a library about what its own JSON should look like.

Functions§

explain
One setting explained: what it is, where it came from, and what else tried.
list
Every setting and its value, one per line, for a config ls.
warnings
Every warning the resolution produced, as lines.