Stack Docker Support - Longer or Configurable REPL Timeouts?
See original GitHub issueI need to use stack via docker (https://docs.haskellstack.org/en/stable/docker_integration/) but unfortunately the hard-coded 5 second timeout in intellij-haskell causes the plugin to give up before a command has a chance to run (I think).
After adding the following to my stack.yml
docker:
enable: true
and selecting Restart Haskell Stack REPLs. I see the following:
6:43 PM [global-stack-repl] Stack repl could not be started within 5 seconds
6:43 PM [project-stack-repl-query-metrics-client:exe:query-metrics-client2] Stack repl could not be started within 5 seconds
6:43 PM [global-stack-repl] No result from Stack repl within 5 seconds. Command was: :set prompt "^IntellijHaskell^\n"
I can build my project with stack build
and use stack repl
fine from the command line, but there is a noticeable delay caused by what I assume is the docker container starting.
I understand why a timeout is needed, but would you be open to making this configurable somehow? I believe if I could add a couple of seconds to this to account for the initial delay, this would fix my problem.
In case this is helpful:
stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1
Also, just in case you’re curious as to why I need docker, I’m attempting to develop a Reflex (GHCJS) app. I can compile it fine with GHC as well, but only via docker as the GHC version of Reflex requires webkitgtk3
which seems to be broken on MacOS. Since ghci only supports ghc I’m hoping to use a stack.yml with GHC for the editor integration and a separate stack-file just for building the js.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Thanks for the tip, here’s my “docker specific” stack section now:
All seems good and maybe a bit more performant? I’m not sure if that makes sense, but at least it initially seems so.
I think we can consider this issue closed. Thanks again for the quick update to support my request.
After I have done this fix, I can upload the plugin (which is just a zip file) to GitHub. You can install the plugin by using
Install plugin from disk
inplugins