Skip to content

avoid printing "Events were dropped by the FSEvents client" during watch #9678

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

Merged
merged 1 commit into from
Apr 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scopes/workspace/watcher/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,10 @@ export class Watcher {
if (msgs?.onAll) events.forEach((event) => msgs.onAll(event.type, event.path));
}
if (err) {
msgs?.onError(err);
if (!err.message.includes('Events were dropped by the FSEvents client')) {
// the message above shows up too many times and it doesn't affect the watcher.
msgs?.onError(err);
}
if (err.message.includes('Error starting FSEvents stream')) {
throw new Error(`failed to start the watcher: ${err.message}.
try rerunning the command. if that doesn't help, please refer to this Watchman troubleshooting guide:
Expand Down