Closed garylavayou closed 2 months ago
let's try and reproduce
I tried to reproduce with these steps:
$ code-marketplace --extensions-dir ./extensions add https://gitlab.com/api/v4/projects/5261717/packages/generic/dist-desktop/v5.9.0/gitlab-workflow-5.9.0.vsix
Unpacked GitLab.gitlab-workflow@5.9.0 to /home/coder/code-marketplace/extensions/GitLab/gitlab-workflow/5.9.0
- GitLab.gitlab-workflow@5.9.0 has 1 dependency
- vscode.git
- GitLab.gitlab-workflow@5.9.0 is not in a pack
$ export EXTENSIONS_GALLERY={"serviceUrl":"http://localhost:3001/api", "itemUrl":"http://localhost:3001/item", "resourceUrlTemplate": "http://localhost:3001/{publisher}/{name}/{path}"}
$ code-server --install-extension gitlab.gitlab-workflow
Installing extensions...
Error while installing extensions: connect ECONNREFUSED 127.0.0.1:3001
$ code-marketplace --extensions-dir ./extensions server &
2024-08-28 20:42:21.566 [info] Started API server address=127.0.0.1:3001
$ code-server --install-extension gitlab.gitlab-workflow
Installing extensions...
Installing extension 'gitlab.gitlab-workflow'...
Extension 'gitlab.gitlab-workflow' v5.9.0 was successfully installed.
But I was able to install the gitlab.gitlab-workflow
extension (both from the UI and from the CLI) without any errors.
Did you add the built-in extensions to the marketplace? Maybe that is what is making code-server try to install them, where normally the extension would not show up in the query so code-server would not try to install it. I think there is no reason to add the built-in extensions to the marketplace (correct me if I am wrong) so they can be skipped.
If that is what happened, we could improve the experience by one or more of the following:
Unpacked GitLab.gitlab-workflow@5.9.0 to /home/coder/code-marketplace/extensions/GitLab/gitlab-workflow/5.9.0
- GitLab.gitlab-workflow@5.9.0 has 1 dependency
- vscode.git (built-in)
- GitLab.gitlab-workflow@5.9.0 is not in a pack
But I am not sure how to detect if an extension is built-in. Maybe we can rely on the 0.10.0
marker, or maybe we would have to maintain a hard-coded list.
Oh actually there is a tag in the manifest indicating it is built-in, so we could use that to implement 2 and/or 3 at least. With 1 all we have is the name of the extension.
Although...maybe that is just added by Open VSX. We can think about it more once we know how/if the extension was added to the marketplace. Was it added by downloading from Open VSX?
For what it is worth, the VS Code marketplace does not seem to contain vscode.git
at all, but Open VSX does, so this might just be a weird thing that Open VSX does differently.
@garylavayou We would recommend not adding built-in extensions right now (they exist already). If you have a use-case that necessitates this workflow, please feel free to re-open and tell us about it!
Oh actually there is a tag in the manifest indicating it is built-in, so we could use that to implement 2 and/or 3 at least. With 1 all we have is the name of the extension.
Although...maybe that is just added by Open VSX. We can think about it more once we know how/if the extension was added to the marketplace. Was it added by downloading from Open VSX?
@code-asher Yes, I have found that a built-in extension has the namespace of vscode
. So, when I try to resolve and add dependencies to the marketplace, I can prevent those built-in extensions from being added.
@garylavayou We would recommend not adding built-in extensions right now (they exist already). If you have a use-case that necessitates this workflow, please feel free to re-open and tell us about it!
@Kira-Pilot I have removed those built-in extensions from marketplace, and the installation then will not produce the error.
1. Brief Description
When installing extensions from the self-hosted code marketplace, the code-server log shows that the built-in
vscode.git-base
is not compatible with Code1.79.2
, which fails the installation of extensions that depend on it.2. Details
As a fallback, I try to install the same extension from the default registry, i.e., https://open-vsx.org, and it succeeds. So, this should not be a problem with
code-server
itself.Checking the extension data of
vscode.git-base
from open-vsx.org, we can find that this extension requires a fixed version of vscode0.10.0
.While most extension will declare the vscode version in a foreward compatible manner, like
{"vscode": "^1.82.0"}
withgitlab.gitlab-workflow
.Hence, as
vscode.git-base
requires vscode0.10.0
, any recent version of Code-Server will fail for the dependency check when installing from the self-hosted marketplace. In contrast,open-vsx.org
seems can handle this situation, and finally succeeds in the installation of related extensions.2.1. Code-Server Version
4.14.1
1.79.2
2.2. Related Extension
The following related extension depends on the built-in extension
vscode.git-base
,waderyan.gitblame
waderyan.gitblame@10.3.0
gitlab.gitlab-workflow
gitlab.gitlab-workflow@3.93.1
3. Related Logs
Logs with Code
1.79.2
:Logs with Code
1.90.2
(with stack trace information):4. Feature Requests