haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

Cannot use hie-wrapper and so on the language server cannot be initialized #1800

Closed zoedsoupe closed 3 years ago

zoedsoupe commented 3 years ago

OS: Manjaro GNOME Package: haskell-ide-engine v1.4-1 AUR

I cannot start haskell language server, on COC nvim gives me this error:

[coc.nvim] The "languageserver.haskell" server crashed 5 times in the last 3 minutes. The server 
will not be restarted.

and when I mannually exec hie-wrapper, I get this error:

2020-08-11 10:16:23.990300802 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 1.4, Git revision f78c39c03b7b83beddfcdaf36ebeb8c9f7a22b0f (dirty) (21 commits) x86_64 ghc-8.8.3
2020-08-11 10:16:23.991003077 [ThreadId 4] - Current directory:/home/mdsp/la
2020-08-11 10:16:23.991169421 [ThreadId 4] - Operating system:linux
2020-08-11 10:16:23.991256829 [ThreadId 4] - args:["--lsp"]
2020-08-11 10:16:23.992698213 [ThreadId 4] - Could not find a Project for file: /home/mdsp/la/File.hs
2020-08-11 10:16:23.992791358 [ThreadId 4] - Module "/home/mdsp/la/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/mdsp/la", cradleOptsProg = CradleAction: Direct}
2020-08-11 10:16:23.992906645 [ThreadId 4] - Cradle directory:/home/mdsp/la
2020-08-11 10:16:23.993132242 [ThreadId 4] - Executing GHC on path with args: --numeric-version
2020-08-11 10:16:24.04427214 [ThreadId 4] - Project GHC version:8.8.4
2020-08-11 10:16:24.0444505 [ThreadId 4] - hie exe candidates :["hie-8.8.4","hie-8.8","hie"]
2020-08-11 10:16:24.045194867 [ThreadId 4] - cannot find any hie exe, looked for:hie-8.8.4, hie-8.8, hie

When I try to use hie- command, this is the output: Screenshot from 2020-08-11 10-20-00

fendor commented 3 years ago

You are missing the executable hie-8.8.4! It is crucial to use the same ghc version to compile hie and for the project you are using. Even minor version changes might have problems. I dont think we support ghc 8.8.4 and since most of our efforts have shifted to support https://github.com/haskell/haskell-language-server/, we will probably not start supporting it. Patches are welcome, though. Either downgrade your ghc version, or switch to hls/ghcide for which support will be implemented.

zoedsoupe commented 3 years ago

Oh, ok, I completely understand, I'm new to the haskell world. How I could downgrade my ghc?

fendor commented 3 years ago

@Mdsp9070 That depends on how you installed it, unfortunately! If you are using ghcup, you should be able to do something like ghcup install 8.8.3 && ghcup set 8.8.3. Ubuntu can use hvr:ppa https://launchpad.net/~hvr/+ppa-packages and other package managers have different invocations

zoedsoupe commented 3 years ago

Thank you! Was exactly what I need!