-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump chokidar to v4 #2347
Bump chokidar to v4 #2347
Conversation
v3 was very flaky in our GitHub CI, and I was mainly trying to see if v4 is less flaky. It seems like that it’s less flaky in CI but is giving end users lots of trouble. Maybe we should revert this. On the other hand, maybe we should consider other options like https://www.npmjs.com/package/@parcel/watcher, although it doesn’t have a real “poll” mode. |
The lack of a polling watcher isn't an insurmountable problem, but it would require some engineering effort to deal with (possibly by moving the Dart watcher package's |
I actually did a POC for that at some point and concluded it was flaky and kind of dirty (with what it supports as of now). The problem is that the “query” mode requires user to first write a snapshot to disk, and later “query” the current state against the previous snapshot. This introduces two ugly issues: 1. It does not support snapshot in memory, meaning each directory watched needs at least one temporary file on disk for snapshot, which needs clean up. 2. It does not have atomic “query and update snapshot”, meaning depends on whether we update snapshot or query first at each interval, we either risks double firing or missing events due to non-atomic operation. Other than not having a good polling solution, pracel/watcher has been pretty good in the POC I did. |
Ah, that's too bad. We may need to rely on the Dart logic in that case. |
Chokidar v4 targets
node >=14
, which is the same as the current sass package, so there is no breaking change for end users. See: https://github.com/paulmillr/chokidar?tab=readme-ov-file#upgrading