atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Add more user-friendly warnings on dependencies error #225

Closed Megamiun closed 6 years ago

Megamiun commented 6 years ago

Hello, I had the same problem as #223 today. Though I did manage to correct it(installing ghc-mod) after reading the message, I think it would be interesting to have a more user-friendly message, without a stacktrace and explaining to the user the problem and some simple solutions.

Did something similar on the project atom-python-run and I really believe it helped a little with the user experience. If you want, I can try to do it, just give me a heads-up if it is desired.

lierdakil commented 6 years ago

The whole dance around stacktraces and whatnot started initially as a way to

  1. Give users an easy way to get support, which would automatically include all relevant information.
  2. Get some feedback on what can go wrong in general

A caveat with that approach is that message is rather scary-looking (well, Atom default, can't do much about that), and a kneejerk reaction might be to click on "create issue" without reading. Doing something about that has been in the back of my mind for a while, but I didn't get to implementation yet.

Help is welcome. Bear in mind, there are two types of errors that tend to happen wrt ghc-mod executable and which probably need more user-friendly messages:

Also should probably "remember" if ghc-mod is built with a wrong compiler version, and in case of problems re-report that. But that's a different story, and builder selection (i.e. choice between cabal, stack or neither) must happen first.

A good idea is to check for typical configuration errors:

lierdakil commented 6 years ago

Closing in favor of #101