haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

Invalid operator import creates dangling workDoneProgress notifications #1749

Open Anrock opened 4 years ago

Anrock commented 4 years ago

HIE: Version 1.3, Git revision e61670f75f6e1218bc4c8024a3359d9a134c121d (3874 commits) x86_64 ghc-8.6.5 Stack: Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2 Nvim: NVIM v0.5.0-453-g685468057-dirty With Coc as LSC

Repro:

  1. Create testing stack project via stack new test simple
  2. Have following src/Main.hs:
    
    module Main where

import Data.Function ((&)) main :: IO () main = do putStrLn "hello world"

something = undefined


3. Wait for HIE to calm down with initializing project
4. Delete last `)` on `import Data.Function ((&))`
5. Dangling `loading` workDoneProgress appears

Further modifying same file (like deleting `undefined` from `something` line) will create more dangling notifications.

Also opening this file with import initially broken will create a lot of dangling `Starting LS languageserver.haskell`. 

[LSP log from CoC](https://pastebin.com/jk6i7CQv)
Anrock commented 4 years ago

Not reproducible in HLS, so whatever.