A module with unused import makes HLS silently hang when importing another local module with TH macro #1705
Labels
component: ghcide
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
As the title describes, HLS hangs when the module includes unused import with
-Wall
and imports local modules with TH macro.The module to make HLS hang should contain moderate amount of codes; it seems HLS rarely hangs on a module with an import list only, or simple function definitions (this prevents me from generating minimal repro).
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:$ /Users/hiromi/Documents/Programming/Haskell/git/haskell-language-server/.stack-work/install/x86_64-osx/4f3a13fc4f2e266a081573ef2f2e7d824c6b6130ccbe92fb033c959869db066e/8.10.4/bin/haskell-language-server --probe-tools haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /Users/hiromi/Documents/Programming/Haskell/git/haskell-language-server/.stack-work/install/x86_64-osx/4f3a13fc4f2e266a081573ef2f2e7d824c6b6130ccbe92fb033c959869db066e/8.10.4/bin/haskell-language-server) (GIT hash: 3f8d33cb6d7148d63764bdf3b9d7dd5a31001426) Tool versions found on the $PATH cabal: 3.4.0.0 stack: 2.5.1 ghc: Not found
Note: it hangs with HLS 1.0.0 and similar error occurs also with GHC 8.6.5.
Which OS do you use: macOS
Which lsp-client do you use: VisualStudio Code
Describe your project (alternative: link to the project): https://github.com/konn/haft/tree/16c06f3385cafdde08875432324557a08fdbdfdb
Contents of
hie.yaml
: No hie.yaml required (it occurs regardless of the existence of hie.yaml)Steps to reproduce
src/Control/Distributed/Raft.hs
{-# GHC_OPTIONS -Wno-unused-imports #-}
Expected behaviour
HLS should warn unused imports and provides QuickFixes (e.g. on
(^..)
fromControl.Lens
).Actual behaviour
It shows QuickFixes for a moment, but they will dissapear immediately and HLS becomes non-responsive (even sometimes preventing VSCode from reloading windows!).
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: