haskell / haskell/haskell-mode

Having main-is incorrectly populated causes repeated crashes that locks up your buffers

Open
#1,688 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

**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?

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by setting main-is to a missing file, saving, and editing a .hs file in the project. Start at the Haskell process restart and crash-report path, including the minibuffer message and Cabal crash logs; done means a missing main file is reported clearly without repeated crashes or restart prompts.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp, haskell
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.