Watch triggers multiple times for non-markdown on APFS (macOS) #2133
Labels
C-bug
Category: A bug, incorrect or unintended behavior
Command-watch
Command: watch
E-Help-wanted
Experience: Help Needed
Problem
Editing non-
.md
files in the book's source folder triggers multiple rebuilds when usingmdbook serve
. The amount of rebuilds is not constant, I've seen it vary from 2 to over 20 times. Editing markdown files triggers a single rebuild.Steps
cd $(mktemp -d)
mdbook init </dev/null
echo "export let lorem = 'ipsum';" > src/test.ts
echo -e '```\n{{#include test.ts}}\n```' >> src/chapter_1.md
mdbook serve
touch src/test.ts
Possible Solution(s)
Switching
notify
frommacos_fsevent
tomacos_kqueue
seems to fix the issue, triggering only a single rebuild whenever thesrc/test.ts
file changes.Notes
This happens on an APFS drive on macOS. It doesn't happen on ext4 in a linux VM.
I'm not sure why this happens. A simple test using the following code doesn't trigger the multitude of events, leading me to think the cause lies within mdbook and not in notify.
Version
The text was updated successfully, but these errors were encountered: