Skip to content

Commit ea54579

Browse files
cknittclaude
andcommitted
Only warn when Rust's inverted watch filter doesn't reproduce
macOS can deliver both edits in one batch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent ac79e81 commit ea54579

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎rewatch-ocaml/tests/check_command_validation.sh‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,11 +1700,14 @@ cp "$work/watch-filter-rust/src/Include.js" "$work/watch-filter-rust-initial.js"
17001700
printf 'let value = 2\n' >"$work/watch-filter-rust/src/Include.res"
17011701
printf 'let value = 11\n' >"$work/watch-filter-rust/src/Exclude.res"
17021702
wait_for_line_count "$rust_filter_marker" 2
1703+
# A canary for the documented difference: Rust's event filter is inverted, so
1704+
# the excluded edit triggers the rebuild and the included edit is missed. It
1705+
# only warns, because file event backends such as macOS FSEvents can deliver
1706+
# both edits in one batch, and Rust then rebuilds the included source anyway.
17031707
if ! cmp -s "$work/watch-filter-rust-initial.js" \
17041708
"$work/watch-filter-rust/src/Include.js"; then
1705-
echo "Rust no longer reproduces the inverted watch-filter event behavior" >&2
1706-
cat "$work/watch-filter-rust.out" "$work/watch-filter-rust.err" >&2
1707-
exit 1
1709+
echo "Notice: Rust did not reproduce the inverted watch-filter event behavior" >&2
1710+
echo "this time; if this persists, Rust fixed it and the difference is stale." >&2
17081711
fi
17091712
terminate_and_wait "$rust_filter_pid" "Rust filter watcher"
17101713

0 commit comments

Comments
 (0)