Open LeanderK opened 8 years ago
Note that this can be easily implemented by relying on the stack build
command, e.g.
% stack build ghc-mod
% stack build hlint
I think these would be the requirements -
When you open a project, if hlint and ghc-mod are not configured, prompt the user to see if he wants to have them auto-configured with stack. If the user says "no", somehow cache that response in the configs so we don't ask again.
If the user says "yes", proceed to stack build hlint ghc-mod
and pipe the output into a window. We already have a Haskell Tools Console, so maybe we can log Stack output there.
Once the process completes, look up the built binaries for hlint and ghc-mod and configure the tools accordingly, notifying the user of success
Obviously, if a failure occurs some point along the line, notify the user with a detailed error.
with stack the GHC versions between the projects can differ, this can cause problems with the haskell tools. I therefore propose having the manual settings for cabal and let stack manage the tools similar to the way atom-haskell solves this problem (https://github.com/atom-haskell/haskell-ghc-mod/wiki/Using-with-stack). As a side benefit the installation and setup of the tools will be fully automatic. While not directly related, i am keeping this in mind while working on #298, so it should not require much work. While i would prefer letting stack manage the tools to be the standard, i think its a good idea to be able to disable that behaviour.