Skip to content

error parsing libgit2sharp prerelease #667

Closed

Description

@ctaggart

image

image

image

Activity

  1. forki commented on Feb 28, 2015

    @forki
    Member

    ;-(

  2. forki commented on Feb 28, 2015

    @forki
    Member

    @maartenba @shiftkey so that thing should be a string and sorted alphabetical?

  3. added a commit that references this issue on Feb 28, 2015
    4312fc9
  4. shiftkey commented on Feb 28, 2015

    @shiftkey

    The number after pre is the timestamp of the build time (just so it's always increasing from the build serve) and it's a recent change - libgit2/libgit2sharp#941. I guess we just didn't expect it to hit Int.MaxValue like that - sorry!

    cc @nulltoken

  5. forki commented on Feb 28, 2015

    @forki
    Member

    Yep I figured that and fixed our parser. But I wonder if that will break
    something else in the fragile world of nuget.
    On Feb 28, 2015 11:42 AM, "Brendan Forster" notifications@github.com
    wrote:

    The number after pre is the timestamp of the build time (just so it's
    always increasing from the build serve) and it's a recent change -
    libgit2/libgit2sharp#941
    libgit2/libgit2sharp#941. I guess we just
    didn't expect it to hit Int.MaxValue like that - sorry!

    cc @nulltoken https://github.com/nulltoken

    —
    Reply to this email directly or view it on GitHub
    #667 (comment).

  6. shiftkey commented on Feb 28, 2015

    @shiftkey

    ¯(°_o)/¯

  7. nulltoken commented on Feb 28, 2015

    @nulltoken

    😍 for taking care of this and sorry for somewhat causing this mess 😕

    But I wonder if that will break something else in the fragile world of nuget.

    The doc states that everything after a - is dealt with as a string. The code seems to agree with this as well.

  8. forki commented on Feb 28, 2015

    @forki
    Member

    Ah now I remember. It's this super annoying nuget feature which require us to create -alpha001 versions instead of -alpha1. Paket tries to understand SemVer here and treats alpha10 as newer than alpha9. The timestamp is now a new pattern.

  9. nulltoken commented on Feb 28, 2015

    @nulltoken

    Paket tries to understand SemVer here and treats alpha10 as newer than alpha9.

    @forki Sadly, the spec doesn't provide such interesting/corner cases examples. However, I'm under the impression that section 11 could be understood as

    • Package.0.1.2-alpha10 < Package.0.1.2-alpha9
    • Package.0.1.2-alpha.9 < Package.0.1.2-alpha.10

    "Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order "

  10. kolektiv commented on Mar 1, 2015

    @kolektiv

    If it's of any use, you might want to lift the tests from my SemVer lib - I think they catch these cases...
    https://github.com/xyncro/semver.net/blob/develop/tests/SemVer.Tests/SemVer.Tests.fs

  11. nulltoken commented on Mar 1, 2015

    @nulltoken

    @kolektiv 🆒 ‼️

    However, I'm not sure I can see the test depicting (or invalidating)

    Package.0.1.2-alpha10 < Package.0.1.2-alpha9
    
  12. kolektiv commented on Mar 1, 2015

    @kolektiv

    That's a good point, that exact case isn't covered (although I'm fairly sure a test for that would pass!) I'll add one soon, but the other tests may be useful :)

  13. forki commented on Mar 2, 2015

    @forki
    Member
    numeric pre-release identifiers must not contain leading zeroes (SemVer 2.0.0/9)
    
    raises<exn> <@ SV "1.0.0-01" @>
    raises<exn> <@ SV "1.0.0-alpha.01" @>
    

    this will break with nuget.

  14. kolektiv commented on Mar 2, 2015

    @kolektiv

    Yes, sadly one of the reasons I haven't suggested Paket or others to use SemVer.Net for this is because NuGet is not actually compliant with SemVer, and SemVer.Net doesn't have a "liberal" mode which would let a lot of common NuGet (wrong!) practice pass. Unfortunately tests for NuGet need to be basically "SemVer, but relaxed enough to let the slightly broken NuGet interpretation through"...

  15. forki commented on Mar 3, 2015

    @forki
    Member

    Yes our strategy is basically: "accept everything that is in nuget.org but if we generate new versions then try to create only SemVer versions"

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions