compose/pkg/watch
Milas Bowman 7aaea283ca watch: data race / segfault fixes
Was getting segfaults with multiple services using
`x-develop` and `watch` at the same time. Turns out
the Moby path matcher lazily initializes the regex
pattern internally the first time it's used, so it's
not goroutine-safe.

Change here is to not use a global instance for the
ephemeral path matcher, but a per-watcher instance.

Additionally, the data race detector caught a couple
other issues that were easy enough to fix:
 * Use the lock that's used elsewhere for convergence
   before manipulating
 * Eliminate concurrent map access when triggering
   rebuilds

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-22 18:05:56 -04:00
..
dockerignore.go use tilt watcher to track filesystem changes 2023-02-02 14:59:30 +01:00
ephemeral.go watch: data race / segfault fixes 2023-03-22 18:05:56 -04:00
notify.go watch: ignore ephemeral files & minor output tweaks 2023-02-24 14:34:51 -05:00
notify_test.go use CGO to enable fsevent on OSX 2023-02-10 17:24:48 +01:00
paths.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
paths_test.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
temp.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
temp_dir_fixture.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
watcher_darwin.go watch: ignore ephemeral files & minor output tweaks 2023-02-24 14:34:51 -05:00
watcher_naive.go watch: ignore ephemeral files & minor output tweaks 2023-02-24 14:34:51 -05:00
watcher_naive_test.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
watcher_nonwin.go adjust code and dependencies 2023-02-02 14:59:30 +01:00
watcher_windows.go adjust code and dependencies 2023-02-02 14:59:30 +01:00