You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the autodetected cradle is wrong haskell-language-server-wrapper errors out and Emacs displays an error in the mini-buffer:
Server lsp-haskell:993022/starting exited with status exit(check corresponding stderr buffer for details). Do you want to restart it? (y or n)
This is a terrible error message. It tells me absolutely nothing useful. It doesn't even tell me enough to know whether I want to restart it. If I choose y then it fails to start again. If I choose n then I am left in a Haskell source file without a language server.
I've no idea what "corresponding stderr buffer means" but I'm experienced enough with Emacs to try C-b. Sure enough there is a buffer there called *lsp-haskell::stderr*. It contains the below. For some reason the "cradle" has decided it wants stack despite by project being cabal. I have written up that issue: Avi-D-coder/implicit-hie-cradle#11
Suggestions:
Don't ask whether I want to restart the server without telling me some useful information with which I can make my decision. Presenting me with the information in the stderr buffer would be a good start!
If the cradle was incorrectly determined then give me an option, within Emacs, to let me choose to switch the cradle type. Also tell me how I can write a hie.yaml. I don't want to have to go chasing all around the internet for this information.
Fix the cradle detection
I don't know where this issue falls between HLS and Emacs lsp-mode.
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.5.1.0, Git revision 745ef26f406dbdd5e4a538585f8519af9f1ccb09 (dirty) x86_64 ghc-8.10.7
Current directory: /home/tom/Haskell/remora
Operating system: linux
Arguments: ["--lsp","-d","-l","/tmp/hls.log"]
Cradle directory: /home/tom/Haskell/remora
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: Not found
ghc: 8.10.7
Consulting the cradle to get project GHC version...
Cradle requires stack but couldn't find it
Cradle {cradleRootDir = "/home/tom/Haskell/remora", cradleOptsProg = CradleAction: Stack}
Process lsp-haskell stderr finished
The text was updated successfully, but these errors were encountered:
For some reason the "cradle" has decided it wants stack despite by project being cabal. I have written up that issue: Avi-D-coder/implicit-hie-cradle#11
We have to document the discover logic, log it and let users override it.
But we are not working a lot around of implicit-hie cause we are waiting for another alternative to the actual mechanism to interact with the build tools, more robust which needs support from the build tools. The automatic discovery process would probably we moved and maybe changed.
When the autodetected cradle is wrong
haskell-language-server-wrapper
errors out and Emacs displays an error in the mini-buffer:This is a terrible error message. It tells me absolutely nothing useful. It doesn't even tell me enough to know whether I want to restart it. If I choose
y
then it fails to start again. If I choosen
then I am left in a Haskell source file without a language server.I've no idea what "corresponding stderr buffer means" but I'm experienced enough with Emacs to try
C-b
. Sure enough there is a buffer there called*lsp-haskell::stderr*
. It contains the below. For some reason the "cradle" has decided it wants stack despite by project being cabal. I have written up that issue: Avi-D-coder/implicit-hie-cradle#11Suggestions:
hie.yaml
. I don't want to have to go chasing all around the internet for this information.I don't know where this issue falls between HLS and Emacs
lsp-mode
.The text was updated successfully, but these errors were encountered: