-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vsx-registry: implement extension compatibility handling #8191
Conversation
805c406
to
2f33ffe
Compare
We currently perform multiple We should probably adjust the code to properly store an extension's information (obtained through the search) which would then be used to perform different operations such as installation. At the moment, we are performing multiple external requests and always solely by |
9a3d607
to
a93170b
Compare
6ffb225
to
a7322d4
Compare
7c7e1e4
to
fd4ed00
Compare
47de5a2
to
90d7eba
Compare
90d7eba
to
27258a4
Compare
27258a4
to
3ee4e3a
Compare
I'll need to address the recent changes to |
0f5a1c5
to
1f842ea
Compare
@spoenemann are there any plans for the Currently, the api does not allow clients to easily determine and fetch compatible extensions without multiple queries which raises performance concerns. In addition, each client would have to perform this same extension compatibility fix instead of the server supporting it for all. |
I added the engines to search results in eclipse/openvsx#144. Since eclipse/openvsx#181 you need to set |
@spoenemann I am already using For example: (
Perhaps you see something incorrect in my approach, or notice some room for improvement in the api itself. |
The |
Correct, we currently use the @akosyakov due to this limitation, and the fact it is used for
For this comment, how would you propose the |
We could add an
|
@spoenemann that's what I was hoping for, to add a new query parameter to make it easier for clients to determine compatibility. Having the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally forgot that there's an includeAllVersions
option in the query
endpoint. I though you mean the option with the same name at the search
endpoint.
By posting a query with includeAllVersions: true
, you get an array of the full metadata of all versions of the extension, including the engines
of every version. By using this it should not be necessary to send multiple requests per extension.
5e4faae
to
1b521ea
Compare
@spoenemann thank you for your response on the way forward, I updated the pull-request to do as you suggested. |
1b521ea
to
c624c6b
Compare
@marechal-p thank you for the feedback, I applied your suggestions 👍 |
c624c6b
to
6748ca0
Compare
6748ca0
to
3cae29b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the code looks good to me now.
@vince-fugnitto I think you wanted to wait after this week's release before merging, so we have next month to fix any issues, before the PR is part of a release. I think it makes sense. |
Right, I'll wait for after this week's release, fix conflicts and merge if there are no objections 👍 |
The following commit updates the logic when searching and installing vscode extensions from `open-vsx` by verifying for compatibility using the `engines.vscode` property. The changes include: - ability to read the default vscode api version from the `cli` or `default`. - ability to determine the compatible version from the search result list. - checks for compatibility. Signed-off-by: vince-fugnitto <[email protected]>
The following commit adds a new command to the `api-samples` to output the supported vscode api version for development purposes. The api version is changeable by specifying a cli argument such as: `yarn start --vscode-api-version={version}` Signed-off-by: vince-fugnitto <[email protected]>
3cae29b
to
2946459
Compare
What it does
Fixes: #7464
The following pull-request includes extension compatibility handling when searching, and installing extensions from the
open-vsx
view. The changes include using the newopen-vsx
api to determine a compatible version of an extension by parsing theengines.vscode
property against our supported API version.The pull-request includes:
engines.vscode
propertycli
(defaults to our default api version)downloadUrl
): question: should the search response include the downloadUrl as part of 'allVersions' eclipse/openvsx#149How to test
yarn start --vscode-api-version={version}
, the api version should properly be updated, searching for extensions should still respect the cli argumentReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]