Repository navigation
Fix dotter watch redeploying in an endless loop - #234
Merged
Merged
Conversation
Deploying reads files in the repository and writes to the cache, and both retriggered the watcher, so `dotter watch` kept redeploying even when nothing had changed. - Discard file access events, which aren't modifications. - Pass the cache, `.git` and symlink test paths as ignores rather than as negated filters. Negated filters alone never excluded anything. Ignore directories as `dir` and `dir/**`, since `dir/` doesn't exclude the files inside it. - Deploy once on startup explicitly. This used to happen only as a side effect of the spurious events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
I'm not running the latest version on windows myself so haven't noticed, thanks for the contribution! |
SuperCuber
pushed a commit
that referenced
this pull request
Oct 26, 2026
This reverts commit f418ab3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Linux,
dotter watchredeploys continuously even when nothing changes: about 18 deploys per second in my testing. Each deploy reads files in the repository and writes the cache, and the watcher picks up both:cache.toml,.gitandDOTTER_SYMLINK_TESTwere passed toGlobsetFilterer::newas!-prefixed lines in the filters argument. A negated filter only whitelists, and with no positive filters the filter set isn't consulted at all, so nothing was excluded.Fix
.git) gets two patterns:.dotter/cachematches the directory itself, and.dotter/cache/**matches everything inside it. In.gitignorefiles,.dotter/cache/alone would cover both, but in my testing the watcher's filter didn't apply that pattern to files inside the directory. Writing.dotter/cache/gitconfigstill triggered a redeploy until I added the/**pattern.Testing
I ran
dotter watchin a pseudo-terminal:[Dotter] Deploying...lines per secondglobal.tomlcargo test,cargo clippy -- -D warningsandcargo fmt --checkpass, andcargo checkpasses for the Windows and macOS targets.🤖 Generated with Claude Code