Repository navigation
Conversation
On macOS, notify's FSEvents backend stops and recreates its event stream on every watch/unwatch call, and events in between are lost. Full rebuilds unwatched and re-watched every path, so a watch.lock removal right after a source file removal (as in the rewatch watch tests) could be dropped, leaving the watcher running. Only unwatch/watch the paths that actually changed, and check that watch.lock still exists after a full rebuild. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christoph Knittel <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christoph Knittel <[email protected]>
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8730 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36d9041140
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Only record successfully registered watch paths, so that a path whose registration failed is retried on the next full rebuild instead of being treated as already watched. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christoph Knittel <[email protected]>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be54c50377
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8730 +/- ##
========================================
Coverage 79.86% 79.86%
========================================
Files 467 464 -3
Lines 63357 63090 -267
========================================
- Hits 50600 50388 -212
+ Misses 12757 12702 -55 🚀 New features to boost your workflow:
|
inotify ties a watch to the directory rather than its path, so a source directory that is deleted and recreated at the same path is no longer watched. Record each watched directory's identity (device and inode) and re-register watches whose directory changed on the next full rebuild. Platforms without stable file identities always re-register. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christoph Knittel <[email protected]>
The integration test only exercised the identity check on Linux while adding another timing-sensitive watch test on every platform. Test the identity check directly instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christoph Knittel <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes the flaky rewatch test on the macOS Intel runner:
Cause
notify 5's FSEvents backend stops and recreates its event stream on every
watch/unwatchcall (the new stream starts atkFSEventStreamEventIdSinceNow), so events that happen in between are dropped.On every full rebuild the watcher unwatched and re-watched all paths. The test removes
src/WatchProbe.res(aRemoveevent → full rebuild) and then immediately removeslib/watch.lock. On a slow runner the lock removal often lands while the watches are being re-registered, so its event is lost and the watcher keeps running.Fix
lib/watch.lockstill exists and exit if not. This catches a removal that falls into a gap when watches did have to be re-registered.Tests
registered_watch_is_invalid_after_directory_is_replacedinwatcher.rs(Unix only): a registered watch stays valid for its directory and becomes invalid once the directory is replaced at the same path.The lockfile race itself is FSEvents-specific and not deterministically reproducible, so it has no dedicated test.
🤖 Generated with Claude Code