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

Builtin VSIX plugin is added to the installed list instead of the builtin list #13222

Closed
safisa opened this issue Jan 1, 2024 · 4 comments · Fixed by #13435
Closed

Builtin VSIX plugin is added to the installed list instead of the builtin list #13222

safisa opened this issue Jan 1, 2024 · 4 comments · Fixed by #13435
Assignees
Milestone

Comments

@safisa
Copy link
Contributor

safisa commented Jan 1, 2024

Bug Description:

Hi,

I have some vscode plugins (in a VSIX file format) in the plugins folder (where all builtin files exist). After upgrading to the latest Theia 1.45 those plugins are part of the installed view instead of the built-in view! They should be treated as builtin as before since they statically exist in the package plugins folder.

Steps to Reproduce:

  1. add any vsix file to the plugins folder
  2. run the browser example
  3. check and see that this plugin is under the installed list in the extensions view/panel.

Additional Information

  • Operating System: Mac
  • Theia Version: Theia 1.45
@JonasHelming
Copy link
Contributor

Hi,

I am actually not 100% sure what the correct behavior should be. The plugin you add was not present when the Theia application was built, so in a sense, it is not really "built-in"?

@safisa
Copy link
Contributor Author

safisa commented Jan 2, 2024

Hi,
The issue is that Theia 1.45 treats plugins under the plugins folder in two different ways now. Extracted plugins that were downloaded and extracted (based on the package.json definition) are added to the built-in list, and the VSIX files that were copied into the same plugins folder (manually or using the pipeline) when building the package are added to the installed list.
Moreover, since the VSIX plugins are added to the installed list, then I can uninstall them, and now this causes some confusion, the uninstall removes the plugin from the deployedPlugins (under user .theia folder), but when restarting the server (not reload) the server deploys it again and it shows up under the builtin list !!! Doing another server restart will show it under the installed list !!! VERY confusing...

I can overcome this issue, by extracting the VSIX files into that folder, but I thought this was an issue since it is a different behavior than before plus the misbehavior on server restarts...

Thanks

@xai
Copy link
Contributor

xai commented Jan 17, 2024

Hi! Thanks for reporting! Sounds like this is due to the changed behavior introduced by my #13178 => I will look into this.

@xai
Copy link
Contributor

xai commented Feb 29, 2024

I can reproduce the issue. On the first start of theia, an extension from the plugins-dir is listed correctly as built-in. But by then, it was already picked up by the PluginVsCodeFileHandler and unpacked into the deployedPlugins directory. Therefore, on subsequent starts, it is loaded from the deployedPlugins dir and is listed as 'installed' instead of 'built-in'.

As correctly stated by @safisa, unpacking the extension into the built-in plugins directory overcomes the issue, and the extension will be recognized as 'built-in' on every start of theia. This is currently the preferred way to load built-in extensions. And I would argue it should be the only supported one for now.

I agree that silently auto-deploying the extension to the deployedPlugins is not a good idea, as this is unexpected behavior (as @safisa mentioned, the extension will, on the next start, be treated as a user-installed extension).

So my suggestion is not to handle .vsix files in builtin-directories at all and print a warning instead. I opened a respective PR #13435.

If loading .vsix files from the local plugins directory is a desired feature, I suggest addressing that as part of #13416. Is this acceptable?

xai added a commit to eclipsesource/theia that referenced this issue Mar 21, 2024
This patch fixes an unexpected behavior where Theia would also pick up
and deploy .vsix files from the local-plugins directory into the
deployedPlugins directory, where they will be treated as user-installed
extensions on the next start of theia.

Instead, we now only apply the file handlers for .vsix files if they are
user extensions. For system plugins, we print a warning message indicating
that the plugin has to be unpacked manually.

Fixes eclipse-theia#13222

Contributed on behalf of STMicroelectronics

Signed-off-by: Olaf Lessenich <[email protected]>
xai added a commit to eclipsesource/theia that referenced this issue Apr 18, 2024
This patch fixes an unexpected behavior where Theia would also pick up
and deploy .vsix files from the local-plugins directory into the
deployedPlugins directory, where they will be treated as user-installed
extensions on the next start of theia.

Instead, we now only apply the file handlers for .vsix files if they are
user extensions. For system plugins, we print a warning message indicating
that the plugin has to be unpacked manually.

Fixes eclipse-theia#13222

Contributed on behalf of STMicroelectronics

Signed-off-by: Olaf Lessenich <[email protected]>
xai added a commit to eclipsesource/theia that referenced this issue Apr 18, 2024
This patch fixes an unexpected behavior where Theia would also pick up
and deploy .vsix files from the local-plugins directory into the
deployedPlugins directory, where they will be treated as user-installed
extensions on the next start of theia.

Instead, we now only apply the file handlers for .vsix files if they are
user extensions. For system plugins, we print a warning message indicating
that the plugin has to be unpacked manually.

Fixes eclipse-theia#13222

Contributed on behalf of STMicroelectronics

Signed-off-by: Olaf Lessenich <[email protected]>
tsmaeder pushed a commit that referenced this issue Apr 24, 2024
This patch fixes an unexpected behavior where Theia would also pick up
and deploy .vsix files from the local-plugins directory into the
deployedPlugins directory, where they will be treated as user-installed
extensions on the next start of theia.

Instead, we now only apply the file handlers for .vsix files if they are
user extensions. For system plugins, we print a warning message indicating
that the plugin has to be unpacked manually.

Fixes #13222

Contributed on behalf of STMicroelectronics

Signed-off-by: Olaf Lessenich <[email protected]>
@jfaltermeier jfaltermeier added this to the 1.49.0 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants