Skip to content
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

File watcher still watching files ignored by .gitignore + search.useIgnoreFiles #102829

Closed
sbrocket opened this issue Jul 17, 2020 · 1 comment
Closed
Labels
*as-designed Described behavior is as designed

Comments

@sbrocket
Copy link

Issue Type: Bug

I've been running into issues with VSCode complaining about not being able to watch such a large workspace even though my host is already configured with "fs.inotify.max_user_watches=524288" (and has been for years).

I use a combination of search.useIgnoreFiles (set to its default of enabled) and manual files.watcherExclude settings to attempt to ignore chunks of my workspace. I've been debugging these issues and trying to figure out how VSCode could be running into the inotify limit despite these ignore settings, and despite the fact that (using tree and other tools) I've confirmed that my workspace is way under 524288 directory+files with just a couple of my excluded directories (much less all of them).

I found a nice script that uses /proc's fdinfo data to dump the list of files being watched (from a comment on another VSCode issue; #45295 (comment)).

The first issue I noticed while digging through this tool's output was that the file watcher was watching directories and files that should have been ignored by my .gitignore and search.useIgnoreFiles. If it included a directory in files.watcherExclude, it would be properly not watched, but entries in .gitignore were still getting watched. Inside VSCode, the Explorer does show .gitignore'd directories greyed out and file search does not include them in results, so that part is working correctly, but it seems like the list of .gitignore'd directories is not making it over to the file watcher.

VS Code version: Code 1.47.2 (17299e4, 2020-07-15T18:18:50.054Z)
OS version: Darwin x64 19.5.0
Remote OS version: Linux x64 5.2.17-1rodete3-amd64

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 2, 2
Memory (System) 16.00GB (0.46GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote SSH: desk
OS Linux x64 5.2.17-1rodete3-amd64
CPUs Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz (56 x 1197)
Memory (System) 125.89GB (13.48GB free)
VM 0%
Extensions (19)
Extension Author (truncated) Version
theme-monokai-pro-vscode mon 1.1.17
vscode-json5 mrm 1.0.0
remote-containers ms- 0.128.0
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.4
vscode-remote-extensionpack ms- 0.20.0
vscode-gn npc 1.1.0
vim vsc 1.14.5
material-theme zhu 3.8.3
githistory don 0.6.8
nasc-touchbar fel 1.12.0
language-fidl fuc 0.3.2
go gol 0.15.1
vscode-clangd llv 0.1.6
rust-analyzer mat 0.2.240
git-graph mhu 1.24.0
rewrap stk 1.12.0
clang-format xav 1.9.0

(2 theme extensions excluded)

@roblourens
Copy link
Member

search.useIgnoreFiles is used for search, not for file watching. .gitignore is not used for filewatching either. You want files.watcherExclude which is looks like you have found.

@roblourens roblourens added the *as-designed Described behavior is as designed label Jul 18, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed
Projects
None yet
Development

No branches or pull requests

2 participants