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

Installing a VSCode extension always reinstalls its dependencies #10560

Closed
luettmaSICKAG opened this issue Dec 17, 2021 · 0 comments · Fixed by #10624
Closed

Installing a VSCode extension always reinstalls its dependencies #10560

luettmaSICKAG opened this issue Dec 17, 2021 · 0 comments · Fixed by #10624
Assignees
Labels
help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system

Comments

@luettmaSICKAG
Copy link

Bug Description:

When installing a plugin that has dependencies, its dependencies are always downloaded from the marketplace.
It doesn't matter if the dependencies are already installed or if the plugin is installed from the marketplace or *.vsix.
It also doesn't matter if the VSCode extensions (dependencies) are provided built-in (theiaPlugins).

I see a problem with this behavior for two reasons:

  • Needles downloads of plugins, that are already installed in the exact version
  • Effectively performs a downgrade of the dependencies if the newest version is not in the marketplace (but older versions are)
    → e.g. when testing a snapshot locally

Steps to Reproduce:

  1. Create a VSCode extension with extensionDependencies set to any extension in the marketplace
  2. Install the latest version of the extensionDependencies
  3. Install the Plugin that has dependencies
    → Dependencies will be downloaded again

Additional Information

  • Operating System: Windows 10
  • Theia Version: 1.21.0 (electron)
  • Tested with own marketplace instance & docker image: openvsx-server:92ae306

Log

I have replaced some values in the log.
It shows the output when installing EXTENSION-WITH-DEPENDENCIES, which has a dependency to DEPENDENCY-EXTENSION_A and DEPENDENCY-EXTENSION_B.

Versions in Marketplace:

  • EXTENSION-WITH-DEPENDENCIES @0.1.0
  • DEPENDENCY-EXTENSION_A @0.2.0
  • DEPENDENCY-EXTENSION_B @0.2.0

Built-In VSCode extensions:

  • DEPENDENCY-EXTENSION_A @0.3.0-dev
  • DEPENDENCY-EXTENSION_B @0.3.0-dev
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.UNRELATED-EXTENSION-1]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.UNRELATED-EXTENSION-2]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.UNRELATED-EXTENSION-3]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.UNRELATED-EXTENSION-4]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.DEPENDENCY-EXTENSION_B]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.DEPENDENCY-EXTENSION_A]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.UNRELATED-EXTENSION-5]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98] Start of 7 plugins took: 23614.9 ms [Finished 28.380 s after frontend start]
root INFO [EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix]: trying to decompress into "c:\Users\MY-USER\.theia\extensions\EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix"...
root INFO [EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix]: decompressed
root INFO PluginTheiaDirectoryHandler: accepting plugin with path c:\Users\MY-USER\.theia\extensions\EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix
root INFO Resolved "EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix" to a VS Code extension "[email protected]" with engines: { vscode: '^1.45.0' }   
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B]: trying to resolve latest version...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A]: trying to resolve latest version...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A]: resolved to 'OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0'
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0]: trying to download from "http://OUR-MARKETPLACE-HOST/api/OUR-NAMESPACE/DEPENDENCY-EXTENSION_A/0.2.0/file/OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0.vsix"...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B]: resolved to 'OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0'
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0]: trying to download from "http://OUR-MARKETPLACE-HOST/api/OUR-NAMESPACE/DEPENDENCY-EXTENSION_B/0.2.0/file/OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0.vsix"...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0]: downloaded to C:\Users\MY-USER\AppData\Local\Temp\0c145b31-9527-4e93-977e-73445167683c\OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0.vsix"
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0]: trying to decompress into "c:\Users\MY-USER\.theia\extensions\OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0"...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0]: decompressed
root INFO PluginTheiaDirectoryHandler: accepting plugin with path c:\Users\MY-USER\.theia\extensions\OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0
root INFO Resolved "OUR-NAMESPACE.DEPENDENCY-EXTENSION_A-0.2.0" to a VS Code extension "[email protected]" with engines: { vscode: '^1.45.0' }
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0]: downloaded to C:\Users\MY-USER\AppData\Local\Temp\0c145b31-9527-4e93-977e-73445167683c\OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0.vsix"
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0]: trying to decompress into "c:\Users\MY-USER\.theia\extensions\OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0"...
root INFO [OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0]: decompressed
root INFO PluginTheiaDirectoryHandler: accepting plugin with path c:\Users\MY-USER\.theia\extensions\OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0
root INFO Resolved "OUR-NAMESPACE.DEPENDENCY-EXTENSION_B-0.2.0" to a VS Code extension "[email protected]" with engines: { vscode: '^1.45.0' }
root INFO Deploying backend plugin "[email protected]" from "c:\Users\MY-USER\.theia\extensions\EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix\extension\dist\extension.js"
root INFO Deploy plugin entry took: 12250.4 ms
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98] Waiting for backend deployment took: 11.8 ms [Finished 51.884 s after frontend start]
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98] Sync of 1 plugin took: 25.0 ms [Finished 51.909 s after frontend start]
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.EXTENSION-WITH-DEPENDENCIES]: Loaded contributions.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98] Load contributions of 1 plugin took: 0.1 ms [Finished 51.910 s after frontend start]
root INFO [hosted-plugin: 28676] PLUGIN_HOST(28676): PluginManagerExtImpl/init()
root INFO [hosted-plugin: 28676] PLUGIN_HOST(28676): initializing([email protected] with C:\OUR-THEIA-PROJECT\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 28676] PLUGIN_HOST(28676): PluginManagerExtImpl/loadPlugin(c:\Users\MY-USER\.theia\extensions\EXTENSION-WITH-DEPENDENCIES-0.2.0-dev.vsix\extension\dist\extension.js)
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98][OUR-NAMESPACE.EXTENSION-WITH-DEPENDENCIES]: Started plugin.
root INFO [36e5b3bd-25d6-4efc-8345-1d5e658efd98] Start of 1 plugin took: 114.0 ms [Finished 52.028 s after frontend start]
@luettmaSICKAG luettmaSICKAG changed the title Installing a VSCode plugins always reinstalls its dependencies Installing a VSCode extension always reinstalls its dependencies Dec 17, 2021
@vince-fugnitto vince-fugnitto added help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system labels Dec 17, 2021
@msujew msujew self-assigned this Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants