Skip to content

Commit

Permalink
vendor: use upstream fsevents (#6095)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Santos <[email protected]>
Signed-off-by: Milas Bowman <[email protected]>
Co-authored-by: Nick Santos <[email protected]>
  • Loading branch information
milas and nicks authored Apr 12, 2023
1 parent ce8d0d6 commit aa51edc
Show file tree
Hide file tree
Showing 20 changed files with 99 additions and 117 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.5.0
github.com/fatih/color v1.13.0
github.com/fsnotify/fsevents v0.1.1
github.com/gdamore/tcell v1.1.3
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v1.2.3
Expand Down Expand Up @@ -47,7 +48,6 @@ require (
github.com/stretchr/testify v1.8.1
github.com/tilt-dev/clusterid v0.1.4
github.com/tilt-dev/dockerignore v0.1.1
github.com/tilt-dev/fsevents v0.0.0-20200515134857-2efe37af20de
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375
github.com/tilt-dev/go-get v0.2.3
github.com/tilt-dev/localregistry-go v0.0.0-20201021185044-ffc4c827f097
Expand All @@ -64,6 +64,7 @@ require (
go.opentelemetry.io/otel/sdk v1.10.0
go.opentelemetry.io/otel/trace v1.10.0
go.starlark.net v0.0.0-20230302034142-4b1e35fe2254
go.uber.org/atomic v1.9.0
golang.org/x/mod v0.6.0
golang.org/x/sync v0.1.0
golang.org/x/term v0.5.0
Expand Down Expand Up @@ -206,7 +207,6 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
go.opentelemetry.io/otel/metric v0.31.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM
github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c=
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
github.com/fsnotify/fsevents v0.1.1 h1:/125uxJvvoSDDBPen6yUZbil8J9ydKZnnl3TWWmvnkw=
github.com/fsnotify/fsevents v0.1.1/go.mod h1:+d+hS27T6k5J8CRaPLKFgwKYcpS7GwW3Ule9+SC2ZRc=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
Expand Down Expand Up @@ -655,8 +657,6 @@ github.com/tilt-dev/clusterid v0.1.4 h1:uQ/oDrFf+5ZPe/qcC4loq78Ri9PvgfTzvtsSxaFd
github.com/tilt-dev/clusterid v0.1.4/go.mod h1:MV6q698Z7LEbu9i7p+JwqGsu2EkiiaQViIrL6gd8XiI=
github.com/tilt-dev/dockerignore v0.1.1 h1:/MPYqcD8qMCMyh3yiHuQdzbMQi9NL4vVopo6/9D/XvE=
github.com/tilt-dev/dockerignore v0.1.1/go.mod h1:2ooUDj8B9FNWYvHadA4EKG0JDaeAOjiq5P+mvEzS2eY=
github.com/tilt-dev/fsevents v0.0.0-20200515134857-2efe37af20de h1:tG+nJMUUxV7MJm/MeU1Mw7rvmwN9GWyHMMg+wtf9HS4=
github.com/tilt-dev/fsevents v0.0.0-20200515134857-2efe37af20de/go.mod h1:1jUbPVh7Ani2CSublmvP7+zqTgR06A8Y0MKU9Xr2L5s=
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375/go.mod h1:xRroudyp5iVtxKqZCrA6n2TLFRBf8bmnjr1UD4x+z7g=
github.com/tilt-dev/go-get v0.2.3 h1:en+uZDENUWg31fxdoXb5O/5MC+b6SK7DplCm5cUSs4o=
Expand Down
14 changes: 1 addition & 13 deletions internal/watch/watcher_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/tilt-dev/tilt/pkg/logger"

"github.com/tilt-dev/fsevents"
"github.com/fsnotify/fsevents"
)

// A file watcher optimized for Darwin.
Expand All @@ -22,7 +22,6 @@ type darwinNotify struct {
pathsWereWatching map[string]interface{}
ignore PathMatcher
logger logger.Logger
sawAnyHistoryDone bool
}

func (d *darwinNotify) loop() {
Expand All @@ -38,17 +37,6 @@ func (d *darwinNotify) loop() {
for _, e := range events {
e.Path = filepath.Join("/", e.Path)

if e.Flags&fsevents.HistoryDone == fsevents.HistoryDone {
d.sawAnyHistoryDone = true
continue
}

// We wait until we've seen the HistoryDone event for this watcher before processing any events
// so that we skip all of the "spurious" events that precede it.
if !d.sawAnyHistoryDone {
continue
}

_, isPathWereWatching := d.pathsWereWatching[e.Path]
if e.Flags&fsevents.ItemIsDir == fsevents.ItemIsDir && e.Flags&fsevents.ItemCreated == fsevents.ItemCreated && isPathWereWatching {
// This is the first create for the path that we're watching. We always get exactly one of these
Expand Down
22 changes: 22 additions & 0 deletions vendor/github.com/fsnotify/fsevents/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/fsnotify/fsevents/go_1_10_after.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions vendor/github.com/fsnotify/fsevents/go_1_10_before.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions vendor/github.com/tilt-dev/fsevents/AUTHORS

This file was deleted.

41 changes: 0 additions & 41 deletions vendor/github.com/tilt-dev/fsevents/go_1_10_after.go

This file was deleted.

39 changes: 0 additions & 39 deletions vendor/github.com/tilt-dev/fsevents/go_1_10_before.go

This file was deleted.

6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ github.com/felixge/httpsnoop
# github.com/francoispqt/gojay v1.2.13
## explicit; go 1.12
github.com/francoispqt/gojay
# github.com/fsnotify/fsevents v0.1.1
## explicit
github.com/fsnotify/fsevents
# github.com/fsnotify/fsnotify v1.6.0
## explicit; go 1.16
github.com/fsnotify/fsnotify
Expand Down Expand Up @@ -657,9 +660,6 @@ github.com/tilt-dev/clusterid
# github.com/tilt-dev/dockerignore v0.1.1
## explicit; go 1.16
github.com/tilt-dev/dockerignore
# github.com/tilt-dev/fsevents v0.0.0-20200515134857-2efe37af20de
## explicit
github.com/tilt-dev/fsevents
# github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375
## explicit; go 1.16
github.com/tilt-dev/fsnotify
Expand Down

0 comments on commit aa51edc

Please sign in to comment.