atom-haskell / ide-haskell-repl

GHCi REPL in Atom
https://atom.io/packages/ide-haskell-repl
MIT License
26 stars 8 forks source link

Feature Request - Error pop up when launching misconfigured repl #63

Open theGhostJW opened 6 years ago

theGhostJW commented 6 years ago
  1. Set up REPL pointing to a ghci wrapper exe in settings and open REPL => works
  2. rename ghci wrapper exe so configuration is now invalid
  3. open REPL => REPL just fails (data entry / live reload panel just vanishes leaving an empty main panel)

Would be good to have an atom error notification with a message like: GHCI wrapper path invalid. Please update ide-haskell-repl settings to correct this.

lierdakil commented 6 years ago

Well, it should show an error pop-up if running an executable fails. And I can't really debug on Windows... For anyone interested, it's handled here: https://github.com/atom-haskell/ide-haskell-repl/blob/451fddd950c67815ef8ff16a65d6ee336364eb04/src/interactive-process.ts#L45-L66

My best guess, on Windows it doesn't throw but instead ends with (hopefully) nonzero exit code? But I have no idea, honestly.

theGhostJW commented 6 years ago

Your guess is correct there is no exception on windows so the catch block does not emit the error. Exit code is 1 but if I correct the mis-config and run REPL normally then exit REPL the exit code is also 1.

lierdakil commented 6 years ago

So here's an idea: if, say, repl exits in less than a second after being started, something probably went wrong there, so might as well show a message explaining this?

theGhostJW commented 6 years ago

I think that is a pretty good idea, probably as good as it can be given the absence of an exception on winDoz