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

Resolve extension enabled status when loading it #1485

Merged
merged 6 commits into from Nov 25, 2020

Conversation

nevalla
Copy link
Contributor

@nevalla nevalla commented Nov 23, 2020

Fixes #1471

Signed-off-by: Lauri Nevala lauri.nevala@gmail.com

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
@nevalla nevalla added bug Something isn't working area/extension Something to related to the extension api labels Nov 23, 2020
@nevalla nevalla added this to the 4.0.0 milestone Nov 23, 2020
@@ -34,11 +34,6 @@ export class ExtensionsStore extends BaseStore<LensExtensionsStoreModel> {
await extensionLoader.whenLoaded;
await this.whenLoaded;

// activate user-extensions when state is ready
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extensionManager has not loaded extensions at this point so we cannot determine the status here.

Copy link
Member

Choose a reason for hiding this comment

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

Should we add above something like await extensionManager.whenReady?

@nevalla nevalla requested a review from a team November 23, 2020 12:10
@nevalla
Copy link
Contributor Author

nevalla commented Nov 24, 2020

This is conflicted with #1482, so let's re-implement this after it is merged.

this.packagesJson.dependencies[manifestJson.name] = path.dirname(manifestPath);

if (!isBundled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] mutation could be avoided: const isEnabled = isBundled || extensionsStore.isEnabled(installedManifestPath);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 will change

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
@jakolehm jakolehm merged commit 29ea0c8 into master Nov 25, 2020
@jakolehm jakolehm deleted the fix/resolve-extension-enabled-status-on-load branch November 25, 2020 07:09
@jakolehm jakolehm mentioned this pull request Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/extension Something to related to the extension api bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extensions are silently disabled on Lens restart
5 participants