Open
Description
GHC 9.0.2 on linux and 9.2.2 on windows had missing profiling libs so @mpickering was so kind to supply me with fixed bindists.
These were added to ghcup: haskell/ghcup-metadata@88696a0
Since profiling seems to affect the ABI, this caused a number of issues:
- https://gitlab.haskell.org/ghc/ghc/-/issues/21423
- https://gitlab.haskell.org/ghc/ghc/-/issues/21423#note_424246
The latter being that stack with GHC 9.0.2 doesn't work with HLS, because they still use the old bindist without profiling libs, causing ABI mismatch in our wrapper script:
This begs the question on how to deal with such diverging ABI. I see a couple of potential solutions:
- coordinate bindist updates with stack team
- have hls-wrapper binary pick the correct ABI (in addition to correct GHC version) and ship multiple hls binaries, such as
haskell-language-server-<ghcver>-<abihash>
- somehow integrate better with stack and require users to use ghcup for GHC installation (see Support custom GHC installation hooks commercialhaskell/stack#5585)
- make compiling from source more robust, so that e.g. the VSCode extension could compile HLS from source on ABI mismatch instead of giving up
Also note that there may be other cases where ghcup and stack bindists diverge, e.g. because they have different platform detection logic.