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

[plugin] wait for workspace to be ready #6248

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

svenefftinge
Copy link
Contributor

What it does

Awaits for workspace service to be initialized before computing the storage path for plugins.
With slow workspace initialization sometime the first call to storage path resolved to undefined.
As a result plugins get loaded and activated with a bad storage path and fail.

How to test

Deploy redhat-vscode java extension and make workspace initialization slow (or block though breakpoint). See how the extension fails on activate becasue it tries to create directory withinn the storagePath.

Review checklist

Reminder for reviewers

Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
@svenefftinge svenefftinge changed the title [plugin] wait for workspace to be ready [WIP][plugin] wait for workspace to be ready Sep 23, 2019
@akosyakov
Copy link
Member

I think we should merge it that VS Code extensions are initialized with the workspace specific storage path, but java extension is actually handling the case when storagePath is undefined, so it cannot fail: https://github.com/redhat-developer/vscode-java/blob/6671c28cbdaec8764ca2b41e511e72a34bd9046f/src/extension.ts#L115-L119

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good to me.

@akosyakov akosyakov added the plug-in system issues related to the plug-in system label Sep 24, 2019
@svenefftinge svenefftinge changed the title [WIP][plugin] wait for workspace to be ready [plugin] wait for workspace to be ready Sep 24, 2019
@svenefftinge svenefftinge merged commit 8119a88 into master Sep 24, 2019
@svenefftinge svenefftinge deleted the se_plugin_storagepath_init branch September 24, 2019 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants