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 current SemVerHelper.PreRelese parser isn't following the current SemVer spec.
For example this is a valid prerelease string Beta.7.z.92 that the PreRelease has problems with.
This is fine because nuget does not support those either. :)
If there's a string there, it's a prerelease version.
The prerelease versions are given precedence in alphabetical order (well technically lexicographic ASCII sort order).
Since SemVerHelper:PreRelease.TryParse expects a string followed by an int the following strings cannot be parsed, but they should as nuget will accept them:
dev20140819130924 (the digits are the date + time in ISO8601) order as the number is to large for an int. This is something I really need!
dev-2014-08-19T130924
I suggest you remove the int-parsing and just use the regex [0-9A-Za-z-]+ as SemVer spec defines. The spec says that prerelease with only digits should be compared numerically, and identifiers with letters or hyphens should be compared in ascii order. However Nuget specifies ascii sort order so just treating it as a string will be fine.
I have problems to map the members of PreRelease to the naming inside the spec.
The spec does not mention "origin".
Furthermore I think that the code is currently not handling multiple elements/dots inside the build metadata (as Build is mapped to the hardcoded 3rd instead of the last element).
Activity
forki commentedon Aug 19, 2014
Nice analysis. I'm currently on vacation. Are you interested in sending a pull request for this?
HCanber commentedon Aug 19, 2014
I'm guessing this is a trivial fix for someone that knows F#. Unfortunately I don't. :(
Issue fsprojects#522
Update SemVerHelper.fs
weismat commentedon Aug 26, 2014
I have problems to map the members of PreRelease to the naming inside the spec.
The spec does not mention "origin".
Furthermore I think that the code is currently not handling multiple elements/dots inside the build metadata (as Build is mapped to the hardcoded 3rd instead of the last element).
Revert "Issue fsprojects#522"
dsyme commentedon Oct 1, 2016
Fixed in #1325