haskell / haskell-language-server

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

HLS >= 2.6 never prints any diagnostics for a bigger project #4108

Closed carbolymer closed 8 months ago

carbolymer commented 8 months ago

Your environment

Which OS do you use?

ArchLinux

Which version of GHC do you use and how did you install it?

9.8.2 from GHCUp

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

cabal, see repro steps

Which LSP client (editor/plugin) do you use?

Neovim + haskell-tools.nvim

Which version of HLS do you use and how did you install it?

2.7.0.0 from https://aur.archlinux.org/packages/haskell-language-server-static

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

Using default configuration and this hie.yaml: https://github.com/input-output-hk/fusion-flamingo/blob/mgalazyn/hls-2.7-test/hie.yaml

Steps to reproduce

  1. You need to have blst, sodium and secp256k1 installed on your system to successfully compile cardano-node: https://github.com/input-output-hk/cardano-node-wiki/wiki/install#installing-dependencies

  2. Clone sample repository with the submodules:

    git clone --depth 1 --branch mgalazyn/hls-2.7-test --recurse-submodules -j8 git@github.com:input-output-hk/fusion-flamingo.git
  3. Enable direnv configuration. Build the project.

    cd fusion-flamingo
    direnv allow
    cabal build all
  4. Open your editor in the cardano-node working directory, and open the file cardano-testnet/src/Parsers/Run.hs. I'm using neovim:

    cd cardano-node
    nvim cardano-testnet/src/Parsers/Run.hs

Expected behaviour

Diagnostics are eventually shown.

Actual behaviour

Diagnostics are never shown, HLS is stuck on 100% CPU usage.

The issue occurs on HLS >= 2.6. HLS 2.5 + GHC 9.6.3 is working fine.

Debug information

0-haskell-language-server.log

michaelpj commented 8 months ago

Seems similar to https://github.com/haskell/haskell-language-server/issues/4046

carbolymer commented 8 months ago

@michaelpj Thanks for linking that issue. I think this one's a duplicate then. I've applied this patch https://github.com/haskell/haskell-language-server/issues/4046#issuecomment-1926242056 and my HLS works again. I'll close this issue in favour of #4046.