-
Couldn't load subscription status.
- Fork 2.7k
fix: avoid trying to use watchman for file system watcher #16335
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
Conversation
fixes #14890 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
6999e7f to
d35b266
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix @rschnekenbu! 🙌 I tested both the Electron and browser versions. On my Windows VM, the popup window issue in Electron is resolved. I also did some quick file-watching tests, which worked well as far as I could judge.
I also tested on my Linux (Ubuntu 24) system, and everything still works as expected.
Waiting for a second look from Mark before merging though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for me, thank you!
fixes #14890 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
…16351) fixes #14890 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
…16351) fixes #14890 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
What it does
Avoid trying to select watchman for the various OS for File Watching.
By default, @parcel/watcher tries to use watchman as backend. For this, it tries to connect to the watchman service via socket. This opens a pop-up on windows, as there is an error message displayed when watchman is not found.
Via options, it is possible to select the backend and not let @parcel/watcher evaluate if watchman exists. Thus it avoids the popup window.
As watchman is not expected to be deployed, this should not hurt current performances. It is still possible for a particular application to deploy specific options and choose again watchman, as the parcel options can be injected via a service.
references:
@parcel/watcher priorities: https://github.com/parcel-bundler/watcher?tab=readme-ov-file#watching
@parcel/watcher code for backend selection: https://github.com/parcel-bundler/watcher/blob/8dfd99440b8666e81cc6865f68697ab272dfe83d/src/Backend.cc
@parcel/watcher code for watchman backend detection: https://github.com/parcel-bundler/watcher/blob/8dfd99440b8666e81cc6865f68697ab272dfe83d/src/watchman/WatchmanBackend.cc#L49
How to test
Build Theia sample electron application on windows with the patch and try to start the electron app. The popup should not come.
The process monitor shall also not display any cmd.exe process with watchman command triggered.
Follow-ups
potential follow-up
#15921
Breaking changes
Attribution
contributed on behalf of STMicroelectronics
Review checklist
Reminder for reviewers