codekitchen / dinghy

faster, friendlier Docker on OS X. Deprecated.
MIT License
2.12k stars 109 forks source link

The Ruby Guard gem is broken on Dinghy 4.6.5 #279

Open ms-ati opened 6 years ago

ms-ati commented 6 years ago

This appears to be due to the linux file system inotify event being generated inside the Dinghy VM changing to a :modify event, which the Listen gem does not, by default, create a watch for.

Please see Listen gem issue 450 for more information and to track that.


As a workaround, adding the following line to your Guardfile appears to work:

Listen::Adapter::Linux::DEFAULTS[:events] << :modify

The underlying issue in the Listen gem appears to be the absence of :modify from the above constant which is defined in listen/adapter/linux.rb:7

codekitchen commented 6 years ago

Oh hm, I didn't realize that switching to gtouch would change the event from ATTRIB to MODIFY but I've just tested to verify that is the case. That's going to fix things for some people and break things for others (like here), another related ticket is https://github.com/codekitchen/fsevents_to_vm/issues/7

I wonder if there's a reasonable way to generate both ATTRIB and MODIFY events. One solution might be to call touch and then gtouch in sequence, but I worry about race conditions there.