flycheck / flycheck-haskell

Improved Haskell support for Flycheck
GNU General Public License v3.0
67 stars 25 forks source link

Awkward to use without stack #77

Closed ljli closed 7 years ago

ljli commented 7 years ago

There is what I would consider a bug: readProcessWithExitCode is called here. But when stack isn't in the path it will throw an exception and the program crashes. I'm not sure if this should be reported upstream, I would read the documentation such that it never throws an exception, but technically no process was run so what would its ExitCode be? It probably makes sense to catch the exception for now. Beyond that when the stack executable exists but no compiler is setup, every .hs file that is opened with emacs will show a warning at the bottom. In the same situation flycheck-haskell-runghc-command is set to use stack, but after that the script executions fail since no compiler is setup. If understand the purpose of this package correctly it is intended to discover information about a haskell package in different kinds of project environment (currently stack and cabal) to make flycheck smarter. Having a hard dependency on one of the supported tools, or being noisy in the absence of one, seems at odds with that goal.

sergv commented 7 years ago

Fair enough, thanks for raising this! I'll try to come up with a solution in the near future.

sergv commented 7 years ago

I believe the issue should be resolved now. Please reopen if it isn't.