haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.61k stars 351 forks source link

HLS 2.8 sometimes gets stuck on startup #4334

Open MangoIV opened 5 days ago

MangoIV commented 5 days ago

Your environment

Which OS do you use?

Nixos 24.11 Which version of GHC do you use and how did you install it? ghc 9.6 but also happens with 9.8 and 9.4, all of them distributed by nixpkgs

How is your project built (alternative: link to the project)? cabal

Which LSP client (editor/plugin) do you use? neovim + haskell-tools.nvim (native lsp)

Which version of HLS do you use and how did you install it? 2.8.0.0, installed via nixpkgs

Have you configured HLS in any way (especially: a hie.yaml file)? no

Steps to reproduce

It doesn't reproduce very well but here's how you can try: create a .hs file and immmediately start editing it, without waiting for the hls to start up

Expected behaviour

the hls starts up normally

Actual behaviour

the hls gets stuck parsing reporting an error that doesn't mirror the actual state of the file and does not recover.

Debug information

image

It also only happens on startup. If you wait for the hls to start up and only then start editing, everything is fine :)

fendor commented 2 days ago

Could you add some logs where this particular issue happens? Perferably with --debug?