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

Floating version ranges do not include numeric only labels #4513

Closed
emgarten opened this issue Feb 6, 2017 · 3 comments
Closed

Floating version ranges do not include numeric only labels #4513

emgarten opened this issue Feb 6, 2017 · 3 comments
Milestone

Comments

@emgarten
Copy link
Member

emgarten commented Feb 6, 2017

Floating version ranges do not include numeric only labels

Steps

  1. Create a package 1.0.0-100
  2. Reference the package from a project using 1.0.0-*

Result

The package is not referenced because in SemVer the resulting min version of 1.0.0-- is greater than 1.0.0-100. Numeric labels come before non-numeric.

The correct min version would be 1.0.0-0 however writing this out to nuspecs during pack would cause 2.x clients to break. 2.x did not allow release labels to start with numbers (this isn't a SemVer rule).

@rrelyea rrelyea added this to the Future-1 milestone Feb 6, 2017
@anangaur
Copy link
Member

Related issue:
The following scenario also seems broken in the PackageReference world:
I specify the following in the csproj:

<ItemGroup>
    <PackageReference Include="My.Sample.Lib" Version="2.0.0-beta*" />
  </ItemGroup> 

I have 3 packages in my feed:
My.Sample.Lib 2.0.0
My.Sample.Lib 2.0.0-beta1
My.Sample.Lib 2.0.0-beta2

Expected: My.Sample.Lib 2.0.0-beta2 should be resolved.

Actual: My.Sample.Lib 2.0.0 gets resolved.

@spotlesscoder
Copy link

@anangaur: Maybe this would be a solution for my problem #5484

emgarten added a commit to NuGet/NuGet.Client that referenced this issue Aug 1, 2017
* Allow 1.0.0-* to float from 1.0.0-0 instead of 1.0.0-- which is a non-numeric label.
* Treat floating labels that end with . in the same way as labels ending in - when converting to non-snapshot versions for display purposes.

Fixes NuGet/Home#4513
emgarten added a commit to NuGet/NuGet.Client that referenced this issue Aug 2, 2017
* Allow 1.0.0-* to float from 1.0.0-0 instead of 1.0.0-- which is a non-numeric label.
* Treat floating labels that end with . in the same way as labels ending in - when converting to non-snapshot versions for display purposes.

Fixes NuGet/Home#4513
@rrelyea rrelyea modified the milestones: 4.4, Future-1 Aug 2, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Aug 2, 2017

@emgarten - let's make sure to move any issues we close into the current milestone. thx.

pombredanne pushed a commit to nexB/univers that referenced this issue Apr 1, 2022
* Allow 1.0.0-* to float from 1.0.0-0 instead of 1.0.0-- which is a non-numeric label.
* Treat floating labels that end with . in the same way as labels ending in - when converting to non-snapshot versions for display purposes.

Fixes NuGet/Home#4513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants