Open MaybeJustJames opened 2 years ago
Can confirm, I got this too just today trying to make a PR for the stack
code base. (which uses nightly-2022-09-05
=> 9.2.4)
I have the same problem, also using ghcup. I’m not using stack btw.
Same problem, with a cabal cradle, on NixOS.
Found "/home/chris/step/hie.yaml" for "/home/chris/step/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.8.0.0 x86_64 ghc-9.0.2
Current directory: /home/chris/step
Operating system: linux
Arguments: ["--lsp"]
Cradle directory: /home/chris/step
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.9.1
ghc: 8.10.7
Consulting the cradle to get project GHC version...
Project GHC version: 9.2.4
haskell-language-server exe candidates: ["haskell-language-server-9.2.4","haskell-language-server"]
Launching haskell-language-server exe at:/run/current-system/sw/bin/haskell-language-server-9.2.4
[0;31mGHC ABIs don't match![0m
[0;31m[0m
[0;31mExpected: Cabal-3.6.3.0:4b7e5ec6bdf830a1a1b2a7dac58977f1 array-0.5.4.0:5b6490cad7f3f7572d546f8b609ab5e0 base-4.16.3.0:c5bc28c025beb0264fc8226e2c52585f binary-0.8.9.0:3467ec1ec9ebdf27d237041af2c1959c bytestring-0.11.3.1:c44471ca3ccd3f2648b7587883fa5a0c containers-0.6.5.1:dd9dffa29f32147b58e55bebae95b5db deepseq-1.4.6.1:b451808304261aa84576eec130791cfe directory-1.3.6.2:64781d8f03e3f773fe526d1b54e2f760 exceptions-0.10.4:27cbbb7404c2c0ba34b485760477a927 filepath-1.4.2.2:2ac1b495ac13ab732f61bdb6780f2373 ghc-9.2.4:eb044f2cd8245d00c6eb6ad0a7923734 ghc-bignum-1.2:dc85b95457973c61442221e0ffe629c6 ghc-boot-9.2.4:06c770350c8bb262c731d1ce5dc9465a ghc-boot-th-9.2.4:6e0652962643991014f7550becbbea0c ghc-compact-0.1.0.0:ee6e4afa050602a96a19159e340a5996 ghc-heap-9.2.4:9725793cbb0cb2cc322950ab7808b251 ghc-prim-0.8.0:4cc52b9ce520bef4b4b307f9c09dccc6 ghci-9.2.4:b3b17d1fe993276916c81079ee2af42d haskeline-0.8.2:169a7a5f58148d73b67a7d679caed78e hpc-0.6.1.0:dcb83814f92eaaa32e15e3662311653c integer-gmp-1.1:c1089126cca779e75e5d6be31dc98f1c libiserv-9.2.4:9dfbf9cddc1feda79c3cade1fea0a031 mtl-2.2.2:01acc56352d8d4a1aacf42ca6cafe798 parsec-3.1.15.0:f150c96d70dc28aaac57fa9309c6da55 pretty-1.1.3.6:4a9ca6916f9a09ea73c9f2d557de6dbe process-1.6.13.2:e8831e28f979c604cf2bdcc6343b82de rts-1.0.2: stm-2.5.0.2:698e4c9e1c98b38e7878ef6daed8fee0 template-haskell-2.18.0.0:784eaffa1a127ca0e0a038396ee6bade terminfo-0.4.1.5:f6ed3a81f33918a3be9cae13f6432b2b text-1.2.5.0:99994021d619a60e5b6415397ec203a0 time-1.11.1.1:2cce28be435d6102e981e97b8bf006dd transformers-0.5.6.2:0a1edf560a7bed14ad74083da63d8d51 unix-2.7.2.2:69bb008b1f37818f6f0cc676e496c776 xhtml-3000.2.2.1:18578e0711e6ce7eef4315f9539499f6[0m
[0;31mGot: Cabal-3.6.3.0:25fba52c40181697fb3e713992ed45ba array-0.5.4.0:76cdd7bd1dcdc69c94bfdba15e8c6113 base-4.16.3.0:492259c9903ba198330543adb282f19e binary-0.8.9.0:19180f1597293723d6217c1b90b9a79b bytestring-0.11.3.1:95d9031c73bb5ab340e841ae94b7477f containers-0.6.5.1:d846c7d4982e7805444e51e49c821b38 deepseq-1.4.6.1:f2c5dcf8a1579d80b359626ce3922368 directory-1.3.6.2:2afa15347f21158b34c50d342441fe98 exceptions-0.10.4:449bdd2288659954b3d3661c0bfc5745 filepath-1.4.2.2:95fde980ccf062e2759eef777034b682 ghc-9.2.4:13c6127884c444a4db15a246a1d47fa6 ghc-bignum-1.2:424a60c92296b6bf9df03965d6ca0a47 ghc-boot-9.2.4:2c7847162f55498bdbe5c0ae3db13e30 ghc-boot-th-9.2.4:7a2b977da6aa46d333b6004068bbd6de ghc-compact-0.1.0.0:7561df05aadf78830874635c3ae72299 ghc-heap-9.2.4:a0908b55f604995fe69c160e7cea9fbd ghc-prim-0.8.0:7d885d3805aedfad6c36b0db5139905b ghci-9.2.4:a2679b996406f73602a4f6a54dff72fe haskeline-0.8.2:f0f5a6dace1caf18586980c4fae1f1e3 hpc-0.6.1.0:7ec88158e73323dde697d3ffe253f181 integer-gmp-1.1:6ed2368cc3d74394a7368eab0a8d36ca libiserv-9.2.4:2c2a3c06b41591dc323751c4f23a23c4 mtl-2.2.2:3919aa3264c0098cfadf7f6124c2beaf parsec-3.1.15.0:4ad227130bc0093d3786b2c6151ad6d9 pretty-1.1.3.6:4ed3595c419cfa732ac8d2e07e54900b process-1.6.13.2:6a60847e6df048da601c195db18388c0 rts-1.0.2: stm-2.5.0.2:567704c182ae9013dd80e8deb613efd8 template-haskell-2.18.0.0:17721f9d3e29b3d3faacf9841e5aa17e terminfo-0.4.1.5:4c5a84b3cdc499c8ffebe0138b1d1f1d text-1.2.5.0:69be2eead0f1bf0c6e932902aa79e76e time-1.11.1.1:ce0e124f467cbdad7f214af38af802fd transformers-0.5.6.2:58eb294318dbfc55aee264a787e08aea unix-2.7.2.2:b571b306c66cdbbd63b493aa3e92594a xhtml-3000.2.2.1:3f258f622e39511ac05a7f8f6d399fd1[0m
The problem in my case seems to have resulted from my Nix configuration: I was getting GHC from nixos-22.05
and haskell-language-server from nixos-unstable
.
Building from source via ghcup compile ... solved the problem for me.
I have the same problem. I'm also on Debian testing with these tool versions:
Tool versions found on the $PATH
cabal: 3.8.1.0
stack: 2.9.1
ghc: 9.2.4
Edit: I have been informed that I can build using source from git instead of from hackage using this variation of the compile command which does work for me:
$ ghcup compile hls -g 1.8.0.0 --ghc 9.2.4
I'm not able to compile hls myself due to this error which I have no idea how to resolve:
$ ghcup compile hls -v 1.8.0.0 --ghc 9.2.4
[ Info ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file /home/jesse/.ghcup/cache/ghc
up-0.0.7.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[ Warn ] New ghc version available. To upgrade, run 'ghcup install ghc 9.4.2'
Downloading haskell-language-server-1.8.0.0
Downloaded haskell-language-server-1.8.0.0
Unpacking to haskell-language-server-1.8.0.0/
[ Info ] Building HLS 1.8.0.0 for GHC version 9.2.4
[ cabal ] After searching the rest of the dependency tree exhaustively, these were the
[ cabal ] goals I've had most trouble fulfilling: haskell-language-server,
[ cabal ] hls-plugin-api, hls-stylish-haskell-plugin,
[ cabal ] haskell-language-server:stylishhaskell
[ cabal ] Try running with --minimize-conflict-set to improve the error message.
[ cabal ]
[ Error ] BuildFailed failed in dir /home/jesse/.ghcup/tmp/ghcup-37449d1c45c8e46c/haskell-language-server-1.8.0.0: Process "cabal" with argu
ments ["v2-install",
[ ... ]
"-w",
[ ... ]
"ghc-9.2.4",
[ ... ]
"--install-method=copy",
[ ... ]
"--overwrite-policy=always",
[ ... ]
"--disable-profiling",
[ ... ]
"--disable-tests",
[ ... ]
"--installdir=/home/jesse/.ghcup/tmp/ghcup-37449d1c45c8e46c/haskell-language-server-1.8.0.0/out/9.2.4",
[ ... ]
"--project-file=cabal.project",
[ ... ]
"exe:haskell-language-server",
[ ... ]
"exe:haskell-language-server-wrapper"] failed with exit code 1.
I've tried uninstalling and reinstalling tools through ghcup in different orders, deleting ~/.cabal
and ~/.stack
and running cabal update
fresh.
I have not tried different ghc versions because the project I am working on requires 9.2.4.
Does anyone know how to get a haskell-language-server from Nix for a given compiler? Our project's stack.yaml / snapshot.yaml specify ghc-9.2.4
and lts-20.1
just fine but getting an HLS binary to match has proven tricky and is causing Haskell support in VS Code to crash.
Also, https://github.com/haskell/haskell-language-server/issues/1926#issuecomment-1333685252 may be relevant.
I've hit the same error as OP with HLS 1.9.1.0 since upgrading to GHC 9.4.4, with everything being installed via GHCUp. What's very odd is that the failure seems to depend on which HLS is set as the default, rather than which one is actually used:
ghcup set hls 1.9.1.0
, both haskell-language-server-wrapper-1.9.0.0
and haskell-language-server-wrapper-1.9.1.0
exhibit the GHC ABIs don't match!
issue.ghcup set hls 1.9.0.0
, both commands work.I'm on Manjaro Linux, which uses the Fedora GHC binaries.
@hasufell Since this seems like it could be a GHCUp distribution issue, any ideas?
@georgefst #3497
Thanks! Good to see that the problem is known and understood (even if it doesn't explain most earlier comments in this thread).
This has recently started happening to me again with GHC 9.6.4
.
I had the same happen recently with 9.6.3 and 9.6.4, yeah 🤔
When working on the password
library to update it to accept base64-1.0
, I bumped the Stack LTS and when using 9.6.3/4 it kept complaining about mismatching ABI, so I used 9.4.8 locally.
Confirmed that reverting my LTS snapshot to point to 9.4.x fixes the issue, and my LSP boots now.
@fosskers If you use stack, then the HLS binaries may not be compatible. This is known, because stack doesn't pick GHC bindists as ghcup does.
You can fix that with the stack-ghcup integration: https://www.haskell.org/ghcup/guide/#strategy-1-stack-hooks-new-recommended
Oh interesting, thank you.
Confirmed! My stack
is now using GHC's pulled via ghcup
. And hls
uses these newer GHCs without issue. Thank you.
Your environment
Which OS do you use? Debian Testing Which version of GHC do you use and how did you install it? 9.2.4 with ghcup (reinstalled) How is your project built (alternative: link to the project)? Cabal (https://github.com/MaybeJustJames/zephyr)
Which LSP client (editor/plugin) do you use? Emacs+lsp-mode Which version of HLS do you use and how did you install it? 1.8.0.0 from ghcup Have you configured HLS in any way (especially: a
hie.yaml
file)? NoSteps to reproduce
run
haskell-language-server-wrapper -d --lsp
Expected behaviour
Should start lsp server and not produce errors
Actual behaviour
Says
GHC ABIs don't match!
and quits.Debug information
Full output from running
haskell-language-server-wrapper -d --lsp
: