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

Comments

Projects
None yet
7 participants
@kevinkuszyk

kevinkuszyk commented Nov 19, 2015

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

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 20, 2015

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.

yishaigalatzer commented Nov 20, 2015

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

This comment has been minimized.

Show comment
Hide comment
@kevinkuszyk

kevinkuszyk Nov 25, 2015

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

kevinkuszyk commented Nov 25, 2015

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

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 25, 2015

Sorry closed by accident

yishaigalatzer commented Nov 25, 2015

Sorry closed by accident

@Lette

This comment has been minimized.

Show comment
Hide comment
@Lette

Lette 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.)

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

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 26, 2015

@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.

yishaigalatzer commented Nov 26, 2015

@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

This comment has been minimized.

Show comment
Hide comment
@Lette

Lette 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..?

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

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 26, 2015

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

yishaigalatzer commented Nov 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@Lette

Lette Nov 26, 2015

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

Lette commented Nov 26, 2015

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

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 26, 2015

What does op mean?

yishaigalatzer commented Nov 26, 2015

What does op mean?

@csharpfritz

This comment has been minimized.

Show comment
Hide comment
@csharpfritz

csharpfritz Nov 26, 2015

Member

Original poster - person who first started this thread

Sent from my iPhone

On Nov 26, 2015, at 10:59, Yishai Galatzer notifications@github.com wrote:

What does op mean?


Reply to this email directly or view it on GitHub.

Member

csharpfritz commented Nov 26, 2015

Original poster - person who first started this thread

Sent from my iPhone

On Nov 26, 2015, at 10:59, Yishai Galatzer notifications@github.com wrote:

What does op mean?


Reply to this email directly or view it on GitHub.

@Lette

This comment has been minimized.

Show comment
Hide comment
@Lette

Lette Nov 26, 2015

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

Lette commented Nov 26, 2015

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

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 26, 2015

Thanks Jeff, yes we would like to get it fixed

yishaigalatzer commented Nov 26, 2015

Thanks Jeff, yes we would like to get it fixed

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Aug 23, 2016

Collaborator

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

Collaborator

emgarten commented Aug 23, 2016

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

@kevinkuszyk

This comment has been minimized.

Show comment
Hide comment
@kevinkuszyk

kevinkuszyk Aug 23, 2016

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.

kevinkuszyk commented Aug 23, 2016

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

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Aug 23, 2016

Collaborator

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

Collaborator

emgarten commented Aug 23, 2016

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

@emgarten emgarten closed this Aug 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment