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

Reload extension button never goes away #19685

Closed
vavans opened this issue Feb 1, 2017 · 10 comments
Closed

Reload extension button never goes away #19685

vavans opened this issue Feb 1, 2017 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions verified Verification succeeded
Milestone

Comments

@vavans
Copy link

vavans commented Feb 1, 2017

  • VSCode Version: 1.8.1
  • OS Version: Linux Mint (same issue on windows 8)

Steps to Reproduce:

  1. On a fresh, new installation of VSCode, install the hello plugin : ext install hello
  2. Click the reload button, the extension is loaded correctly, everything is fine
  3. Goto ~/.vscode/extensions/hypnoes.hello-0.1.1
  4. Open package.json
  5. Change lines
	"name": "hello",
	"displayName": "Hello",

to

	"name": "Hello",

uppercase Hello.

  1. Launch VSCode and go to extensions tab
  2. The reload button is shown in Hello extension (and will never goes away) but the extension is loaded and works perfectly well
@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions labels Feb 2, 2017
@sandy081 sandy081 added this to the February 2017 milestone Feb 2, 2017
@sandy081
Copy link
Member

sandy081 commented Feb 3, 2017

This is not related to #19753. This does not load only this particular extension.

@vavans
Copy link
Author

vavans commented Feb 3, 2017

I used this extension as the simplest sample available. But the issue is the same whaterver the extension is used:
Using an extension name with uppercase, without a displayname field, triggers the behaviour

@sandy081
Copy link
Member

@vavans Can you please check if you are able to reproduce it on our insiders build. Looks like it got fixed.

@johnpapa
Copy link

Please re-open as this is an issue with johnpapa/vscode-angular-snippets#40

cc @chrisdias

@chrisdias chrisdias reopened this Feb 14, 2017
@sandy081
Copy link
Member

Found the root cause: Market place is giving a different name for this extension. Market place is having the name of the extension as Angular but in its package.json it is angular.

In stable, this extension shows it is installed but not running (even though it is running), because installed check is done on id and running check is done on publisher.extensionName which is different because of market place sending different data.

In insiders, we made a fix for #17290 that checks always are based on publisher.extensionName. So this makes this extension not installed from market place due to the above identifier mismatch. Hence reload button is not shown.

But still there is an issue that local installed extension is not getting mapped with market place extension which leads to issues in detecting updates etc.,

@joaomoreno Any idea why market place is sending different extension name? And is there a workaround for extensions to fix this from their side?

@sandy081
Copy link
Member

Further analysis on this:

VSCE creates a new extension if name is changed because it does not exist in Market place. But Market place is sharing the same UUID for extensions (old and new names). This is causing the for all this confusion. So right solution is to get it fixed in Market place.

@sandy081 sandy081 modified the milestones: March 2017, February 2017 Feb 21, 2017
sandy081 added a commit that referenced this issue Feb 28, 2017
sandy081 added a commit that referenced this issue Feb 28, 2017
-  id is pub.name. name in lower case.
- use id to match sync installed extension with gallery extension
- use id to identify extension while installing and uninstalling
- Clean up
- Remove IExtensionIdentity
- Add util methods to create gallery id and local extension id
sandy081 added a commit that referenced this issue Mar 1, 2017
- Adopt to gallery extension id (lowercase) while scanning local extensions in Extension management and Extension host
sandy081 added a commit that referenced this issue Mar 1, 2017
- In Extension description in Extension host
- In Extension enablement service
- Rename identifier to id in IExtension
sandy081 added a commit that referenced this issue Mar 1, 2017
- Adopt dependencies in gallery to be case insensitive
- Adopt dependencies in local to be case insensitive
sandy081 added a commit that referenced this issue Mar 1, 2017
- Use uuids along with names to sync with gallery until market place team fixes the query issue
@sandy081
Copy link
Member

sandy081 commented Mar 1, 2017

Adopted VS Code to be resilient with case changes in extension names.

All extension ids publisher.name are made case insensitive by lowering the case of name.

  • gallery
  • local extension
  • enablement/disablement
  • dependencies
  • extension (extension host)

So all above extension interfaces can use strict equals on ids.
Extension id exposed to users (Extension editor, API) will be always same and consistent.

Adoption for Extensions

This will impact those extensions using following API in vscode.d.ts and doing strict equality check like us. They should lower the case of name and do an equality check with Extension.id.

Extension.id

@sandy081 sandy081 closed this as completed Mar 1, 2017
@Krzysztof-Cieslak
Copy link
Contributor

As far as I can tell this impact also extensions.getExtension calls.

@sandy081
Copy link
Member

sandy081 commented Mar 3, 2017

@Krzysztof-Cieslak That's a good catch. This api should not be impacted. Since name is case insensitive extensions.getExtension(id) should support it.

So extensions.getExtension('vscode.go) or extensions.getExtension('vscode.GO) should return the extension which is same.

Fixed it. Thanks for mentioning it.

sandy081 added a commit that referenced this issue Mar 3, 2017
- Revert changes to id in Ext description. No lowering of name.
- Implement an equal function to check equality of extensions
- Use above function to check the equality with extension description
@sandy081
Copy link
Member

sandy081 commented Mar 3, 2017

I had to revert the changes done in extension host (making id lower case) because it breaks usage of following:

  • Storage path
  • Mementos

Hence, I reverted id of Extension in Extension host (vscode.d.ts) to be same as before. It means no lowering of case is done. Id of extension will change if the extension author changes the case of the name.

Adopted at other places in VS Code to use a equality function to compare with extension descriptions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants