mirror of
https://github.com/semver/semver.git
synced 2026-07-11 05:12:48 -05:00
Some comments about semver #182
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Vampire on GitHub (Jun 12, 2015).
I just read the spec at
255bc951daand I have some notes for you.I hope it is ok to have them in one issue.
Text
Questionable versions
Here some examples of versions that are valid according to the spec, but I'm not 100% sure this is intended:
1.0.0---+1231.0.0-0.-.-.-+1231.0.0-001foo1.0.0-001-foo1.0.0+000001Sorting
The spec describes what to compare when if comparing semvers and how to interpret it. But it is missing about case-sensitivity. I'd like to suggest adding that identifier comparison has to be done case-insensitively.
BNF form
Use EBNF
I'd like to suggest using EBNF according to ISO 14977 instead of a non-standard modified BNF like currently, it is much more readable and makes the result much more concise, e. g. by eliminating the need for recursion and introducing optionals.
E. g.
could be written as
Reuse nonterminals where possible
should be
Simplify the BNF form, even if not using EBNF
e. g. if
is changed to
you can simplify
to
as now
<identifier characters>can be emptySVG
The pre-release and build parts can be simplified.
The part before and after the dot are identical in both cases.
So you can simply loop back to the beginning of the respective cluster start after the dots
@jwdonahue commented on GitHub (Dec 8, 2017):
@Vampire
Questionable versions
All are expected to be legal SemVer strings. Such string may result when automation finds empty data fields, or might even have some meaning to somebody. Disallowing them while retaining the usefulness of the current spec would just complicate the spec and make it harder to implement.
Sorting
Case sensitivity has been covered in other issues, can't be changed in the 2.x.x series and there is no current initiative to get SemVer 3.x.x off the ground.
BNF
Interesting points, please open a separate issue if you're willing to do the work and issue a PR.
SVG
Same as for BNF, separate issue and present a PR.
In any case, please close this old issue at your earliest possible convenience.
@jwdonahue commented on GitHub (Jan 17, 2020):
@Vampire, unless you intend to issue a PR or have further questions, please close this issue at your earliest possible convenience.
@alexandrtovmach commented on GitHub (Jun 10, 2020):
This issue looks staled and will be closed in 10 days if there are no objections. Thanks everyone for contributions, you're amazing 🎆