Closed joseedil closed 10 months ago
Yep, this is probably a bug in how we handle that value. Will be fixed like everything else with https://github.com/haskell/lsp/pull/458
To update, I was using Mitsuharu's emacs port by compiling it myself.
Using the homebrew pre-compiled binary made it work OK, even though this processId: null
is still happening.
Using the homebrew pre-compiled binary made it work OK, even though this
processId: null
is still happening.
It is valid to have null but I just fixed it in lsp-mode.el
Right, so lsp-mode isn't sending null any more, so that won't trigger the bug in HLS. That's good for now, and hopefully we'll fix it up so we accept the valid input later.
Should be fixed in HLS now anyway
Your environment
Which OS do you use? MacOS 12.6.1 Which version of GHC do you use and how did you install it? 9.0.2 from ghcup How is your project built (alternative: link to the project)? stack (resolver: lts-19.33) - ghc 9.0.2
Which LSP client (editor/plugin) do you use? emacs+eglot (but the same happens on 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)?Steps to reproduce
Create new project with
stack new my-project new-template
. Adjust resolver to lts-19.33 Open project with emacs and load eglot.Expected behaviour
LSP server should connect to haskell-language-server and do its thing.
Actual behaviour
The client indeed connects to the server, but it crashes whenever you try to use it. For instance, open
src/Lib.hs
and hover over theputStrLn
usage to get typing information and the server crashes with a message similar toServer lsp-haskell:32993/starting exited (check corresponding stderr buffer for details). Do you want to restart it? (y or n)
Restarting the server makes it work for a few seconds and crash again in the same manner.
Not sure if the issue is related to haskell-language-server itself or the emacs client.
The VS Code extension works fine in the same project taking the same server from ghcup.
Debug information
stderr output
Notice the error in the last line.
LSP log: lsp-haskell:32993
Notice the
processId: null
at the beginning. In that specific session haskell-language-server had pid 32993.Emacs config
Relevant snippet from my emacs config file