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

SemVerHelper.parse doesn't handle prerelease segments that begin with a digit. #1324

Closed
baronfel opened this issue Jul 21, 2016 · 1 comment

Comments

@baronfel
Copy link
Contributor

Description

The SemVerHelper.parse method returns a None prerelease when given a SemVer string like "0.0.12-012345678". This fails according to the spec, quoted here:

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.

Repro steps

Please provide the steps required to reproduce the problem

  1. Fake.SemVerHelper.parse "0.0.12-01234578" |> fun i -> i.Prerelease.IsNone <> true

Expected behavior

The prerelease segment is parsed as Some { Origin = "012345678"; Name = ""; Number = Some "012345678" }.

Actual behavior

The prerelease segment is parsed as None

Known workarounds

None

@mynkow
Copy link

mynkow commented Jul 22, 2016

Can this be fixed asap please.

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

2 participants