Whether a plugin-requested watch should not be registered at all.
Theia's backend ignores the recursive flag and always watches recursively. A NON-recursive
watch rooted at a strict ancestor of a workspace root - e.g. a language server (such as
redhat.java / JDT-LS) watching the PARENT of the workspace folder via
RelativePattern(parentDir, folderName) purely to detect deletion of the folder itself -
would therefore be turned into a recursive crawl of every sibling subtree under that parent,
i.e. thousands of inodes the workspace does not own, which can exhaust the OS file-watch
budget. files.watcherExclude cannot bound it because the root is outside the workspace, so
the only effective mitigation is to not register the watch.
Explicit recursive requests are honored as-is, and watches on or inside a workspace root are
left untouched.
Whether a plugin-requested watch should not be registered at all.
Theia's backend ignores the
recursiveflag and always watches recursively. A NON-recursive watch rooted at a strict ancestor of a workspace root - e.g. a language server (such asredhat.java/ JDT-LS) watching the PARENT of the workspace folder viaRelativePattern(parentDir, folderName)purely to detect deletion of the folder itself - would therefore be turned into a recursive crawl of every sibling subtree under that parent, i.e. thousands of inodes the workspace does not own, which can exhaust the OS file-watch budget.files.watcherExcludecannot bound it because the root is outside the workspace, so the only effective mitigation is to not register the watch.Explicit recursive requests are honored as-is, and watches on or inside a workspace root are left untouched.