ee46d43f

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

Mutation: read interface pragmas while instrumenting

The constructor-alias recognition added two commits ago reads the unfolding
GHC recorded for an imported binding.  -O0 implies -fignore-interface-pragmas,
which drops unfoldings as interfaces are read, and addManifest compiles
instrumented libraries at -O0 on purpose -- so the recognition silently did
nothing in exactly the configuration mutation testing runs in.  Every
Map.empty in a real codebase still got its unkillable mutant.

It looked like it worked because of a second bug.  This repo's overlay adds
--ghc-options=-O2 to every package in it, and Cabal passes that through after
its own optimisation flag, so addManifest's --disable-optimization was
overridden and the example -- the only thing the recognition was tested
against -- compiled at -O2, where unfoldings are read.  addManifest now passes
-O0 last, which makes the intent hold whatever the package asked for and puts
the example on the same footing as its users.  With that alone the example
regains the Map.empty -> Tip mutant, reproducing what nix-ci sees.

So the driver plugin unsets Opt_IgnoreInterfacePragmas.  Reading unfoldings
does not run the simplifier, so the compile-time blowup -O0 is there to avoid
does not come back with them, and the committed manifests are unchanged: the
-O0-with-unfoldings build produces exactly what the -O2 build did.
forwardCompatibilitymutation-manifest-examplemutation-sydtest-mutation-examplemutation-sydtest-mutation-example-crosspre-commitreleaseshellconfiguredeploy:release-to-hackagedevShelldefaultmutation-sydtest-mutation-example-diffrelease-to-hackagex86_64-linux