-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Your environment
Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:
haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /home/melanie/.cabal/store/ghc-8.10.7/haskell-language-server-1.4.0.0-e-haskell-language-server-a5c013b61c50ee23e57b3b466678b998047567c6c45ad0b234b9c91d1b4bd48c/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.7.3
ghc: 9.0.1
Which OS do you use: Ubuntu via WSL
Which lsp-client do you use: VS Code
Describe your project (alternative: link to the project): any project (or $HOME)
Contents of hie.yaml:
cradle:
cabal:Steps to reproduce
Each time I run rm -rf $HOME/.vscode-server/data/User/globalStorage/haskell.haskell then reload VS Code on WSL and open a .hs file, the extension warns me that it is redownloading the binaries for HLS. This is despite the integrated terminal reporting
$ which haskell-language-server
$HOME/.cabal/bin/haskell-language-serverthat I installed with GHCup. Once the binaries finish downloading, I receive the error mentioned in haskell/haskell-language-server#236: Project requires GHC but it isn't installed, despite the integrated terminal reporting
$ which ghc
$HOME/.ghcup/bin/ghcExpected behaviour
VS Code should not download the prebuilt binaries, but should instead use the version of HLS found on the $PATH.
Actual behaviour
If the binaries in the extension folder do not exist, VS Code will automatically redownload them, failing to recognize the existing HLS installation.
Include debug information
Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:
Debug output: N/A
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs: Cradle requires cabal but couldn't find it
[client][ERROR] Error executing '$HOME/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.4.0-linux --project-ghc-version' with error code 1
[client][ERROR] stderr: Found "$HOME/hie.yaml" for "$HOME/a"
Cradle requires cabal but couldn't find it
Cradle {cradleRootDir = "$HOME", cradleOptsProg = CradleAction: Cabal}