Commit Graph

32 Commits

Author SHA1 Message Date
Milas Bowman db4ed89528
feat(desktop): synchronized file share integration (#11614) 2024-03-20 14:41:24 -04:00
Matthieu MOREL 4f694919ff deps: remove deprecated github.com/pkg/errors
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-09-29 06:28:58 +02:00
Milas Bowman da1ca578b5 watch: ignore ephemeral files & minor output tweaks
Big change here is to import the ephemeral ignore set from Tilt.

The `.git` directory is also ignored for now: this restriction
should probably be lifted and made configurable in the future,
but it's not generally important to watch and triggers a LOT of
events (e.g. Git creates `index.lock` files that will appear and
disappear rapidly as terminals/IDEs/etc interact with Git, even
for read-only operations).

The Tilt-provided ephemeral file set has been slowly devised over
time based on temporary files that can cause trouble. We can also
look at a more robust/configurable solution here in the future,
but thse provide a reasonable out-of-the-box configuration for
the moment.

There's also some small tweaks to the output to add missing
newlines in a few edge cases and such.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-24 14:34:51 -05:00
Nicolas De Loof 7a42ba7eec use CGO to enable fsevent on OSX
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-10 17:24:48 +01:00
Nicolas De Loof 25576289c8 adjust code and dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-02 14:59:30 +01:00
Nick Santos c08e07714a watch: optimization to help avoid inotify nodes for large file trees (#5769)
fixes https://github.com/tilt-dev/tilt/issues/5764
2023-02-02 14:59:30 +01:00
Ken Sipe 1b71e3efb3 lint: fix local-prefixes for goimports (#5453)
Fix local-prefixes on linters imports then resolved imports to be as expected

Signed-off-by: Ken Sipe <kensipe@gmail.com>
2023-02-02 14:59:30 +01:00
Milas Bowman 4d822676ce ci: add exportloopref linter and upgrade to golangci-lint v1.43.0 (#5281)
`exportloopref` - detects captures of loop variable without
re-assignment

NOTE: There can be false negatives with this linter to avoid being
            overly strict and annoying!

Also upgraded `golangci-lint` to latest (v1.43.0 published 2021-11-03).
2023-02-02 14:59:30 +01:00
Milas Bowman 7161778ccf watch: use WalkDir to speed up file listing (#4684)
`WalkDir` is new in Go 1.16 and avoids calling `os.Lstat` on
every visited file and directory. In most cases, we don't need
that info, so this will help reduce I/O when listing files,
which can be helpful for particularly big monorepos.
2023-02-02 14:59:30 +01:00
Milas Bowman f79c75ab10 test: fix lint errors on Darwin (macOS) (#4247)
Unused code linter isn't particularly smart about platform build
tags, so since this func is only used by the "naive" (non-macOS)
file watcher, it needs to live with that or it gets flagged as
dead code when linting on macOS.
2023-02-02 14:59:30 +01:00
Nick Santos e62993a854 test: enable unused check, remove dead code (#4208) 2023-02-02 14:59:30 +01:00
Nick Santos 28251e8be5 watch: improve error messages when you run out of inotify instances (#3960) 2023-02-02 14:59:30 +01:00
Nick Santos c7ba7d9de5 dockerignore: convert ignore patterns to absolute paths [ch9237] (#3743)
In most places in Tilt, we try to use absolute paths everywhere.
So this makes things more consistent with the rest of Tilt, and lets us be
a bit more flexible in how we handle subdirs and parent dirs in ignores.

Fixes https://github.com/tilt-dev/tilt/issues/3740
2023-02-02 14:59:30 +01:00
Nick Santos b3615d64e2 watch: increase the windows watch i/o buffer (#3620)
fixes https://github.com/tilt-dev/tilt/issues/3556
2023-02-02 14:59:30 +01:00
Nick Santos 1a1d1707ed change org name from windmilleng to tilt-dev (#3346) 2023-02-02 14:59:30 +01:00
Nick Santos fd3e0bbe2b watch: use the recursive watcher on windows (#3306) 2023-02-02 14:59:30 +01:00
Nick Santos d2d4d05264 Revert "watch: fix inotify tests on windows" (#3147)
This reverts commit 74ac7997b1c8f497babbbd499ff1f047563d699a.
2023-02-02 14:59:30 +01:00
Nick Santos dda0362b6e watch: fix inotify tests on windows (#3140) 2023-02-02 14:59:30 +01:00
Dan Miller 17087447e9 logger: move to pkg (#2031) 2023-02-02 14:59:30 +01:00
Nick Santos a31350ede1 watch: move more of the directory-skipping logic into the interface (#1864) 2023-02-02 14:59:30 +01:00
Nick Santos d744c97f13 watch: add a simple check when there are no exclusions (#1863) 2023-02-02 14:59:30 +01:00
Nick Santos 37647bc600 watch: skip setup if nothing is being watched (#1861) 2023-02-02 14:59:30 +01:00
Nick Santos 21e5d564af watch: FileEvents must always be absolute (#1841)
there were a lot of confused tests that were using relative paths, then trying to workaround this
2023-02-02 14:59:30 +01:00
Nick Santos 390d5cf165 watch: add tests for ignores and number of watches (#1838) 2023-02-02 14:59:30 +01:00
Nick Santos 7f6e189dbc watch: change the watcher interface to better match how we actually use it (#1835) 2023-02-02 14:59:30 +01:00
Dan Miller b5ccea7b0e watch: record num watches in expvars (#1795) 2023-02-02 14:59:30 +01:00
Nick Santos 5e0f1eec16 watch: fix spurious errors while watching (#1726) 2023-02-02 14:59:30 +01:00
Dan Bentley f82e2de57e watch: don't watch each individual file (#1613) 2023-02-02 14:59:30 +01:00
Matt Landis 9c7f7bc0fa live_update: error if syncing from outside of docker context (#1396) 2023-02-02 14:59:30 +01:00
Nick Santos 6defe7cac6 watch: tfw you have a test that asserts broken file-watch behavior 😢 (#1354) 2023-02-02 14:59:30 +01:00
Dan Miller 0482f9276a watch: add watch function that traverses up directory structure recursively (#1013) 2023-02-02 14:59:30 +01:00
Nick Santos e8a34c8d1e watch: remove inotify-specific bits of watcher_linux (#890)
the tests on windows don't pass yet, but at least it compiles
2023-02-02 14:59:30 +01:00