[GH-ISSUE #405] Weird alphanumeric-identifier grammar allowing "1.2.3----+----3.2.1" as a correct version number #5417

Closed
opened 2026-06-15 11:48:35 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @nowox on GitHub (Nov 1, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/405

I feel bizarre to allow - after the dash. The given grammar perfectly allows version such as

1.2.3----+----3.2.1

Is it really wanted?

Originally created by @nowox on GitHub (Nov 1, 2017). Original GitHub issue: https://github.com/semver/semver/issues/405 I feel bizarre to allow `-` after the `dash`. The given grammar perfectly allows version such as ``` 1.2.3----+----3.2.1 ``` Is it really wanted?
GiteaMirror added the won't fix label 2026-06-15 11:48:35 -05:00
Author
Owner

@akalongman commented on GitHub (Nov 1, 2017):

If developer is stupid, you can not fix that via specifications or rules :)

<!-- gh-comment-id:341149947 --> @akalongman commented on GitHub (Nov 1, 2017): If developer is stupid, you can not fix that via specifications or rules :)
Author
Owner

@nowox commented on GitHub (Nov 1, 2017):

You can at least refuse the - which is confusing...

<!-- gh-comment-id:341150678 --> @nowox commented on GitHub (Nov 1, 2017): You can at least refuse the `-` which is confusing...
Author
Owner

@jwdonahue commented on GitHub (Nov 28, 2017):

Hyphens are legal characters in prerelease and meta identifiers. There might actually be some automation out there that would generate such a perfectly valid version string, say, when the user failed to initialize some database/configuration fields.

This seems to be a duplicate of #360.

<!-- gh-comment-id:347439176 --> @jwdonahue commented on GitHub (Nov 28, 2017): Hyphens are legal characters in prerelease and meta identifiers. There might actually be some automation out there that would generate such a perfectly valid version string, say, when the user failed to initialize some database/configuration fields. This seems to be a duplicate of [#360](https://github.com/semver/semver/issues/360).
Author
Owner

@jwdonahue commented on GitHub (Nov 28, 2017):

I believe this should be closed as won't fix. The tag identifiers are not empty and contain legal characters.

<!-- gh-comment-id:347696427 --> @jwdonahue commented on GitHub (Nov 28, 2017): I believe this should be closed as won't fix. The tag identifiers are not empty and contain legal characters.
Author
Owner

@haacked commented on GitHub (Nov 29, 2017):

Not really wanted, but not really unwanted. Feels like it'd needlessly complicate the spec to clean this scenario up. Closing as "won't fix"

<!-- gh-comment-id:347949286 --> @haacked commented on GitHub (Nov 29, 2017): Not really wanted, but not really unwanted. Feels like it'd needlessly complicate the spec to clean this scenario up. Closing as "won't fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#5417