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

nuget.exe pack doesn't allow a pre-release tag which begins with numbers #1743

Closed
kevinkuszyk opened this issue Nov 19, 2015 · 15 comments
Closed
Assignees
Labels
Functionality:Pack Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug
Milestone

Comments

@kevinkuszyk
Copy link

I was expecting the following command to work:

nuget pack ClassLibrary1.csproj /version 1.0.0-123-foo

But it doesn't. This is the output using the latest (v3.2.0) nuget.exe:

MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Attempting to build package from 'ClassLibrary1.csproj'.
Packing files from 'C:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug'.
Using 'ClassLibrary1.nuspec' for metadata.
'1.0.0-123-foo' is not a valid version string.
Parameter name: version

From readying the semver specs, I think this should be allowed. From semver v1:

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-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Precedence SHOULD be determined by lexicographic ASCII sort order. For instance: 1.0.0-alpha1 < 1.0.0-beta1 < 1.0.0-beta2 < 1.0.0-rc1 < 1.0.0.

And semver v2:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.

@yishaigalatzer yishaigalatzer added this to the Client-VNext milestone Nov 20, 2015
@yishaigalatzer yishaigalatzer added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Bug help wanted Considered good issues for community contributions. labels Nov 20, 2015
@yishaigalatzer
Copy link

Sounds like something we might fix, after cleaning several higher priority issues. If you think this is something you need earlier, we will gladly take a pull request.

@kevinkuszyk
Copy link
Author

Thanks @yishaigalatzer. Can you re-open the issue? I will take a look at it when I get some time.

@yishaigalatzer
Copy link

Sorry closed by accident

@Lette
Copy link

Lette commented Nov 26, 2015

I got the same issue, I think. In my AssemblyInfo.cs, I have AssemblyInformationalVersion("1.2.3-beta.1"). nuget pack project.csproj silently fails and picks up the AssemblyVersion instead. If I explicitly use -version 1.2.3-beta.1, nuget pack fails with '1.2.3-beta.1' is not a valid version string.

Using 1.2.3-beta in the attribute or on the -version parameter works.

I'm pretty sure I'm not violating SemVer 2.0.0, which @kevinkuszyk quoted above.

Any progress on this? (I might be able to help out, if help is needed.)

@yishaigalatzer
Copy link

@Lette This new report seems unrelated. Note we only support semver1 at the moment so you need to use 1.0-beta0001 or something like that.

We of course will gladly take a fix for the item above.

@Lette
Copy link

Lette commented Nov 26, 2015

All right. So, we need SemVer 2 support. Do you know of any specific difficulties regarding this? If all that needs to be done is parsing/validation of the version string, then I guess it's pretty straightforward..?

@yishaigalatzer
Copy link

It's a lot more complex, and we decided to put support for semver2 in the upcoming release on hold for now. We will get back to it at some point

@Lette
Copy link

Lette commented Nov 26, 2015

OK, but correcting the OPs problem with semver 1 is still doable, right?

@yishaigalatzer
Copy link

What does op mean?

@csharpfritz
Copy link
Contributor

Original poster - person who first started this thread

Sent from my iPhone

On Nov 26, 2015, at 10:59, Yishai Galatzer [email protected] wrote:

What does op mean?


Reply to this email directly or view it on GitHub.

@Lette
Copy link

Lette commented Nov 26, 2015

For future googlers: SemVer 2 is discussed in #1359.

@yishaigalatzer
Copy link

Thanks Jeff, yes we would like to get it fixed

@emgarten
Copy link
Member

This should be fixed as of 3.5.0-rc1
http://dist.nuget.org/index.html

@kevinkuszyk
Copy link
Author

Thanks @emgarten - I actually tried it last week and it seems to be working. I didn't want to close the issue in case it didn't make it into the RTM for any reason.

@emgarten
Copy link
Member

@kevinkuszyk thanks for verifying! I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
Development

No branches or pull requests

7 participants