You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the first folder in a workspace restarts the extension host.
This is a problem because it breaks the extension's ability to listen for workspace lifecycle events like workspace.onDidChangeWorkspaceFolders (the extension cannot catch an event that changes folder 0 since it's being restarted).
VS Code version: Code 1.21.1 (79b44aa, 2018-03-14T14:39:09.335Z)
OS version: Darwin x64 17.3.0
Reproduces without extensions
The text was updated successfully, but these errors were encountered:
An extension registers a filesystem provider with workspace.registerFileSystemProvider for a certain scheme (e.g., ftp)
Adding folders to the workspace that have this scheme work fine; that is, they are handled by the intended provider ✅
Moving folders around that affect the first folder in the workspace breaks this pattern though; the extension restarts, and the mapping between scheme and provider is lost (even if the extension re-establishes it on its activation event). Workspace files that have been fetched with the intended provider will now attempt to be accessed with the default filesystem provider, resulting in ENOENT etc. ❌
Hard to see, but the workspace root served by the ftp provider goes empty and throws an ENOENT after the first workspace folder is modified (its extension is restarted).
Unfortunately this is by design so that we do not break our deprecated rootPath property in the API that is always the first root folder but cannot change during runtime without a restart.
Issue Type: Bug
Changing the first folder in a workspace restarts the extension host.
This is a problem because it breaks the extension's ability to listen for workspace lifecycle events like
workspace.onDidChangeWorkspaceFolders
(the extension cannot catch an event that changes folder 0 since it's being restarted).VS Code version: Code 1.21.1 (79b44aa, 2018-03-14T14:39:09.335Z)
OS version: Darwin x64 17.3.0
Reproduces without extensions
The text was updated successfully, but these errors were encountered: