Repository navigation
fix(serve): ignore chmod events so rebuilds don't loop - #9
Merged
Merged
Conversation
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.
Summary
On macOS
inkssg serverebuilt in a loop after the first change. The watcher reacted to attribute-only (Chmod) events, and each rebuild was followed by another one on the page it had just read.on(file event) if path is in the output dir or is a dotfile skip + if only attributes changed (Chmod) + skip debounce, then rebuild and reloadEvidence
Instrumented the watcher and ran
serveon a one-page site (macOS, Go 1.24.6):touch pages/index/content.mdgave 3 rebuilds in 3 seconds, every one triggered byCHMOD .../pages/index/content.md. In normal use it does not stop:touchgives 0 rebuilds, and rewriting the file gives exactly 1 over the next 4 seconds.go vetandgo testpass. No automated test for the watcher.Merge Danger
Door: two-way
Blast Radius: small
inkssg serveis affected,builddoes not use the watcher.