General summary/comments (optional)
stack fails to respond to file modification events on OSX when run inside docker. I believe this is simply due to being built against fsnotify-0.2.1.1 rather than fsnotify-0.3.0.1. fsnotify-0.3.0.1 included changes to the Linux file listener which listen for Attrib and Modify events instead of CloseWrite. The Docker for Mac osxfs file sharing emits Modify events on file changes, but does not emit CloseWrite.
fsnotify-0.2.1.1 event list
fsnotify-0.3.0.1 event list
Steps to reproduce
- Run command
docker run -it --rm -v $PWD:/work -w /work flipstone/stack:v2-1.9.3 bash
- In the dockerized bash shell, run command
stack new fsevent-test.
- In the dockerized bash shell, run command
cd fsevent-test && stack build --file-watch.
- Edit
fsevent-test/src/Lib.hs
(In vim, you will need to ensure backupcopy is set to yes. Both the no and auto settings result in files being created/deleted in the directory and triggering extra filesystem events, masking the problem)
Expected
The stack build --file-watch command should recompile when the file is edited.
Actual
The stack build --file-watch command does not recompile when the file is edited.
Stack version
$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1
Method of installation
- Binary package downloaded from
https://github.com/commercialhaskell/stack/releases as part of docker image build (Dockerfile)
General summary/comments (optional)
stackfails to respond to file modification events on OSX when run inside docker. I believe this is simply due to being built againstfsnotify-0.2.1.1rather thanfsnotify-0.3.0.1.fsnotify-0.3.0.1included changes to the Linux file listener which listen for Attrib and Modify events instead of CloseWrite. The Docker for Mac osxfs file sharing emits Modify events on file changes, but does not emit CloseWrite.fsnotify-0.2.1.1 event list
fsnotify-0.3.0.1 event list
Steps to reproduce
docker run -it --rm -v $PWD:/work -w /work flipstone/stack:v2-1.9.3 bashstack new fsevent-test.cd fsevent-test && stack build --file-watch.fsevent-test/src/Lib.hs(In vim, you will need to ensure
backupcopyis set toyes. Both thenoandautosettings result in files being created/deleted in the directory and triggering extra filesystem events, masking the problem)Expected
The
stack build --file-watchcommand should recompile when the file is edited.Actual
The
stack build --file-watchcommand does not recompile when the file is edited.Stack version
Method of installation
https://github.com/commercialhaskell/stack/releasesas part of docker image build (Dockerfile)