Build fails on WASM
Got a failure when building ghc-lib-parser with GHC WASM. Not sure if it's a ghc-lib-parser issue or a GHC WASM issue, but I figured I'd start here
https://github.com/fourmolu/fourmolu/actions/runs/17982289343/job/51151331706?pr=490
Failed to build ghc-lib-parser-9.12.2.20250421.
compiler/GHC/Tc/Errors/Ppr.hs:44:1: error: [GHC-61948]
Could not find module ‘GHC.Internal.TH.Ppr’.
Perhaps you meant
GHC.Internal.TH.Lib (from ghc-internal-9.1202.0)
GHC.Internal.Ptr (from ghc-internal-9.1202.0)
GHC.Internal.TH.Lift (from ghc-internal-9.1202.0)
Use -v to see a list of the files searched for.
|
44 | import qualified GHC.Internal.TH.Ppr as TH
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
what's the build compiler version? i see
if impl(ghc < 9.12.1)
hs-source-dirs:
libraries/ghc-internal/src
libraries/ghc-boot-th-internal
exposed-modules:
GHC.Internal.ForeignSrcLang
GHC.Internal.LanguageExtensions
GHC.Internal.Lexeme
GHC.Internal.TH.Syntax
GHC.Internal.TH.Ppr
GHC.Internal.TH.PprLib
GHC.Internal.TH.Lib.Map
in that cabal file. you might try doing surgery on it to see if we can wriggle past this problem?do let us know!
Oh is that new? This is with ghc-9.12.2.20250922. It passed on an earlier run that used ghc-9.12.2.20250828.
that's a regression in upstream 9.12.3-rc1; the wasm releases are always rebased on upstream release branches. also see https://gitlab.haskell.org/ghc/head.hackage/-/blob/master/patches/ghc-lib-parser-9.12.2.20250421.patch#L31
@TerrorJack Thanks, how do I apply that patch in my build?
a source-repository-package for the time being; though maybe doing an upstream hackage release on the 9.12 branch would solve this?
Pinning GHC WASM seems to have worked for now: https://github.com/fourmolu/fourmolu/commit/f2787f8d2b849e699e86d717626bd92405307c44