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

extensions.all does not correctly update when extensions.onDidChange fires #68379

Open
golf1052 opened this Issue Feb 10, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@golf1052
Copy link
Contributor

golf1052 commented Feb 10, 2019

  • VSCode Version: 1.31.0
  • OS Version: Windows 10 1809 (build 17763.253)

Steps to Reproduce using an extension that is listening to extensions.onDidChange

  1. Store list of extensions.all
  2. Disable an extension
  3. When onDidChange fires the extension will not be in the list of extensions.all (comparing the two lists)
  4. Re-enable the same extension.
  5. When onDidChange fires not that the extension will still not be in the extensions.all list.

The above steps also works for uninstalling then reinstalling an extension. I've tested this with Polacode (a non theme extension) and a theme extension.

Does this issue occur when all extensions are disabled?: No as this is related to extensions.

Related issues: #14444

@sandy081

This comment has been minimized.

Copy link
Member

sandy081 commented Feb 12, 2019

@golf1052 When you disabled the extension, does it show a reload is required?

@golf1052

This comment has been minimized.

Copy link
Contributor Author

golf1052 commented Feb 13, 2019

No for both extensions it did not prompt for a reload.

@sandy081

This comment has been minimized.

Copy link
Member

sandy081 commented Feb 13, 2019

May I know the extensions you are trying to disable?

@golf1052

This comment has been minimized.

Copy link
Contributor Author

golf1052 commented Feb 13, 2019

@sandy081

This comment has been minimized.

Copy link
Member

sandy081 commented Feb 13, 2019

@golf1052 I tried with a simple example

'use strict';

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
    vscode.extensions.onDidChange(() => {
        vscode.extensions.all.forEach(e => console.log(e.id));
    });
}

Disabling the extension - Disabled extension is not there in the list
Enabling the extension - Enabled extension is in the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment