9c04f864

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Type the paths and the errors, and refuse three ways of answering nothing

Three commands answered a question they could not answer, and said so with
an exit code of nought.

`explain` on a name no rule answers to printed its complaint on stdout and
succeeded, so a caller could not tell it from an explanation. It also told a
repository that a rule it had turned off was not in this build at all, which
sends a reader looking for a typo they did not make. It now says the rule is
off, and refuses only a name nothing answers to.

`judge` with no reports at all succeeded, so a wiring mistake that passed
nothing would go green having read nothing. Its argument is a NonEmpty now, so
the empty case is unrepresentable rather than checked.

`check` on a path that is not a directory died inside a directory walk with a
GHC backtrace, before any report had been written, which is the one thing the
producing-and-judging split exists to prevent.

Discovery's errors are a type with a renderer rather than sentences built
where they are raised, so a new way of failing is a constructor every site has
to reconsider. Paths are `path` and `path-io` throughout the library: the
report directories, the artifact trees and the choices file are typed and
resolved at the command line boundary the way source roots already were, and
existence comes from `forgivingAbsence` rather than a question asked before an
operation that answers it anyway. `-Wunused-packages` then says the library
needs neither `directory` nor `temporary`. What is left of `System.FilePath`
is two qualified uses on strings this tool did not write: GHC's recorded
source path, and Cabal's `extra-source-files` globs, both parsed into `Path`
straight after.

Every corpus number is now accounted for in plan/context.md, one at a time and
by hand, rather than two columns marked unexplained. sydtest's three non-zero
rows are one fact: `sydtest-mutation-runtime` has no gen package. centjes's 23
obligations are types with no `genValidSpec` anywhere in that repository.
Neither moves with artifacts, so they are answers rather than floors. nix-ci's
adoption debt is 25 and had been recorded as 27.

AGPL-3.0-or-later, matching marginalia, which is the sibling tool of the same
kind.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 32s 1s 1s 33s 32s
Eval 54s 12s 12s 1m06s 20s
Build 59s 0s - - 0s
Suite 32s 13s - - 2h34m12s