theia
theia copied to clipboard
Builtin VSIX plugin is added to the installed list instead of the builtin list
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:
- add any vsix file to the plugins folder
- run the browser example
- 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
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"?
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
Hi! Thanks for reporting! Sounds like this is due to the changed behavior introduced by my #13178 => I will look into this.
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?