Closed cpennington closed 5 years ago
Can you paste the full output of --verbose in a gist (killing it a few times after the reload loop). My guess is that something tells ghcid about changes/errors in files that are immediately deleted and it gets super confused. The verbose output should let us figure out what.
Hopefully this is enough: https://gist.github.com/cpennington/400a85f8e547c73bf81d4a3ec4b4b586
I just realized that it's almost certainly an issue where stack is creating/reporting files in /tmp
, which is inside the docker image. Running with --no-docker
"fixes" the issue by creating a garbage local-disk version that the ghcid
command running outside the container can find.
I think I might be able to fix it if I can tell stack to mount /tmp/haskell-stack-ghci
into the container. Need to look at how to do that, though.
Yes, I was able to mount that directory by using
docker:
mount:
- "/tmp/haskell-stack-ghci"
in my stack.yaml
When I run ghcid, it correctly spits out errors, but then ends up in a reloading loop with the message:
This is with a
.ghcid
of--command "stack ghci yomi-engine:lib yomi-engine:exe:bootstrap"
. My stack configuration uses docker by default.If I change the
.ghcid
to--command "stack ghci --no-docker yomi-engine:lib yomi-engine:exe:bootstrap"
, then ghcid fails, but after that, if I remove the--no-docker
again, then ghcid runs with no reload loop.