You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
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!
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.
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 andidentifiers with letters or hyphens are compared lexically in ASCII sort order"
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 :)
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"...
Activity
forki commentedon Feb 28, 2015
;-(
forki commentedon Feb 28, 2015
@maartenba @shiftkey so that thing should be a string and sorted alphabetical?
Parse prerelease numbers into bigint since ints might overflow - fixes …
shiftkey commentedon Feb 28, 2015
The number after
preis 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
forki commentedon Feb 28, 2015
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:
shiftkey commentedon Feb 28, 2015
¯(°_o)/¯
nulltoken commentedon Feb 28, 2015
😍 for taking care of this and sorry for somewhat causing this mess 😕
The doc states that everything after a
-is dealt with as a string. The code seems to agree with this as well.forki commentedon Feb 28, 2015
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.
nulltoken commentedon Feb 28, 2015
@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
"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 "
kolektiv commentedon Mar 1, 2015
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
nulltoken commentedon Mar 1, 2015
@kolektiv 🆒‼️
However, I'm not sure I can see the test depicting (or invalidating)
kolektiv commentedon Mar 1, 2015
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 :)
forki commentedon Mar 2, 2015
this will break with nuget.
kolektiv commentedon Mar 2, 2015
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"...
forki commentedon Mar 3, 2015
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"