Parallel make should interleave output if it means we can report an error earlier
Steps to reproduce:
- Take the example from #12347
- Run
ghc --makeand observe what order the modules are reported in (on my box the ordering isC,B, thenA) - Modify
Ato be a small, quick-to-compile module with a type error.module A where x = True Trueworks grand. - Run
ghc --make All A B C -j4 +RTS -N4
Expected result: ghc --make reports the error in A immediately
Actual result: ghc --make ponders for a while before reporting the error
An interesting way to mix up the experiment is to put the type error in C rather than A. Then indeed the error is reported early, but GHC fails to exit until some undetermined later time (it is certainly not waiting for the other threads to finish compiling, because you don't see object files being produced.)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |