-
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
Extension is watching files outside of the workspace #2914
Comments
I've now identified an even worse culprit: microsoft/TypeScript#49474 Still, I wouldn't expect the python extension to watch neighbouring project folders |
@MetRonnie Perhaps use this to avoid the TypeScript resource draining. I saw this happening around 10 months ago (Oct-2021) to my laptop and increasing the fan speed that created some unreasonably loud fan-noise. The following got it resolved. {
// This increases VS Code speed
/*
- source: https://dev.to/rmorabia/how-to-make-visual-studio-code-150-faster-in-large-projects-3eag
- Why? Dangerously loud laptop fan
*/
"typescript.disableAutomaticTypeAcquisition": true
} |
The watcher set in the original bug report is caused by Pylance, transferring this. |
this is by design. we watch all paths reported by python sys.path if we can. but I think we can improve it by removing any path part of multi workspace root since they should be already watched by other workspace. |
I understand if it's by design, but if it's exceeding the watcher limits we should probably be doing something about it. Do we have to watch for all paths in |
@karrtikr it is already root folder of each importing roots (such as site-packages or python/lib folder). but we are not actual one who watch, we just ask vscode to watch those folders. and actual implementation is done by vscode. so for file watch max limitation, actual implementation (vscode) should take care, I am not sure there is much we can do since actual implementation is owned by host (vscode or vs) |
I understand we're not the actual ones who implement the watcher, but it looks like its not practical to ask to watch so many directories (I'm not sure if it's a bug). Also for me personally
If we're only watching the root directories: |
@karrtikr if OS throws because of 7 directory watched, I think OS has an issue rather than us. also, those kind of dedup I think should be done by vscode, since we can only do over what we watch, if other extension watches same folders, we can't dedup. those kind of dedup better to be done by host (vscode) in my opinion. that being said, there are some we can do to support multi workspace better. and I will work on those soon. |
Right, I understand. We should make sure this has been reported on VSCode though. |
@karrtikr I just looked at https://github.com/microsoft/vscode/wiki/File-Watcher-Issues it looks like it is a limitation of Linux file watcher implementation. user might need to turn off file watching certain folders using vscode's |
@karrtikr I talked with vscode file watcher owner. he said, deduping is not there yet but they have work item to implement it, and asked us to dedup for now. I have WIP PR, will check in soon. |
Great, thanks for the update. |
I have tried to use |
This issue has been fixed in version 2022.6.30, which we've just released. You can find the changelog here: CHANGELOG.md |
@bschnurr Is the fix some kind of dedup like @heejaechang mentioned, or was a different bug identified? It seems unreasonable to me that you have to watch the hierarchy of |
By the way, I noticed if I disable the pylance extenstion and then reload the workspace, the issue goes away. If I then re-enable pylance, the problem does not recur. So it seems this |
@phord I think the full features of the extension don't load until you have a python file as an open tab, could that be why? |
I'm running Pylance 2022.6.30 using an ssh remote host. |
Issue Type: Bug
Behaviour
Expected vs. Actual
Expected: Python extension does not watch files outside of the workspace
Actual: Log (Window):
where the path is sometimes a neighbouring python project workspace or
~/.conda/envs/<env_name>/lib/python3.9
. The neighbouring projects in question are not imported by any of the python files in this workspace (but they are the locations of editable pip installs in the conda environment).Steps to reproduce:
Additional context
This only started happening recently.
If I disable the Python extension for the workspace and close + reopen, I don't get the ENOSPC error until I re-enable the extension.
Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2022.8.0
VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:23:40.286Z)
OS version: Linux x64 3.10.0-1160.66.1.el7.x86_64
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
The text was updated successfully, but these errors were encountered: