Open hasufell opened 2 years ago
Also note that fixing ABI stability seems to be impossible according to @bgamari due to cross module optimization of GHC, so we're left with fixing this through distribution.
A few other somewhat-related issues that @hasufell pointed me to on Matrix for anyone else interested in this:
The stack PR with ghc installation hooks was merged... so we should be able to guide users on how to install GHC through ghcup via stack in the future to avoid these types of issues again: https://github.com/commercialhaskell/stack/pull/5585
I'm in the early stages of learning haskell and ran into this issue on my first attempt at creating a project. I asked about it on SO and was eventually pointed to this issue. While I understand the problem well enough, I don't understand the solution, if indeed the GHC installation hooks PR is that. Would you mind laying it out for a newbie with only a vague sense of the haskell toolchain or pointing to existing docs that do just that? I get that your PR was just merged and as such isn't in the latest stack release, and I'm not sure building stack myself is a great idea at this point in my learning exercise, but maybe you could answer assuming the PR has been released or however you think is most appropriate.
@thisisrandy see https://github.com/haskell/vscode-haskell#ghc-abis-dont-match
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: https://github.com/haskell/ghcup-metadata/commit/88696a0cc5ebb8fe5b15662f6a840be7c1cdd699
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: https://github.com/haskell/haskell-language-server/blob/6742c205c8386a2898d3a8baa830ecc75713845d/bindist/wrapper.in#L77
This begs the question on how to deal with such diverging ABI. I see a couple of potential solutions:
haskell-language-server-<ghcver>-<abihash>
Also note that there may be other cases where ghcup and stack bindists diverge, e.g. because they have different platform detection logic.