haskell / haskell/haskell-language-server
better error reporting for cradle failure (`stack setup --silent` case)
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
I don't have stack set up on my machine, did a clean checkout of this repo, configured and built with cabal, and when I try to open `../ghcide/test/src/Development/IDE/Test.hs` I get told the language server exited, and the following shows up in the `*lsp-haskell::stderr*` buffer.
```
Current directory: /Users/alanzimm/repos/haskell/haskell-language-server
Operating system: darwin
Arguments: ["--lsp","-d","-l","/var/folders/vy/nf8sc07944324wf17pg48m2r0000gn/T/hls.log"]
Cradle directory: /Users/alanzimm/repos/haskell/haskell-language-server
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.1.3
ghc: 8.10.3
Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Error when calling stack exec --silent ghc -- --numeric-version","",""]}
Process lsp-haskell stderr<3> finished
```
### Your environment
Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`:
```sh
haskell-language-server --probe-tools
haskell-language-server version: 0.5.1.0 (GHC: 8.10.2) (PATH: /Users/alanzimm/.cabal/store/ghc-8.10.2/hskll-lngg-srvr-0.5.1.0-9b087dc4/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.1.3
ghc: 8.10.3
```
Which lsp-client do you use: emacs lsp-mode
Describe your project (alternative: link to the project):
Contents of `hie.yaml`: none
### Steps to reproduce
Make a clean checkout of this repo at f03a7fa55d909c864771f0989abace8793b5b15a, build it, and open the designated file
### Expected behaviour
It should start up properly
### Actual behaviour
I get `Server lsp-haskell:793 status:starting exited with status exit. Do you want to restart it? (y or n)`, and the log at the top
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.