haskell-mode
haskell-mode copied to clipboard
Having main-is incorrectly populated causes repeated crashes that locks up your buffers
How to reproduce populate main-is with a file that cannot be found, save and attempt to edit any of the .hs files in your project.
What happens An error message occurs, stating that the haskell process has died and it prompts if you would like to restart it. Upon restarting it immediately crashes again
What should (ideally) happen I don't think it would be much trouble to put a good error message in the mini buffer stating the main file could not be found, but this did leave me scratching my head for a few minutes wondering what was going on.
Maybe this is intended behaviour, it just seems like a bad user experience to repeatedly crash, maybe a better fix would be to keep a log of the last 3 crash logs from cabal and if it crashes the same way 3 times to stop re-attempting or something?
When prompted, you should be given the message
"The Haskell process `%s' has died. Restart? (y, n, l: show process log) "
Does l not work for you?
I'm not sure if my issue is with main-is but I'm running into the same dialog repeatedly.
In my case the process log is blank, and the processes crashes repeatedly locking up my editing experience (disabling haskell-mode manually, has it re-enabled a second later by some means).
Possibly related to:
Suspicious state from syntax checker haskell-ghc: Flycheck checker haskell-ghc returned non-zero exit code 1, but its output contained no errors: Loaded package environment from /home/chris/NewProjects/cardano-node/.ghc.environment.x86_64-linux-8.6.5
<command line>: cannot satisfy -package-id canonical-json-0.6.0.0-inplace:
canonical-json-0.6.0.0-inplace is unusable due to missing dependencies:
bytestring-0.10.8.2-FM1ltxfHPHB5vqt1kxm9vy containers-0.5.11.0-FmkfE5FIiXiCSIJBVRC1nU parsec-3.1.13.0-4aiePaD5OtQ3Wg8qggZBhE
(use -v for more information)
I'm actually unable to reproduce this original error.
@chrissound your error looks different, since it is coming from flycheck and not haskell-mode. I'd investigate the missing dependency it's complaining about.