microsoft / vsmarketplace

Customer feedback and issue tracker repository for Visual Studio Marketplace
MIT License
39 stars 10 forks source link

Switch to release version, VSCode keep reinstalling v1.2.0 when installing 1.6.5 #692

Open xiaoxiangmoe opened 1 year ago

xiaoxiangmoe commented 1 year ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. install Vue Language Features and switch to Pre-Release image
  2. click 「switch to release version」, it change to v1.6.5 image
  3. click 「reload required」,it change to v1.2.0 image
  4. install another version 1.6.5 image image
  5. it keeps to be 1.2.0 and I don't know why. image
filipbekic01 commented 1 year ago

I think that a lot of people are running into problems because of this. Especially newcomers-it will automatically install them obsolete version.

xiaoxiangmoe commented 1 year ago

@joaomoreno do I need to provide more info to help with this issue?

sandy081 commented 1 year ago

Marketplace is returning following result when asked for the latest version of this extension

image

When asked for all versions, MP returns following

image

It seems, this extension used to be a platform specific extension until 1.2.0 and afterwards it was published as normal extension. It seems to me a bug in MP api returning latest versions. It shall not return the older versions if the latest version is not a Platform Specific Extension.

CC @isidorn

zhhyu commented 1 year ago

Hi, @sandy081! Maybe I misunderstand something, and I am not familiar with the search protocol.

  1. Given the first screenshot, the search API returns the latest version 1.7.8 (without "targetPlatform") correctly. However, the latest version for "darwin-x64" is 1.2.0 as the search document shows.
  2. Given the behavior of this issue, it seems that VS Code client picks up the version 1.2.0 because it is the most compatible version with "darwin-x64". This is also reasonable, and it gives me the hint that this is designed by VS Code client, rather than the search API.

So, I doubt that this is an issue of VS Code client. With a newer version that is compatible with multiple platforms and an older version that matches the exact client system, VS Code picks up the latter one. VS Code ideally should select the newer version because it also works for the client.

Could you please let me know what is expected by VS Code client for this case? What should the protocol look like?

xiaoxiangmoe commented 1 year ago

@sandy081 @zhhyu Is there anything I can do to help fix this bug?

sandy081 commented 1 year ago

Could you please let me know what is expected by VS Code client for this case? What should the protocol look like?

Sorry for not getting back on this. The protocol is that when asked for the latest version it is expected to get only one latest version. It is also expected that the client gives precedence to the target platform when asked for latest version due to the above expectation. In this case, MP is returning two latest versions that are compatible for a given platform.

CC @isidorn

zhhyu commented 1 year ago

Could you please let me know what is expected by VS Code client for this case? What should the protocol look like?

Sorry for not getting back on this. The protocol is that when asked for the latest version it is expected to get only one latest version. It is also expected that the client gives precedence to the target platform when asked for latest version due to the above expectation. In this case, MP is returning two latest versions that are compatible for a given platform.

CC @isidorn

Thanks! I think I know what the problem is now. I will work with the team and prioritize this issue.

xiaoxiangmoe commented 1 year ago

@zhhyu Is there any thing I should do to help fix this issue?

zhhyu commented 1 year ago

@zhhyu Is there any thing I should do to help fix this issue?

Hi! This is a protocol issue and there is a need to double check APIs on the server side, rather than a change on VS Code. It may take some time to triage and prioritize this issue, but we will do our best to fix the problem asap.