cowboy/grunt — Issue #9: Watch misses events
Author: errcw
Created: 2012-01-14 08:08:48+00:00
State: open

The way the watch task is structured results in missed events. When a file changes and triggers a run of tasks there is an interval where the watched files are not actually watched. For some editors where a "save" event consists of multiple events (including what looks like a delete from the perspective of inotify/watchFile; check out this [analysis](https://github.com/guard/guard/wiki/Analysis-of-inotify-events-for-different-editors)) this behavior is particularly problematic. In my particular instance, using gvim, I only ever see files deleted and my tasks run seeing empty files.

Perhaps the right approach is to allow the watch task to be persistent and to invoke its dependent tasks without requiring it to restart itself? I played with some other solutions but they all feel like hacks.