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

Drop-in VS Code extension does not show up as Installed. #13638

Open
tsmaeder opened this issue Apr 24, 2024 · 6 comments
Open

Drop-in VS Code extension does not show up as Installed. #13638

tsmaeder opened this issue Apr 24, 2024 · 6 comments

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

When I install a particular VS Code extension it does not show up as installed (even though it is uncompressed to the "deployedPlugins"-folder.

Steps to Reproduce:

  1. Have gitlens installed from open-vsix
  2. Download the spring-boot extension and put it into ~/.theia/extensions
  3. Start Theia Electron
  4. Observe: the command line output shows that the extension is being decompressed into ~/theia/deployedPlugins
  5. Observe: eventually, gitlens and other installed extensions show up in the "extensions" view in the "installed" section
  6. Observe: the spring boot extension never shows up
  7. Observe: there are no commands starting with "Spring" available from the command pallette
  8. Restart Theia electron (not reload, restart the whole process).
  9. Observe: the spring-boot extensions is available and shows up in the extensions view.

Additional Information

  • Operating System: Windows
  • Theia Version: 1.48 master
@tsmaeder
Copy link
Contributor Author

Note that this is not happening in the browser application, only electron.

@tsmaeder
Copy link
Contributor Author

I tried the same scenario with only the "github-authentication" plugin from microsoft, and that works. This might simply be a timing issue.

@tsmaeder
Copy link
Contributor Author

Other difference: the spring-boot extension has redhat.java as a dependency.

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Apr 24, 2024

Installing via the extensions UI from open-vsx works fine. i.e. the extension shows up as "installed"

@tsmaeder
Copy link
Contributor Author

Turns out in browser/hosted-plugin.ts#acceptPlugin(), sometimes returns false for a bunch of plugins.

@tsmaeder
Copy link
Contributor Author

I finally got to the bottom of this: the problem came with the introduction of back-end plugins: there is a Deferred in hosted-plugin-deployer-handler.ts called backendPluginsMetadataDeferred. Since headless plugins are deployed using deployBackendPlugins(), the deferred gets resolved when deploying back and plugins. However, the deployment is done in parallel in plugin-deployer-impl.ts#deployPlugins(). Since there are no headless plugins, this "deployment" is very fast and the deferred gets resolved quite early. In the normal case, when no actualy unzipping of large plugins takes place, the list of plugins we get in the front end for loading contributions is complete. But when it takes longer, the list of plugins is incomplete: in fact, in my debug case it only includes about 1/3 of the actually installed plugins. The short term fix is to run the deployments in sequence and do the back end plugins first.

The long term fix for this would be twofold:

  1. We need to start the front end in true parallel fashion: there is no need to wait for the initial "deyployment". We should just notify whenever we have "deployed" a new plugin an the front end should update itself in a sane fashion (i.e. batch updates, etc.)
  2. We need to separate the headless plugins from the back end plugins: they are treated differently and we need to be able to distinguish between them.

tsmaeder added a commit to tsmaeder/theia that referenced this issue Apr 25, 2024
Workaround for eclipse-theia#13638

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
tsmaeder added a commit that referenced this issue Apr 25, 2024
#13643)

Workaround for #13638

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
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

No branches or pull requests

1 participant