66fb56ba

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

Discover cabal components at build time; drop sources arg from mutationCheck

The mutation Nix harness previously discovered executable and test-suite
component names at Nix evaluation time by regex-parsing the on-disk cabal
files reachable from a 'sources' list of source-tree roots passed to
'mutationCheck'. That required callers to enumerate every source root
that could contain a package, and could not see through hpack-generated
files unless they had been written to disk.

Add a tiny 'sydtest-cabal-components' helper executable that uses the
'Cabal' library to print the declared executable or test-suite component
names of a given cabal file. The mutation harness now runs that helper
inside the relevant derivations at build time:

  * 'addManifest.nix' parses the wrapped package's cabal file in
    postInstall to discover the executable names to install under
    '$out/bin'.
  * 'mutationCheck.nix's 'builtTestPkg' parses each test-package's
    cabal file in postInstall to discover and install test-suite exes
    under '$out/test'.
  * 'mutationCheck.nix' assembles the driver's YAML config inside
    'buildPhase' via 'jq', walking each test-package's installed test
    exes rather than enumerating suite names at evaluation time.

As a result, 'mutationCheck' no longer takes a 'sources' argument and
'cabalComponents.nix' is gone. The helper lives in 'sydtest-cabal-
components', excluded from the forward-compat 'sydtestReleaseWithoutMutation'
because the 'Cabal' API it uses moved on between GHC versions.

Suite timing

Time to Start Worker time Duration Time to finish
Config 5m04s 2s 2s 5m07s
Eval 5m10s 37s 37s 5m48s
Build 5m48s 8m28s - -
Test - - - -
Deploy - - - -
Suite 5m04s 9m09s - -