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.

Total

1m26s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 13s 13s 15s 0s
Build 13s 23s 16s 30s 0s
Deploy 1m14s 12s 12s 1m26s 44s
Suite 0s 50s 1m26s 1m26s 44s

Timeline

Config Eval Build Deploy Compressed gap
0s10s20s30s1m20s