haskell / haskell-ide-engine

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

"Didn't get typechecked module" message #416

Open nponeccop opened 6 years ago

nponeccop commented 6 years ago

From what I understand the cache of typechecked modules is supposed to be "monotonic": once completion works for a module, it never stops working.

But apparently it's not the case. I load a haskell file in neovim and completion works. But after some time it stops working, and when I try to complete something there is the following message in hie.log:

 setTypecheckedModule: Didn't get typechecked module for: "/home/foo/bar/Main.hs"

The message is produced by hie-ghc-mod:

https://github.com/haskell/haskell-ide-engine/blob/4001c3e9fea3ad36ec7eddcb3ddbb5c08b4dbd1e/hie-ghc-mod/Haskell/Ide/GhcModPlugin.hs#L150-L159

meck commented 6 years ago

I've been looking at this as well. I have the same messages, but I think its related to Language Client, it seems to correspond to the errors there: Some arguments are missing, requesting from vim. Keys: ["buftype", "filename", "line"]. Exps: ["&buftype", "s:Expand(\'%:p\')", "line(\'.\') - 1"]

I am thinking the rust wrapper maybe failing to expand those properly and confusing ghc-mod, but I've not had time to look at it further. Perhaps @autozimu has a insight? The completion was working before the new rust based version

autozimu commented 6 years ago

No, that’s not an error and that message is totally fine. The message basically says those information are not included in the request, languageclient needs to ask vim to fulfill those info though RPC call.

nponeccop commented 6 years ago

@autozimu You definitely need to have it at INFO log level so people don't get misleaded