Open lachaib opened 4 years ago
Sorry, I missed the notification when you created this issue.
That is needed so that the main extension runs on the server when in a remote workspace. (The remote helper extension runs locally: https://github.com/joelspadin-garmin/vscode-private-extension-manager/blob/7abdbb9cb8f78bee487cf500e3b02b77eee9843e/remote-helper/package.json#L19-L21). I don't think I can remove that without breaking it for SSH, WSL, and Docker remote workspaces.
It sounds like this is an issue with code-server, as https://code.visualstudio.com/api/advanced-topics/remote-extensions#incorrect-execution-location indicates that most extensions fall into the "workspace" category.
As a workaround though, instead of removing extensionKind
could you try setting it to this instead?
{
"extensionKind": ["workspace", "ui"]
}
Hello,
My understanding was that ["workspace", "ui"] was the actual default behaviour, but sure, it can be set up explicitly as you suggest.
I don't think the issue is with code-server, but actually with how VS Code is listing the extensions from marketplace when run in browser mode compatibility. Somehow the extensions with kind "workspace" only will be considered as not available, while I checked that yours works fine or at least I didn't get to a point where I found limitations concerning where it is run. Same happened trying to join a LiveShare session in browser mode.
Just to show how it's behaving in LiveShare browser mode 😄
It's kind of a shame given that LiveShare or code-server are really proficient ways to share a workspace for pair/mob-programming, helping a junior dev, or create code spaces on the cloud. I'm thinking also about eclipse-che which is compatible with vsix plugins, that is also browser based and has similar use cases.
I will make the pull request if you agree to it and from that point on it'll be up to you to accept it or not 😉
Thanks for that error message. After tracking that down inside vscode's code, I found https://github.com/microsoft/vscode/blob/f74e473238aca7b79c08be761d99a0232838ca4c/src/vs/workbench/services/extensions/common/extensionsUtil.ts#L23-L26
Instead of ["workspace", "ui"]
, try ["workspace", "web"]
. It looks like they may have forgotten to document the "web" option on the page I linked earlier.
I just published v1.4.0 with your fix in it. Thanks!
Just tested now that it's on marketplace but for some reason it's still refusing to install from LiveShare browser session (which I obviously didn't encounter when I installed from vsix), though now at least it appears on marketplace.
I cannot reopen this issue but if you can it'd be good so that we can track follow-up on this issue, otherwise I will open a new one.
Reopened. I've verified that the package.json in v1.4.0 does include "web" in its extensionKind, so there must be something else needed to make that work.
I also opened an issue on the vscode repo asking for clarification on how "web" is supposed to work, since I can't find any documentation for it.
Found this documentation that might partially explain what needs to be done for an extension to work in web-browser, though I've not found anything related to the checks being performed and any extension that actually can be installed.
The response in https://github.com/microsoft/vscode/issues/111043 was that web extensions are a work in progress and are not officially supported yet.
Based on the things linked in that document, I suspect this extension may not be possible to run in a browser currently. It uses https://github.com/npm/pacote which appears to use fs
in ways that document says don't work.
Hello,
While trying to use code-server to generate a remote workspace, I discovered that I couldn't install private extension manager. After investigation I realised it's due to extensionKind: ["workspace"] property in package.json. I've clone the project, compiled it without the property and installed from vsix in my code-server, and I could see it working rather fine (at least it shows and installs extensions directly from my registry).
Would it be possible to remove this property from the package.json to make it properly working?
Thanks