-
Notifications
You must be signed in to change notification settings - Fork 207
Annoying popup in Sublime and vsCode #391
Comments
@xldenis wrote: So far no luck! I've removed the cabal helpers and nothing changed. I'm currently rebuilding from latest master as my previous version was:
I'm building with
Wow! it doesn't crash now but leads to an almost worse error... Pops up everytime I save! Strictly speaking that error message is correct they aren't in Initial research shows that this could be a problem for cabal files that specify multiple targets (ie: app + lib) ?@xldenis wrote: Here is a log of me booting up HIE in sublime and waiting for diagnostics to pop up.
This is amazing though, it appears as if code actions work and hits pop up! I can even hover over terms to get type information 😄 . Once that annoying popup issue is solved I can finally use HIE! |
From messages like
it seems we have a racing condition. Hopefully it's just the logger. The popups come from these lines:
The and it's sort of failed assertion, so it's good that it's so loud in Sublime. The message about "these modules" originates from GHC itself: |
My suspicion is that it's improperly building the executable as if it's the only target. That would seem to explain why it complains about those other modules. |
How do you build the project (stack, cabal etc) and does the message appear during the normal build? My impression from looking at the hie code was that the messages were legitimate but we don't handle this type of messages correctly so they end as popups. |
I build my project iwht If you'd like to try it out yourself feel free to clone the project at https://github.com/xldenis/ill and run Let me know if I can run any more tests for you though. |
Same problem in VS Code. I'm using stack 1.6.1 with ghc 8.2.2. Really a blocker to use HIE, which is awesome! Hope it'll be resolved soon. Thanks |
VS Code UI doesn't necessarily lend well to issues like this: microsoft/vscode-go#998 |
In this case it's a diagnostic which is mistakenly reported to vscode as a message. So it's our guilt, not theirs. |
Can someone replace haskell-ide-engine/src/Haskell/Ide/Engine/Transport/LspStdio.hs Lines 789 to 792 in fa3a4b1
This is really a serious error in |
@nponeccop Yes, that removed the popup for me. |
@nponeccop Confirmed. It works. |
@nponeccop The workaround works for me, too. |
I suppose a fix for the latest version should be diff --git a/src/Haskell/Ide/Engine/Transport/LspStdio.hs b/src/Haskell/Ide/Engine/Transport/LspStdio.hs
index 02fc890..02fdb47 100644
--- a/src/Haskell/Ide/Engine/Transport/LspStdio.hs
+++ b/src/Haskell/Ide/Engine/Transport/LspStdio.hs
@@ -839,8 +839,8 @@ requestDiagnostics tn cin file ver = do
$ GhcMod.setTypecheckedModule file
callbackg (pd, errs) = do
forM_ errs $ \e -> do
- reactorSend $ NotShowMessage $
- fmServerShowMessageNotification J.MtError
+ reactorSend $ NotLogMessage $
+ fmServerLogMessageNotification J.MtError
$ "Got error while processing diagnostics: " <> e
let ds = Map.toList $ S.toList <$> pd
case ds of |
Is this still a problem? If so, please provide an example that I can test against (preferably a git repo or some such) |
No description provided.
The text was updated successfully, but these errors were encountered: