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

Should vsce deal with pre-release version identifiers? #148

Closed
kdvolder opened this issue Dec 19, 2016 · 14 comments
Closed

Should vsce deal with pre-release version identifiers? #148

kdvolder opened this issue Dec 19, 2016 · 14 comments
Labels
feature-request Request for new features or functionality

Comments

@kdvolder
Copy link

kdvolder commented Dec 19, 2016

Not sure this is a bug. Perhaps its more of a request for clarification (depending whether the behavior is deliberate or accidental)

Semver version numbers can look like this (examples from here: http://semver.org/):

 2.0.0-rc.2 2.0.0-rc.1 1.0.0-beta 

There can be a 'pre-release-tag' appended after the 3rd number, seperated by a '-'. This is also the convention of version for node packages as far as I know. It seems like vsce publish refuses such versions however.

Error: Failed Request: Bad Request(400) - The version string '0.0.1-201612192249' doesn't conform to the requirements for a version. It must be one to four numbers in the range 0 to 2147483647, with each number seperated by a period. It must contain at least one non-zero number.

First... I thought its a bug. But then I thought, maybe this could be deliberate? (E.g to prevent publishing of 'pre-release' versions on marketplace? But then its a bit odd it would accept a fourth number as the error suggests)

Please clarify what the rules are for publishing versions to marketplace (and consider fixing/changing it if this behavior isn't deliberate)

@joaomoreno
Copy link
Member

This needs to come from the Marketplace itself. @hamenon @modigrv

@hamenon
Copy link

hamenon commented Jan 9, 2017

This is by design today, we only allow numeric values and period in the version. I can add an item to the backlog to allow pre-release tags.

@nehashri
Copy link

This would be a good feature to have in Marketplace to publish pre-release versions of extensions.

@joaomoreno joaomoreno added this to the Backlog milestone Sep 12, 2017
@henryju
Copy link

henryju commented Jan 26, 2018

Note that the Marketplace seems to allow 4 digits (at least for other kind of extensions): X.Y.Z.build while vsce don't.

@kejxu
Copy link

kejxu commented Apr 23, 2019

was going through semver documentation, found the following explanation:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

incrementing the third digit (PATCH digit) seems to indicate a stable update; it would be helpful to support pre-release version numbers to indicate unstable versions. Maybe this was by design since users can only find and install the most recent (and stable) version of extensions

@joaomoreno joaomoreno removed this from the Backlog milestone Oct 11, 2019
@elektronikworkshop
Copy link

I just ran into the same problem while trying to distribute an alpha version for testers. I'm not feeling comfortable distributing alpha extension packages which look like legit releases.

@elektronikworkshop
Copy link

The latest version (1.74.0) seems to support this. Strange - I didn't see anything having addressed this in the latest commits...

@divyenduz
Copy link

divyenduz commented Apr 24, 2020

While this is not implemented, should this be reflected here: https://code.visualstudio.com/api/references/extension-manifest#fields

The docs for the version field are incorrect, stating that it is SemVer compliant.

I ran into this with 1.75.0.

@laike9m
Copy link

laike9m commented Jun 24, 2020

+1 on this. The documentation specifically says:

SemVer compatible version.

But vsce does not support all SemVer compatible versions.

Also, the marketplace is not SemVer compatible either. Taking 0.0.0-dev20200624 as an example. It is s valid semantic version, however marketplace does not recognize it.

image

image

@tamj0rd2
Copy link

tamj0rd2 commented Nov 9, 2020

Is this something that's still being considered?

@rjmholt
Copy link
Contributor

rjmholt commented Feb 25, 2021

Just to pile on here -- I should have linked our issue when we hit this.

In particular, in PowerShell/vscode-powershell#1880 (comment) we discuss the fact that npm uses semver v2 whereas the marketplace uses semver v1 (see @andschwa's comment) the .NET/Windows version scheme, meaning extensions are forced to use the intersection of the two; the marketplace doesn't tolerate a prerelease tag, but npm doesn't tolerate a patch version.

@andyleejordan
Copy link
Member

Actually, I checked the spec and since the marketplace doesn't support an alphnumeric tag after a hyphen, it does not use Semantic Versioning v1, which specifies:

A pre-release version number MAY be denoted by appending an arbitrary string immediately following the patch version and a dash. The string MUST be comprised of only alphanumerics plus dash [0-9A-Za-z-].

The marketplace seems to have its own versioning schema.

@asbjornu
Copy link

It seems pretty obvious to me that everything living in the Node.js ecosystem should support SemVer 2.0. I hope this will be addressed and fixed soon.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 27, 2021

Merging into microsoft/vscode#15756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests