-
Notifications
You must be signed in to change notification settings - Fork 324
[plan] Improve fsnotify file watching implementation #5176
Copy link
Copy link
Closed
5 / 55 of 5 issues completedClosed
5 / 55 of 5 issues completed
Copy link
Labels
Description
Overview
This tracking issue covers improvements to the fsnotify-based file watching functionality in the compile --watch command, based on the analysis from the Go Fan report.
Source: Discussion #5175
The current implementation is solid (8.5/10 rating) but has opportunities for enhancement:
- Reducing event noise (Chmod filtering)
- Better error handling and user feedback
- Platform-specific optimizations
- Handling burst events more gracefully
Planned Tasks
The improvements are organized by priority:
Priority 1: Quick Wins
- Filter out Chmod events to reduce processing noise
- Improve subdirectory watch error handling with better logging
- Document FSNOTIFY_DEBUG environment variable for troubleshooting
Priority 2: Feature Enhancements
- Handle event overflow errors with user-friendly messages
- Add platform-specific optimizations (buffered watcher, Windows buffer size)
Context
- Current implementation:
pkg/cli/compile_command.go:753-931 - Module version: fsnotify v1.9.0
- Assessment: Well-architected, production-ready, but room for polish
References
- Go Fan Report: Discussion [go-fan] Go Module Review: fsnotify #5175
- Module docs: https://github.com/fsnotify/fsnotify
- Spec file:
specs/mods/fsnotify.md
AI generated by Plan Command for discussion #5175
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.