Description
Describe the bug
This is a regression starting with 3.14. The bug is not present in 3.12.
Compiling ghc-lib-parser
as a dependency of a project fails with
compiler/GHC/Parser/PostProcess/Haddock.hs:72:1: error: [GHC-58427]
attempting to use module `ghc-lib-parser-9.8.5.20250214-inplace:GHC.Parser' (.../dist-newstyle/build/x86_64-freebsd/ghc-9.8.4/ghc-lib-parser-9.8.5.20250214/build/GHC/Parser.hs-boot) which is not loaded
|
72 | import {-# SOURCE #-} GHC.Parser (parseIdentifier)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It only happens with jobs: 1
in the Cabal's config.
To Reproduce
Steps to reproduce the behavior:
- With a default Cabal config
cabal init -n foo && cd foo
- Add
ghc-lib-parser == 9.10.2.20250503
into foo'sbuild-depends
. cabal build -j1
Expected behavior
The build succeeds even with -j1
.
System information
- FreeBSD, Linux
cabal-3.14.2.0
ghc-9.8.4
ghc-9.6.7
ghc-lib-parser-9.10.2.20250503
ghc-lib-parser-9.8.5.20250214
ghc-lib-parser-9.12.1.20250105
Additional context
I noticed that when building with jobs > 1
, the log says
[ X of 447] Compiling ...
when compiling the ghc-lib-parser
package.
But building with -j1
prints
[ X of 446] Compiling ...
in the same case. That missing module is exactly GHC.Parser[boot]
that is causing the compilation to fail.
Here are some full logs from the FreeBSD package building cluster that initially triggered this problem:
https://pkg-status.freebsd.org/beefy22/data/142amd64-default/59b226438e8b/logs/hs-haskell-language-server-2.10.0.0_2.log
https://pkg-status.freebsd.org/beefy22/data/142amd64-default/bccdadf9a3a6/logs/hs-ormolu-0.7.7.0_1.log