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
{{ message }}
Repository navigation
Manage special defaults of the virtualWorkspaces property #122836
Extensions have started to adopt the new Virtual Workspace capability: Guide, Tracking Issue
Until extensions have adopted the new capability, we came up with an internal list of extensions that we think should be disabled in virtual workspaces. The list that is reflected in product's project.json.
The issue is used to keep the list updated. We can remove extensions as a soon as they adopted the virtualWorkspaces property.
Martin Aeschlimann (@aeschli) from the release note that it seems we generated list by checking if an extension is using fs. Do you have an idea how this will impact Vim. Vim's desktop version uses fs but it can work with a virtual file (textDocument). Asking as the wiki link is not valid yet.
Just to share what I've found when I did the initial checking of the Vim extension. I found that it works OK, but I haven't tested all the features of Vim. From reviewing the code the extension already abstracts fs access in src/platform/node/fs.ts and uses vscode.workspace.fs where possible 👍 . However, vscode.workspace.fs is not used everywhere and it would be good investigate the impact of this in a virtual workspace setup and to handle it gracefully. For example, unlink is using fs directly.
changed the title [-]Track the adoption of the `virtualWorkspaces` property[/-][+]Manage special defaults of the `virtualWorkspaces` property[/+]on May 10, 2021
My Angular Schematics extension is doing a lot of files/paths management, and trying to comply with the virtual workspaces guide (PR cyrilletuzi/vscode-angular-schematics#551) revealed many things (being forced to use Node APIs because of missing methods on vscode.Uri, being forced to use fsPath in some place because of an issue with path in some scenarios, etc.). Where should I report these things?
Is there a reason some methods (like joinPath()) are directly available in @types/vscode while some others (like dirname() and basename()) require vscode-uri? Now that you explicitly require to not use Node APIs directly, it would make sense to include everything directly in @types/vscode.
Also, there is still some issues and missing features so I'm able to get rid of all Node APIs:
I need path.relative() a lot, and it doesn't exist in vscode-uri. Can it be added? It would work the same (2 Uris as params, and returns a string representing the relative path).
contextUri.path wrongly uppercased on Windows #116298, which was not taken into account properly, should be reopened and fixed (otherwise I'm forced to use .fsPath in some places, as .path is buggy in some scenarios explained in the issue).
vscode.workspace.createFileSystemWatcher() only accepts a fsPath string, and not a Uri as all other VS Code APIs. Do you confirm it's intended and it can't be done with schemes other than file, and thus that extensions require a manual check (if (uri.scheme === 'file'))?
Activity
rebornix commentedon May 3, 2021
Martin Aeschlimann (@aeschli) from the release note that it seems we generated list by checking if an extension is using
fs. Do you have an idea how this will impact Vim. Vim's desktop version usesfsbut it can work with a virtual file (textDocument). Asking as the wiki link is not valid yet.egamma commentedon May 4, 2021
Peng Lyu (@rebornix) Martin Aeschlimann (@aeschli) has started to update the guide https://github.com/microsoft/vscode/wiki/Virtual-Workspaces and there is more info available.
Just to share what I've found when I did the initial checking of the Vim extension. I found that it works OK, but I haven't tested all the features of Vim. From reviewing the code the extension already abstracts
fsaccess insrc/platform/node/fs.tsand usesvscode.workspace.fswhere possible 👍 . However,vscode.workspace.fsis not used everywhere and it would be good investigate the impact of this in a virtual workspace setup and to handle it gracefully. For example, unlink is usingfsdirectly.[-]Track the adoption of the `virtualWorkspaces` property[/-][+]Manage special defaults of the `virtualWorkspaces` property[/+]cyrilletuzi commentedon May 12, 2021
My Angular Schematics extension is doing a lot of files/paths management, and trying to comply with the virtual workspaces guide (PR cyrilletuzi/vscode-angular-schematics#551) revealed many things (being forced to use
NodeAPIs because of missing methods onvscode.Uri, being forced to usefsPathin some place because of an issue withpathin some scenarios, etc.). Where should I report these things?aeschli commentedon May 14, 2021
Cyrille Tuzi (@cyrilletuzi) You can find path like utilities in the
vscode-urinode module:See https://www.npmjs.com/package/vscode-uri, section
Usage: Utilcyrilletuzi commentedon May 25, 2021
Martin Aeschlimann (@aeschli) Thanks,
vscode-urisolved some of my issues.joinPath()) are directly available in@types/vscodewhile some others (likedirname()andbasename()) requirevscode-uri? Now that you explicitly require to not use Node APIs directly, it would make sense to include everything directly in@types/vscode.Also, there is still some issues and missing features so I'm able to get rid of all Node APIs:
I need
path.relative()a lot, and it doesn't exist invscode-uri. Can it be added? It would work the same (2Uris as params, and returns a string representing the relativepath).contextUri.path wrongly uppercased on Windows #116298, which was not taken into account properly, should be reopened and fixed (otherwise I'm forced to use
.fsPathin some places, as.pathis buggy in some scenarios explained in the issue).vscode.workspace.createFileSystemWatcher()only accepts afsPathstring, and not aUrias all other VS Code APIs. Do you confirm it's intended and it can't be done with schemes other thanfile, and thus that extensions require a manual check (if (uri.scheme === 'file'))?aeschli commentedon Sep 15, 2021
Only one more adoption since July. My guess is that given we provide the default, the listed extensions don't have any pressure to adopt.
I'll close this issue now and will make changes to our default on request.