-
Notifications
You must be signed in to change notification settings - Fork 847
Description
I'm using emacs (spacemacs with the default 'haskell' & 'syntax-checker' layer in this case) which means flycheck w/ flycheck-haskell. While flycheck-haskell accounts for stack usage, it doesn't work for docker enabled stack projects.
flycheck-haskell expects to run stack --verbosity silent runghc -- ....
on 2 files in the host's $HOME/.emacs.d/elpa/flycheck-haskell/ dir. Of course when you run this on a docker project your $HOME/.emacs.d dir is out of sight when stack runs. [I'll work with the flycheck project to fix this in a stack-friendly way that accounts for diving into the stack docker container. Like maybe putting the haskell files it needs in $PROJECT/.stack-work/flycheck-haskell or something.]
flycheck-haskell also expects to write files in the temp dir before running stack. These files also disappear as soon as stack is called & it jumps into the container. Having the host's $TMPDIR mounted as the container's /tmp dir seems useful.
It's a tiny patch. It seems harmless. I've submitted a pull request. This solves part of the problem with flycheck-haskell in a way that's transparent to flycheck-haskell. (I don't have to ask them to change even more things for stack users.)
I do my work on Linux. How can I make the patch better for windows %TEMP_DIR% or Mac (if needed) ?
reference:
- https://github.com/flycheck/flycheck-haskell/blob/master/flycheck-haskell.el#L92
- https://github.com/flycheck/flycheck-haskell/blob/master/flycheck-haskell.el#L70
- https://github.com/flycheck/flycheck-haskell/blob/master/flycheck-haskell.el#L118
- https://github.com/flycheck/flycheck-haskell/blob/master/flycheck-haskell.el#L192