-
Notifications
You must be signed in to change notification settings - Fork 766
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
vscode ignores files.watcherExclude #2974
Comments
@mic-e thank you for the issue. we will start discussing the issue with vscode file watcher team. we ask vscode to watch file for us, but we don't watch them ourselves. vscode file watcher should respect the option and exclude those folders from watching. let me figure out what is going on. |
@mic-e vscode should respect the option and exclude folders from watching. I also just tested it myself on windows and confirmed that it works as expected. if it didn't work on linux, It sounds like a bug in vscode file watcher implementation. by the way, files.watcherExclude is not our option but vscode (platform)'s option we run on that will take precedence over us on what to watch. |
@mic-e it looks like github doesn't allow me to transfer this issue to vscode repo. can you open new issue on vscode repo (https://github.com/Microsoft/vscode)? vscode should respect the option, if not, vscode side needs to fix the bug. |
looks like there are a few existing issues on vscode. microsoft/vscode-remote-release#6436 |
I also had this issue on Centos 7, where I cannot control the maximum number of inotify watches. I believe the mentioned issues (microsoft/vscode-remote-release#6436, microsoft/vscode#137872) are when they try to use glob pattern. For now on Linux, the vscode team recommended to use the full path or relative path to the workspace directory. I did try with the full path:
Without activate pylance, I didn't have any error. As soon as I open a python file, I got file watcher error: This is related to the issue #2914 and is said to be fixed in version 2022.6.30. I tested on that version and the latest, and it still doesn't work. |
Environment data
Expected behavior
PyLance watches all files that are relevant to the project, but ignores files that are listed in the VSCode setting
files.watcherExclude
Actual behavior
PyLance ignores
files.watcherExclude
Description
This is a possible follow-up to #2914.
I work with a SSH remote host; on this host I am not able to adjust the maximum number of
inotify
watches.PyLance
immediately opens the maximum amount (8172) of file watches, using up all resources. Because of this, basic system commands such asjournalctl -f
stop working properly while VSCode is connected to the remote system.When inspecting the
inotify
watches I can see that pylance is monitoring many files in/usr/lib/python3.8
,/usr/lib/python3/dist-packages
,/opt/ros/noetic/lib/python3/dist-packages
.I attempted to blacklist these folders through the
files.watcherExclude
setting by adding entries such as/usr/lib/python3/**
but this had no effect.The text was updated successfully, but these errors were encountered: