Skip to content

Conversation

@rschnekenbu
Copy link
Contributor

@rschnekenbu rschnekenbu commented Sep 26, 2025

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

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

contributed on behalf of STMicroelectronics

Review checklist

Reminder for reviewers

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Sep 26, 2025
fixes #14890

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
@rschnekenbu rschnekenbu force-pushed the remi/14890-parcel-watcher-default-backend branch from 6999e7f to d35b266 Compare September 26, 2025 14:55
@ndoschek ndoschek requested a review from msujew September 29, 2025 08:11
@ndoschek ndoschek mentioned this pull request Sep 29, 2025
1 task
@ndoschek ndoschek self-requested a review September 30, 2025 10:12
Copy link
Contributor

@ndoschek ndoschek left a 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.

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Sep 30, 2025
Copy link
Member

@msujew msujew left a 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!

@rschnekenbu rschnekenbu merged commit 1e2d4d5 into master Sep 30, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Sep 30, 2025
@rschnekenbu rschnekenbu deleted the remi/14890-parcel-watcher-default-backend branch September 30, 2025 14:39
@github-actions github-actions bot added this to the 1.66.0 milestone Sep 30, 2025
rschnekenbu added a commit that referenced this pull request Sep 30, 2025
fixes #14890

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
rschnekenbu added a commit that referenced this pull request Sep 30, 2025
…16351)

fixes #14890

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
ndoschek pushed a commit that referenced this pull request Oct 1, 2025
…16351)

fixes #14890

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
@ndoschek ndoschek mentioned this pull request Oct 1, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants