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

The vsce tool on package or publish should be validating semver validity #871

Closed
timheuer opened this issue Jun 6, 2023 · 4 comments · Fixed by #949
Closed

The vsce tool on package or publish should be validating semver validity #871

timheuer opened this issue Jun 6, 2023 · 4 comments · Fixed by #949
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@timheuer
Copy link
Member

timheuer commented Jun 6, 2023

I know that microsoft/vsmarketplace#50 refers to the marketplace supporting full SemVer, but this issue is about ensuring that the toolchain used to package/publish match the expected Marketplace. Today you can have 'proper' semver in your versioning (1.0.2-beta.g893fd) and vsce will gladly package and attempt to publish. In fact there is a semver.valid() check (https://github.com/Microsoft/vscode-vsce/blob/main/src/validation.ts#L35) that does this. But knowing that the marketplace will not support this, it is giving false hopes that all the pipeline is valid until the very last step.

Until/unless Marketplace supports full semver, then vsce should change to ensure that versions being used can actually get published. Today, it is not helping that validity.

There are a few issues from 3-5 years ago on this, but the problem still remains...and regardless of the mismatch of support of the Marketplace, the vsce tool is incorrectly allowing a package and publish attempt all the way until the end knowing that it is NOT going to be successful. The semver.valid() check should be modified to look for the unsupported semver aspects and block.

@joaomoreno joaomoreno self-assigned this Jun 12, 2023
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jun 12, 2023
@seanpoulter
Copy link

Would you welcome a PR to change the validation @joaomoreno?

The warning in the marketplace says the version must be on to four numbers from 0 to 2,147,483,647. It does not allow a tag like -beta.g893fd mentioned above.

@sandy081
Copy link
Member

Sure, PR is welcome. But, we should still allow packaging the extension with complete semver version. Because there could be authors packaging the VSIX and sharing it with others and using the full semver version. This can be supported by a flag but the question is what should be the default.

@benibenj
Copy link
Contributor

@timheuer packaging with pre-release versioning is still allowed and used by some people so we don't want to take that away, but we can add the check earlier on when using publish.

@seanpoulter
Copy link

so we don't want to take that away

In that case, I'd like to propose a "VS Code Marketplace" mode/strategy/target.

@eleanorjboyd eleanorjboyd added the verification-steps-needed Steps to verify are needed for verification label Apr 24, 2024
@benibenj benibenj added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants