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.
e2e-added-rule-is-rune2e-artifacts-are-reade2e-choices-are-found-beside-the-repositorye2e-cleane2e-dirty-package-is-judged-failinge2e-dirty-project-is-judged-failinge2e-dirty-report-is-readablee2e-disabled-rule-is-not-rune2e-incomplete-artifacts-are-a-failuree2e-judging-nothing-failse2e-named-packages-are-every-packagee2e-no-packages-is-judged-failinge2e-no-store-paths-in-findingse2e-paths-are-repository-relativee2e-withheld-facts-faile2e-wrong-source-mapping-is-a-complainthlint-checkhopinionhopinion-reads-what-the-compiler-wroteplanpre-commitreleaseshellweeder-checkconfiguredevShelldefaultx86_64-linux