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
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 the putStrLn usage to get typing information and the server crashes with a message similar to Server 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.
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.8.0.0 x86_64 ghc-9.4.2
Current directory: /Users/jose.edil/2-development/haskell/helloworld
Operating system: darwin
Arguments: ["--lsp"]
Cradle directory: /Users/jose.edil/2-development/haskell/helloworld
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.8.1.0
stack: 2.9.1
ghc: 9.0.2
Consulting the cradle to get project GHC version...
Project GHC version: 9.0.2
haskell-language-server exe candidates: ["haskell-language-server-9.0.2","haskell-language-server"]
Launching haskell-language-server exe at:/Users/jose.edil/.ghcup/bin/haskell-language-server-9.0.2
2022-11-17T02:39:38.738801Z | Info | No log file specified; using stderr.
2022-11-17T02:39:38.739711Z | Info | haskell-language-server version: 1.8.0.0 (GHC: 9.0.2) (PATH: /Users/jose.edil/.ghcup/hls/1.8.0.0/lib/haskell-language-server-1.8.0.0/bin/haskell-language-server-9.0.2)
2022-11-17T02:39:38.740439Z | Info | Directory: /Users/jose.edil/2-development/haskell/helloworld
2022-11-17T02:39:38.740764Z | Info | Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas
, LSPRecorderCallback
, rename
, ghcide-completions
, class
, refineImports
, splice
, changeTypeSignature
, qualifyImportedNames
, alternateNumberFormat
, hlint
, ghcide-code-actions-fill-holes
, floskell
, ghcide-extend-import-action
, codeRange
, haddockComments
, importLens
, retrie
, ghcide-type-lenses
, ghcide-code-actions-imports-exports
, ghcide-hover-and-symbols
, eval
, gadt
, fourmolu
, tactics
, callHierarchy
, stylish-haskell
, ghcide-code-actions-type-signatures
, ghcide-code-actions-bindings
, moduleName
, ormolu
, ghcide-core
, explicitFixity ]
2022-11-17T02:39:38.744893Z | Info | Logging heap statistics every 60.00s
2022-11-17T02:39:38.846623Z | Info | Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
PluginIds: [ pragmas
, LSPRecorderCallback
, rename
, ghcide-completions
, class
, refineImports
, splice
, changeTypeSignature
, qualifyImportedNames
, alternateNumberFormat
, hlint
, ghcide-code-actions-fill-holes
, floskell
, ghcide-extend-import-action
, codeRange
, haddockComments
, importLens
, retrie
, ghcide-type-lenses
, ghcide-code-actions-imports-exports
, ghcide-hover-and-symbols
, eval
, gadt
, fourmolu
, tactics
, callHierarchy
, stylish-haskell
, ghcide-code-actions-type-signatures
, ghcide-code-actions-bindings
, moduleName
, ormolu
, ghcide-core
, explicitFixity ]
2022-11-17T02:39:38.846958Z | Info | Starting server
2022-11-17T02:39:38.848191Z | Error | Got error while decoding initialize:
Error in $.params.processId: parsing Int32 failed, expected Number, but encountered Object
LSP log: lsp-haskell:32993
Notice the processId: null at the beginning.
In that specific session haskell-language-server had pid 32993.
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.
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
The text was updated successfully, but these errors were encountered: