Skip to content

Initializing JS/TS language features ignores files.watcherExclude #29782

@claritysolutionsteam

Description

@claritysolutionsteam

details

Initially vs code respects files.watcherExclude upon opening a workspace if no js/ts files are open vs code correctly watches all files in the workspace except for those indicated by files.watcherExclude
However as soon as a JS/TS file is opened the message "initializing JS/TS language features" is shown on the status bar and vscode watches all files.

reproducing

  1. veryify that excludes some things in the work space
    file > preferences > settings > files.watcherExclude
  2. close all open files and restart vs code
  3. veryify that vs code is watching all files in the workspace that are not excluded
  4. open (or create) a .js or .ts file
  5. see initializing JS/TS language features on the bottom status bar
  6. observe that vs code is watching all files in the workspace

exepected result: vs code should not watch files in the files.watcherExclude setting
actual result: vs code watches all files as soon as JS/TS language features are enabled

how to see what files vs code is watching

There are a number of ways to do this on linux (none of them all that easy).
Exact method may vary depending on version of linux
There are a number of methods discussed in https://unix.stackexchange.com/questions/15509/whos-consuming-my-inotify-resources/426001#426001
The method I used was to find the PID of code using ps EG: ps aux|grep code
this turns up multiple processes as code spawns subprocesses
then take those pids and
grep /proc//fdinfo/* inotify
the text on these lines seems to vary depending on linux version so it may read something else other then inotify
at least on CentOS Linux 7 (Core) these lines contain ino:
from there the number of files being watched can be compared to the number of files expected to be watched or
some method of stating the files in the workspace can be used to see exactly which files are being watched
for example ls -i will tell the inode number of the files listed (in decimal)

VS Code version: Code 1.30.2 (61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8, 2019-01-07T22:49:48.319Z)
OS version: Linux x64 3.10.0-862.3.2.el7.x86_64

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz (8 x 2699)
GPU Status 2d_canvas: unavailable_software
checker_imaging: disabled_off
flash_3d: unavailable_software
flash_stage3d: unavailable_software
flash_stage3d_baseline: unavailable_software
gpu_compositing: unavailable_software
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: enabled_readback
webgl2: unavailable_off
Load (avg) 1, 1, 1
Memory (System) 59.97GB (0.97GB free)
Process Argv --disable-extensions
Screen Reader no
VM 0%
Extensions disabled

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions