Multiple times an hour, I find Dante suddenly stops processing things, which I notice by flycheck's error annotations no longer updating as I'm changing the file.
Frequently (but not 100% of the time) it seems to happen while I'm editing import lists, when dante runs an auto-check half way through what I'm writing, so the resultant state is an error saying parse error (possibly incorrect indentation or mismatched brackets) that just doesn't go away.
Running dante-restart invariably fixes the problem (although I also have to disable and re-enable flycheck, despite #14 being reported and fixed a couple of years ago).
Trying to narrow down the conditions that cause it, I've discovered that I can reliably trigger it by having Dante run at the same time as Company completion when the current buffer contains a parse error.
For example, after cabal init and touch cabal.project.local (to use the new-repl method, since that's what I'm doing in my real project), I added an import to the generated Main.hs:
module Main where
import Data.List ( intercalate )
main :: IO ()
main = putStrLn "Hello, Haskell!"
If I take out the ( intercalate ) part and type it back in with a pause part way through so that Flycheck runs Dante and Company would show a completion prompt (e.g. ( inter and then pause), then the problem triggers 100% of the time; a parse error is reported at the following main and never changes with following updates.
If I type ( intercalate ) fast enough without pausing, then there is no problem.
If I type ( in and then pause (prefix short enough that Company completion doesn't run) then Dante reports the parse error at main, but continues to respond to further changes.
If instead of deleting the whole import list I keep the parentheses and only delete intercalate, then typing inter back and pausing gets a completion prompt from Company, but this problem doesn't occur (since the buffer doesn't contain a Haskell parse error, just an unknown identifier error?).
In my real usage I could swear that I've seen the error that breaks Dante be something other than a parse error, but I haven't reproduced an example.
With company-mode disabled I didn't encounter this problem, so possibly related to #48?
I'm not sure whether it helps any, but when Dante stops responding, running dante-diagnose shows this output:
Multiple times an hour, I find Dante suddenly stops processing things, which I notice by flycheck's error annotations no longer updating as I'm changing the file.
Frequently (but not 100% of the time) it seems to happen while I'm editing import lists, when dante runs an auto-check half way through what I'm writing, so the resultant state is an error saying
parse error (possibly incorrect indentation or mismatched brackets)
that just doesn't go away.Running
dante-restart
invariably fixes the problem (although I also have to disable and re-enable flycheck, despite #14 being reported and fixed a couple of years ago).Trying to narrow down the conditions that cause it, I've discovered that I can reliably trigger it by having Dante run at the same time as Company completion when the current buffer contains a parse error.
For example, after
cabal init
andtouch cabal.project.local
(to use thenew-repl
method, since that's what I'm doing in my real project), I added an import to the generatedMain.hs
:If I take out the
( intercalate )
part and type it back in with a pause part way through so that Flycheck runs Dante and Company would show a completion prompt (e.g.( inter
and then pause), then the problem triggers 100% of the time; a parse error is reported at the followingmain
and never changes with following updates.If I type
( intercalate )
fast enough without pausing, then there is no problem.If I type
( in
and then pause (prefix short enough that Company completion doesn't run) then Dante reports the parse error atmain
, but continues to respond to further changes.If instead of deleting the whole import list I keep the parentheses and only delete
intercalate
, then typinginter
back and pausing gets a completion prompt from Company, but this problem doesn't occur (since the buffer doesn't contain a Haskell parse error, just an unknown identifier error?).In my real usage I could swear that I've seen the error that breaks Dante be something other than a parse error, but I haven't reproduced an example.
With
company-mode
disabled I didn't encounter this problem, so possibly related to #48?I'm not sure whether it helps any, but when Dante stops responding, running
dante-diagnose
shows this output: