refactor(async): remove fs_event module - #176
Conversation
Remove the fs_event filesystem watcher entirely: the platform backends were hard to use and unreliable, and clice #473 already dropped file watching. Recommended replacement is periodic polling with kota::timer plus fs::stat (compare mtime/size). - Delete include/kota/async/io/fs_event.h (71 lines) and src/async/io/fs_event.cpp (965 lines, all three platform backends) - Delete tests: fs_event_tests.cpp, fs_event_dir_tests.cpp, and the shared fs_event_fixture.h (~2900 lines) - Drop the fs_event include from kota/async/async.h - Drop the fs_event source entry and the Apple-only "-framework CoreServices" link (fs_event was its only user) from src/async/CMakeLists.txt; drop the matching CoreServices frameworks entry from xmake.lua - README: remove the fs_event mention and add a migration note pointing at the timer + fs::stat polling pattern uv::poll_* wrappers are untouched (src/http/manager.cpp uses them), and the fs.h/fs.cpp API surface is fully preserved. Net: 8 insertions, 3936 deletions. Tests: 1367 passed, 2 skipped.
|
Warning Review limit reached
Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 📝 WalkthroughWalkthroughThis PR removes the Changesfs_event Removal
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Motivation
fs_eventis being removed outright (PR-2 of the async cleanup plan). The platform watcher backends proved hard to use and unreliable across OSes, and clice #473 already deprecated file watching in favor of periodic stat-based polling. Keeping the module meant carrying ~1500 lines of platform code plus ~2900 lines of flaky tests for an API with no remaining consumer.Replacement: build a periodic poll with
kota::timer+fs::stat(compare mtime/size). The README now carries a migration note saying exactly this.Deleted
include/kota/async/io/fs_event.hsrc/async/io/fs_event.cpp(all 3 platform backends)tests/unit/async/io/fs_event_tests.cpptests/unit/async/io/fs_event_dir_tests.cpptests/unit/async/fs_event_fixture.h(shared test fixture)Plus:
kota/async/async.h: dropped thefs_event.hincludesrc/async/CMakeLists.txt: dropped the source entry and the Apple-only-framework CoreServiceslink — verified fs_event was its sole userxmake.lua: dropped the matchingadd_frameworks("CoreServices")blockREADME.md: removed the fs_event mention, added the timer +fs::statmigration note (only fs_event-related README changes; other README staleness is out of scope)Net diff: 8 insertions, 3936 deletions.
Explicitly preserved
uv::poll_*wrappers —src/http/manager.cpp:239-327uses them.fs.h/fs.cppAPI surface (stat / opendir / readdir / scandir / sendfile / …) — untouched.uv::latest_value_deliveryinawaiter.his dead code but not fs_event-owned; it stays for PR-7 (structural dedup) per the plan.Testing
cmake --build buildclean../build/unit_tests --snapshot-dir=tests/snapshots: 1367 passed, 2 skipped, 0 failed (baseline ~1413 before removing the fs_event suites).grep -rn fs_eventoverinclude/ src/ tests/ examples/and build files: zero residuals (only the intentional README migration note mentions the old name).Summary by CodeRabbit
Documentation
Breaking Changes