Skip to content

WIP: Make the parallel --make driver fine grained and increase parallelism

This implements the fine-grained parallel --make driver as outlined in #14095

This is ready for review and in the testing so far it works. It can successfully compile the ghc (via cabal build), and the Cabal lib (in 80% of time).

But its testsuite coverage is poor since the majority of --make mode tests dont run in parallel (-j)

There are two easy solutions to increase the coverage

  • make all the multimod_compile* tests run with -j flag as well
  • or perhaps get rid of the upsweep and always use parUpsweep, thereby ensuring only one API runs in the --make mode

Even after doing these there would be still be some missing scenarios, which would need to be figured out and tests added for them.

Change in behavior

In case of an error in the PostTc stage (like desugar), the typechecking of the entire set of modules would still happen (ie it will not stop at the module where error happened). This could be an unexpected behavior as the user would expect the error to cause the compilation to exit early.

This is build on top of !5555 (closed) and !5578 (closed)

TODOs:

  • Thoroughly test the code
  • are either individually buildable or squashed
  • have commit messages which describe what they do (referring to [Notes][notes] and tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places.
  • add a testcase to the testsuite.

Merge request reports