-
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
cli: introduce exclude id list for extension-packs #9956
Conversation
Looks nice, thanks @vince-fugnitto . Looking at how this works, I am reminded of another use-case, beyond extension packs. Let's say that there is an extension you like but for some reasons it's not working well ATM, or an extension already in If this PR was made slightly more generic, so that the exclusion works when downloading extensions, not just extension packs, one could instead add it or keep it, and also exclude it, until it works as wanted. Then one needs only remove the exclusion instead of thinking adding the extension. WDYT? |
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.
@marcdumais-work I was thinking of that use-case but I did not see a reason as to why they would list an extension under Also, we use a |
I have been thinking that the way we specify plugins by URL is a bit dated - we should maybe support by id, but that's for another PR. |
@marcdumais-work we could, but it means that we can no longer reference a specific version of a builtin anymore. An application may choose to support a specific builtin version, and not have the framework resolve it to the latest API. |
8ad3a97
to
5448ab0
Compare
@marcdumais-work @alvsan09 the pull-request is ready for another review. I also fixed the issue were extension-packs referenced as builtins are resolved at runtime by removing them from the plugins folder after we complete the resolvement and download of the |
@alvsan09 If you can, please re-test and approve - I'd like to get this part of this month's release |
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 have validated the solution, it works as expected! 👍
The code refactoring looks good to me!
Thanks Vince !!
The commit introduces additional functionality when downloading extension-packs so end-users have the ability to declare extensions (by id) they wish to exclude when resolving packs. Previously no mechanism was available to exclude extensions pulled by packs besides using post-processing such as deleting plugins from the plugin directory before building. Extensions referenced by id in `theiaPluginsExcludeIds` will be excluded when we resolve extension-packs. Once `ids` of an extension-pack are resolved, the script will handle removing them from the download folder so the framework does not attempt to re-resolve them at runtime. Signed-off-by: vince-fugnitto <[email protected]>
5448ab0
to
78d5ff1
Compare
The commit introduces the ability to declare the list of plugin ids which should be explicitly excluded when we perform a download. The list of excluded plugin ids are used when we attempt to resolve plugins declared in extension-packs (extension-packs refer to plugins they wish to pull by id) but we want to exclude some problematic or unwanted plugins. This gives users the flexibility to consume extension-packs as builtins, but also be able to explicitly exclude ids they do not wish to pull as part of their application. The `download:plugins` script was also refactored in order to make things clearer, more robust with better performance: - extension-pack plugins are resolved and downloaded in parallel. - if a pack is previously downloaded (and moved under the download folder at `.packs`) we will not re-download it or resolve it. - the framework will not attempt to re-resolve packs at runtime, meaning excluded plugins will not re-appear. - improved logging of the overall download and operations. Signed-off-by: vince-fugnitto <[email protected]> Co-authored-by: Paul Marechal <[email protected]>
The commit introduces the ability to declare the list of plugin ids which should be explicitly excluded when we perform a download. The list of excluded plugin ids are used when we attempt to resolve plugins declared in extension-packs (extension-packs refer to plugins they wish to pull by id) but we want to exclude some problematic or unwanted plugins. This gives users the flexibility to consume extension-packs as builtins, but also be able to explicitly exclude ids they do not wish to pull as part of their application. The `download:plugins` script was also refactored in order to make things clearer, more robust with better performance: - extension-pack plugins are resolved and downloaded in parallel. - if a pack is previously downloaded (and moved under the download folder at `.packs`) we will not re-download it or resolve it. - the framework will not attempt to re-resolve packs at runtime, meaning excluded plugins will not re-appear. - improved logging of the overall download and operations. Signed-off-by: vince-fugnitto <[email protected]> Co-authored-by: Paul Marechal <[email protected]>
What it does
The pull-request introduces a mechanism to exclude extensions by
id
when resolving builtin extension-packs. The purpose is to allow application developers the flexibility to use extension-packs but still have the control to exclude problematic or unwanted extensions that may be referenced by the pack. Previously, post-processing would be necessary to remove such extensions, for example by deleting the plugin in the plugins directory before a build.The changes introduce
theiaPluginsExcludeIds
which lists extensions byid
and is used to exclude extensions when resolving extension-packs.How to test
package.json
to the following:yarn download:plugins
vscode.cpp
is logged as skippedvscode.cpp
is not present under theplugins
folderrm -rf plugins/
theiaPluginsExcludeIds
being omitted from thepackage.json
- the command should pass and all referenced extensions should resolveExample:
Review checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]