eclipse-theia/theia

files.watcherExclude changes are not applied to active watchers

Offen

#17.699 geöffnet am 23.06.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.478 Forks)batch import
bugfile-watchersfilesystemhelp wanted

Repository-Metriken

Stars
 (18.676 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 15T 4h) (75 gemergte PRs in 30 T)

Beschreibung

Bug Description:

Active file watchers are stamped with the files.watcherExclude value at the time they are created (FileService.resolveWatcherExcludes in packages/filesystem/src/browser/file-service.ts). When a user changes files.watcherExclude, existing watches are not re-issued, so the new value is not honored until each watcher happens to be recreated:

  • newly-excluded directories stay watched (continue to consume OS file watches and emit events);
  • newly-included directories stay unwatched.

This is a pre-existing gap. https://github.com/eclipse-theia/theia/pull/17630 widened where the excludes are applied (every watcher rather than specific callers) but did not add live re-watching on preference change. Split out as a follow-up at the reviewer's request.

Steps to Reproduce:

  1. Open a workspace and let file watchers start with the default files.watcherExclude.
  2. Add a new pattern, e.g. "files.watcherExclude": { "**/build/**": true }.
  3. Observe that the build subtree is still watched — the OS watches are not updated to honor the new exclude until the watcher is recreated (e.g. a reload).

Additional Information

Contributor Guide