cli: introduce exclude id list for extension-packs#9956
cli: introduce exclude id list for extension-packs#9956vince-fugnitto merged 3 commits intomasterfrom
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? |
@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 |
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 <vincent.fugnitto@ericsson.com>
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 <vincent.fugnitto@ericsson.com> Co-authored-by: Paul Marechal <paul.marechal@ericsson.com>
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 <vincent.fugnitto@ericsson.com> Co-authored-by: Paul Marechal <paul.marechal@ericsson.com>


What it does
The pull-request introduces a mechanism to exclude extensions by
idwhen 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
theiaPluginsExcludeIdswhich lists extensions byidand is used to exclude extensions when resolving extension-packs.How to test
package.jsonto the following:yarn download:pluginsvscode.cppis logged as skippedvscode.cppis not present under thepluginsfolderrm -rf plugins/theiaPluginsExcludeIdsbeing omitted from thepackage.json- the command should pass and all referenced extensions should resolveExample:
Review checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com