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: support buildtime 'extensionPack' handling #9425

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented May 3, 2021

What it does

Fixes: #9224

The following commit adds improved support for extensionPack plugins defined as builtins. Previously, extensionPacks could be referenced as builtins, but they would later be resolved when the application is first started. For large packs (such as vscode builtins) this would result in a long startup time, where extensionPacks would need to be resolved, and then downloaded. The following commit fixes that problem by allowing extensionPack to be resolved and fetched at buildtime rather than
runtime.

In order to implement the improvement, a new dev-package was created (@theia/ovsx-client) which includes the common logic for the cli and @theia/vsx-registry (previously part of the @theia/vsx-registry) extension. This logic which interacts with the registry (fetch, search, download, determine compatibility) is now used by the cli (buildtime), and vsx-registry (runtime). The @theia/vsx-registry extension was refactored and cleaned up as a consequence.

The idea when resolving builtin extensions at buildtime is the following:

  • download extensions like today (master).
  • determine if any extensionPack(s) exist.
  • fetch individual extension ids.
  • download latest compatible versions of all individual extension ids.

How to test

download-plugins cli:

  • verify that downloading plugins works like today, plugins are fetched and unpacked if necessary (based on flag).
  • verify that if an extension pack is used as a builtin example it is downloaded, and for each id present in the pack the corresponding extension is fetched at its latest compatible version (based on application api level - this can be updated with a flag).
  • verify that a mix of standard extensions and extension-pack work correctly - if an extension is present in both (listed normally and in the pack), the pack will not re-fetch the extension at a different version.

vsx-registry:

  • verify that changes to vsx-registry still work correctly:
    • searching extensions with the extensions-view
    • installing/uninstalling extensions with the extensions-view
    • listing installed extensions, builtin extensions

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com
Co-authored-by: marechal-p paul.marechal@ericsson.com

@vince-fugnitto vince-fugnitto added the vsx-registry Issues related to Open VSX Registry Integration label May 3, 2021
@vince-fugnitto vince-fugnitto force-pushed the vf/ovsx-client branch 4 times, most recently from 3820d74 to c094ab0 Compare May 5, 2021 17:07
@vince-fugnitto vince-fugnitto force-pushed the vf/ovsx-client branch 2 times, most recently from d1e22da to e9ff860 Compare May 12, 2021 18:06
@vince-fugnitto
Copy link
Member Author

Needs to be rebased following #9486.

@vince-fugnitto vince-fugnitto force-pushed the vf/ovsx-client branch 2 times, most recently from 621b59a to 72f0cef Compare May 31, 2021 17:21
@vince-fugnitto vince-fugnitto marked this pull request as ready for review May 31, 2021 17:21
@vince-fugnitto
Copy link
Member Author

cc @alvsan09 @paul-marechal would you mind reviewing when you get a chance, I appreciate any feedback :)

Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested and it works fine !
The code looks good as well! 👍

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM!

@vince-fugnitto vince-fugnitto force-pushed the vf/ovsx-client branch 3 times, most recently from 025eede to 9a33cc2 Compare June 10, 2021 15:58
@vince-fugnitto
Copy link
Member Author

I'll merge the pull-request a bit later during the week if there are no objections.

The following commit adds improved support for `extensionPack` plugins defined as
builtins. Previously, `extensionPacks` could be referenced as builtins,
but they would later be resolved when the application is first started.
For large packs (such as vscode builtins) this would result in a long
startup time, where extensionPacks would need to be resolved, and then
downloaded. The following commit fixes that problem by allowing
`extensionPack` to be resolved and fetched at buildtime rather than
runtime.

In order to implement the improvement, a new dev-package was created
(`@theia/ovsx-client`) which includes the common logic for the `cli` and
`@theia/vsx-registry` (previously part of the `@theia/vsx-registry`)
extension. This logic which interacts with the registry (fetch, search,
download, determine compatibility) is now used by the `cli` (buildtime),
and `vsx-registry` (runtime). The `@theia/vsx-registry` extension was
refactored and cleaned up as a consequence.

The idea when resolving builtin extensions is the following:
- download extensions like today (master).
- determine if any `extensionPack`(s) exist.
- fetch individual extension ids.
- download latest compatible versions of all individual extension ids.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Co-authored-by: marechal-p <paul.marechal@ericsson.com>
@vince-fugnitto vince-fugnitto merged commit c92e822 into master Jun 16, 2021
@vince-fugnitto vince-fugnitto deleted the vf/ovsx-client branch June 16, 2021 13:50
@github-actions github-actions bot added this to the 1.15.0 milestone Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsx: add compatibility handling when installing extension packs
3 participants