Closed Josverl closed 2 years ago
we should disable all fs access for virtual workspace. we can't use vscode file provider api or new LSP file system api proposal for now. that require async file access which we currently doesn't support.
This issue has been fixed in version 2022.7.41, which we've just released. You can find the changelog here: CHANGELOG.md
confirmed resolved in Pylance preview 2022.7.41
Environment data
Code Snippet
Repro Steps
The complete repro steps, logs , and screen recording are located in a repro repo
https://github.com/Josverl/stubs-esp-test/blob/main/repro.md
Expected behavior
one or more of the below:
path
section of an URI is available on the local filesystemref: https://github.com/Microsoft/vscode-uri#vscode-uri
sample.code-workspace
Actual behavior
As soon as a virtual filesystem is part of the workspace, Pylance will attempt to scan the local rootdrive (
C:\
or '/' ) where the path is relative to the rootpath of the virtual filesystem. I assumeURI.path
is used./
-->C:\
, Pylance tries to scan the entire local file system , and fails.Logs
After that essentially PyLance stops functiong for either the local or the virtual filesystem.
this is shown in the Pylance logs by looking for the tag :
Search paths for \
Full log: MemFS virtual provider : https://github.com/Josverl/stubs-esp-test/blob/main/Memfs_workspace.log
references
https://github.com/microsoft/pylance-release/discussions/2696