-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Manually installing pre-release VSIX does not register it as prerelease #140949
Comments
Can you please share the VSIX to try out and reproduce? |
I think I am seeing this too, with an extension for which regular and pre-release versions have been published on Marketplace
I am 100% sure the VSIX got built with the --pre-release switch. Indeed, when I subsequently upload it manually onto Marketplace it correctly lists as a pre-release, and installs as a pre-release. |
Hi @sandy081 . The issue repro's with v1.8.0 (prerelease) of the C/C++ extension in the marketplace. (The same as pictured). You can download it directly from the marketplace web site here: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools When installed from within VS Code Insiders marketplace UI, the same VSIX shows as Prerelease. |
@Colengms Thanks for filing the issue. I can repro it and fixed it. @gjsjohnmurray VS Code can detect if the installed VSIX is a pre-release or not only if the VSIX is published to the Marketplace. Because VS Code gets pre-release information from Marketplace and not from the VSIX. |
@sandy081 I think VS Code should get this information from the VSIX manifest. Here's an example of how it can be done: |
That's true - but this could cause inconsistency if the author publishes the package with same version without pre-release flag. Hence, I prefer Marketplace to be the source of truth. Anyway this will be temporary until Marketplace supports the SemVer completely and then we can get the information from the version. |
@sandy081 this isn't making sense to me.
Why? Are you asking Marketplace "Is 1.3.2022012301 a pre-release version?" and treating any response other than "Yes" as meaning "No"? Even an answer that means "I know nothing about version 1.3.2022012301"? |
Yes, I ask Marketplace if a version is a pre-release or not. It works like this:
This pre-release flag to the vsce is partial support until marketplace supports semver completely, going forward, the pre-release type is checked from the version. For eg., if the version is 1.2.3-insiders then the version is considered as a pre-release. Therefore if you install the extension from vsix or from marketplace, vscode detects the pre-release from the version. We knew that the current solution is not the ideal but it helps and avoid many extensions which are creating duplicates for pre-releases/insiders. Once marketplace supports semver, extensions can start adopting to the semver versioning for pre-releases. As you said, the metadata is still part of the vsix. At present, vscode is not reading this metadata as we rely on marketplace for this metadata. I would not do this for following reasons:
Hence my recommendation for this feature is to wait for MP support for SemVer. Hope you agree with this. |
I don't want the vsix's embedded manifest to override what Marketplace says about the extension being or not being a pre-release. But when Marketplace can't answer that question (because this particular version of the vsix hasn't been published) I feel strongly that VS Code should consult the embedded manifest. A specific use-case is that we are not permitted to publish to Marketplace a vsix that we build with proposed APIs enabled. We often want to build these so our adventurous users can download and install them (e.g. as artefacts of a GH workflow). It is confusing when a user has installed a pre-release from Marketplace, and then they manually install a pre-release vsix built with proposed APIs enabled, and suddenly their Extensions view tells them they're running a release vsix for which a pre-release is available. If they click the button to install the pre-release, they end up downgrading to one that doesn't use proposed APIs. Do you have an estimate for when MP will support SemVer? |
Ah I see your use case. You can do following:
You are forced not to publish this VSIX because the Marketplace does not support this versioning yet. If you want to publish you can increase the minor version (for eg) without pre-release tag and publish it as pre-release to Marketplace. VS Code will automatically update to latest pre-release. Since this is not yet supported, can you please create a separate issue for this use case?
Estimating by the end of this year. |
One interesting thing I noticed: If installing a prerelease VSIX that is not yet published to the marketplace (for testing, prior to publishing), the extension is not identified as prerelease. I suspect that's because the marketplace is the authority on whether that version number is a prerelease, not the field in the VSIX manifest. |
@Colengms that is what I am unhappy about. I think in this situation VS Code should extract the vsix manifest file and check for the attribute value which marks it definitively as a pre-release. It won't be hard to do, and I am even considering submitting a PR if @sandy081 is willing to consider it after the current endgame is past. |
@gjsjohnmurray Agreed that it is not hard, but I think this will be redundant when we move to SemVer. It seems to me not a prominent use case for implementing and removing it later. This can be waited until Marketplace supports SemVer. Just to be clear, this needs parsing the XML manifest file and VSCE uses |
Created a separate issue - #141869 to track this. Lets continue conversation there. Thanks. |
With VS Code Insiders, when I install a prerelease of our new platform-specific VSIX, it does not register as prerelease:
This issue only occurs with VS Code Insiders:
Version: 1.64.0-insider (user setup)
Commit: 23aa7ad
Date: 2022-01-18T09:44:38.476Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000
This does not repro with VS Code (non-Insiders, 1.63.2). That displays the prerelease indication correctly, when installing the very same VSIX:
The text was updated successfully, but these errors were encountered: