Skip to content

ABI mismatches of GHC bindists #2865

Open
@hasufell

Description

@hasufell

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:

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:

if [ "${ABI_HASHES}" != "${MY_ABI_HASHES}" ] ; then

This begs the question on how to deal with such diverging ABI. I see a couple of potential solutions:

  1. coordinate bindist updates with stack team
  2. 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>
  3. somehow integrate better with stack and require users to use ghcup for GHC installation (see Support custom GHC installation hooks commercialhaskell/stack#5585)
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions