You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb85e7b
Browse filesBrowse the repository at this point in the historyBrowse files
Fix watcher missing watch.lock removal during full rebuilds (#8730)
* Fix watcher missing watch.lock removal during full rebuilds
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 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
* Add PR link to CHANGELOG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
* Retry watch paths that failed to register
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 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
* Re-register watches of source dirs replaced at the same path
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 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
* Replace replaced-source-dir watch test with a unit test
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 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
* Clarify watch.lock check comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <ck@cca.io>
---------
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@
28
28
- Fix the formatter dropping a `@res.ternary` attribute written in source, e.g. `let b = @res.ternary x`, and print `@JSX` and `@res.ternary` with the same parens as other attributes, e.g. `(@JSX x) + 1`. https://github.com/rescript-lang/rescript/pull/8740
29
29
- Respect `@warning` attributes on the module in `module type of`, e.g. `module type of @warning("-3") DeprecatedModule`, which still reported the warning. https://github.com/rescript-lang/rescript/pull/8738
30
30
- Fix the formatter dropping or moving attributes and `await` on module expressions, such as `module M = @attr F(X)`, and printing invalid code for module constraints and functors in some positions, such as `module M: T = (X: S)`. https://github.com/rescript-lang/rescript/pull/8735
31
+
- Fix `rescript watch` sometimes not exiting on macOS when `lib/watch.lock` is removed during a full rebuild, and stop re-registering unchanged watch paths on full rebuilds. https://github.com/rescript-lang/rescript/pull/8730
31
32
- Make rewatch compile independent modules after an unrelated failure and recompile blocked dependents when a changed interface survives a failed implementation, including across full watcher rebuilds. https://github.com/rescript-lang/rescript/pull/8667
32
33
- Fix `RescriptTools.binaryPath` failing with `ERR_PACKAGE_IMPORT_NOT_DEFINED` when used from a user project. https://github.com/rescript-lang/rescript/pull/8694
33
34
- GenType: type inline-record cases of untagged variants as objects instead of their single field's type. https://github.com/rescript-lang/rescript/pull/8693
0 commit comments