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

Leading or trailing hyphen in pre-release or build identifiers #360

Closed
chrisowensboston opened this issue Mar 22, 2017 · 3 comments
Closed

Comments

@chrisowensboston
Copy link

As written, the spec allows a pre-release or build identifier to begin or end with a hyphen.

As a result, the following pass the spec:

  • 2.1.7--43 (version is '2.1.7'; pre-release is '-43' )
  • 2.1.7+-43 (version is '2.1.7'; build identifier is '-43')
    Is this intended / desired?
@FichteFoll
Copy link

FichteFoll commented Mar 23, 2017

The following text is in both the pre-release and the build metadata sections:

Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.

So yes, this is valid. They compare lexicographically (over their ASCII value), by the way.

@jwdonahue
Copy link
Contributor

I would not expect to see any humans deciding to use version strings of that form, but I can imagine automation that might produce them, particularly if some config/database field is empty at the time it was generated. The hyphens may actually convey some meaning to somebody.

Since there is no bug or controversy here, please close this issue at your earliest possible convenience.

@chrisowensboston
Copy link
Author

Closed as requested by jsdonahue: there is no bug or controversy here.

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

3 participants