watcher icon indicating copy to clipboard operation
watcher copied to clipboard

Watcher.subscribe might miss some of many fast subsequent changes

Open cdietrich opened this issue 1 year ago • 5 comments

Originally reported as https://github.com/microsoft/vscode/issues/220039

when we do a huge number of file changes then Watcher.subscribe might not always produce all events and thus we miss relevant file changes

a reproducer can be found at https://github.com/cdietrich/parcel-watcher-bug

  • on mac air m1 i can see it quite reliably
  • on mac m2 pro less
  • on linux mint (t480s) rarely but can be seen

cdietrich avatar Aug 09 '24 06:08 cdietrich

This issue is impacting the Test Explorer in the C# Dev Kit Extension. Missing these events causes some tests to be skipped or not recognized properly, leading to a frustrating user experience. We already have a GitHub issue reported here: https://github.com/microsoft/vscode-dotnettools/issues/996

It would be amazing if this could be looked into, as fixing it would really help improve the reliability of the Test Explorer.

ocallesp avatar Aug 12 '24 16:08 ocallesp

@cdietrich I was wondering if there are any updates or plans to address this issue. This bug affects the Test Explorer in C# Dev Kit extension, causing tests to be skipped or not recognized properly. Resolving it would significantly improve reliability for users.

Looking forward to any updates. Thank you.

ocallesp avatar Dec 09 '24 18:12 ocallesp

When running @cdietrich 's demo script, it sometimes (10%?) counts 0 files, and unsubscribe() hangs indefinitely on my Linux machine. I don't know if this is the same problem that was originally reported, but FWIW, upgrading to 2.5.0 fixes this specific issue for me. I believe it may be thanks to this particular fix.

BTW, thanks for the nice demo script Christian, I found it useful to debug on my side.

j-nolan avatar Dec 11 '24 15:12 j-nolan

@ocallesp i just reported the issue as I am affected over a longer dependency chain

cdietrich avatar Dec 11 '24 15:12 cdietrich

Fyi VS Code is trying to update to 2.5.0 for our 1.97.x January release: https://github.com/microsoft/vscode/commit/679a9f1aceeb8b1aa3bcd0542eb5e5aca6046600

bpasero avatar Dec 11 '24 16:12 bpasero