compose/pkg/watch
Dan Miller 38b3f3b678 watch: use `sinceWhen` and `HistoryDone` to avoid spurious events (#557)
Here's our new watch strategy on Darwin in a nutshell:

1. Create an fsevents stream for events "since" the last event ID that
we saw globally.
2. Add a path that we want to watch
3. Add that path to a map of paths that we're watching _directly_.
4. Restart the event stream to pick up the new path.
5. Ignore all events for all watches until we've seen a `HistoryDone`
event.
6. Ignore the first `ItemCreated` event for paths we're watching that
are also directories
7. Otherwise, forward along all events.
2023-02-02 14:59:30 +01:00
..
features.go tilt: copy watch code from tesseract 2023-02-02 14:59:30 +01:00
notify.go watch: simplify the fileEvent interface to only contain paths (#144) 2023-02-02 14:59:30 +01:00
notify_test.go watch: use `sinceWhen` and `HistoryDone` to avoid spurious events (#557) 2023-02-02 14:59:30 +01:00
ospath.go tilt: copy watch code from tesseract 2023-02-02 14:59:30 +01:00
temp.go tilt: copy watch code from tesseract 2023-02-02 14:59:30 +01:00
watcher_darwin.go watch: use `sinceWhen` and `HistoryDone` to avoid spurious events (#557) 2023-02-02 14:59:30 +01:00
watcher_linux.go watch: fix a spurious error (#344) 2023-02-02 14:59:30 +01:00