Skip to content
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: update api-compatibility handling #9280

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Mar 30, 2021

What it does

The following pull-request updates the logic for determining which extensions from open-vsx are API-compatible.
The changes remove the previous assumption that vscode-builtin extensions could not be downloaded through the extensions-view.

The changes also improve the overall performance when dealing with builtins:

  • startup performance is improved as we no longer need to make requests to open-vsx for their information as all the information we need is local.
  • less overall API calls to open-vsx which does not burden them.

The changes include the following behavior updates:

  • bundled builtins (added through the package.json) behave like today, we skip determining their compatibility as they are controlled by application-developers (use the actual model with PluginType.System to determine builtins).
  • vscode-builtin extensions searched and fetched from the extensions-view are checked for API-compatibility, and the framework fetches the latest compatible extension.

How to test

  1. extensions searched from the extensions-view should be checked for their compatibility.
  2. extensions defined in the package.json should not be checked for their compatibility (as they are controlled by application developers).

To verify step 1, you can do the following:

  1. delete the plugins folder - rm -rf plugins.
  2. start the application at an older API version - (cd examples/electron && yarn start --vscode-api-version=1.29.0).
  3. in the extensions-view, search for typescript - the vscode-typescript-language-features should not be present as there should be no version which supports this API level.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added builtins Issues related to VS Code builtin extensions vsx-registry Issues related to Open VSX Registry Integration labels Mar 30, 2021
@vince-fugnitto vince-fugnitto self-assigned this Mar 30, 2021
@vince-fugnitto
Copy link
Member Author

@marechal-p I updated the pull-request based on the latest feedback 👍

paul-marechal
paul-marechal previously approved these changes Apr 7, 2021
@paul-marechal paul-marechal dismissed their stale review April 7, 2021 15:59

Just noticed the this.api.getExtension(id) call if we are handling a builtin. Do we really need to make an API call when dealing with builtins?

@vince-fugnitto vince-fugnitto force-pushed the vf/vsx-updates branch 5 times, most recently from 2b07510 to 6774338 Compare April 7, 2021 18:20
The following commit updates the logic present in `@theia/vsx-registry`
which is used to determine API-compatible extensions. The changes update
the previous assumption that vscode-builtin extensions could not be
downloaded through the extensions-view.

The changes improve the performance overall when dealing with `builtin`
extensions by not updating their information through the registry API
calls which are unecessary. As a result, startup times are improved,
local information such as the extension-editor is quicker, and there are
less API-calls overall which do not burden the registry.

The updated logic behaves in the following way:
- builtins bundled with the application are excluded from fetching their
  compatible version.
- builtins installed through the extensions-view are checked for their
  latest compatible version.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto merged commit c59a346 into master Apr 9, 2021
@vince-fugnitto vince-fugnitto deleted the vf/vsx-updates branch April 9, 2021 16:57
@github-actions github-actions bot added this to the 1.13.0 milestone Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins Issues related to VS Code builtin extensions vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants