Skip to content

Dev tools like flycheck & flycheck-haskell need the host's TMPDIR and HOME mounted in the docker container #1949

@dysinger

Description

@dysinger

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:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions