go does mean semver.org when it refers to semver > Modules must be semantically versioned according to semver[,...]
refers to what the numbers mean, the v prefix is required but not part of the version, more clearly explained in a faq on semver.org: > Is “v1.2.3” a semantic version? > No, “v1.2.3” is not a semantic version. However, prefixing a semantic version with a “v” is a common way (in English) to indicate it is a version number. Abbreviating “version” as “v” is often seen with version control. Example: git tag v1.2.3 -m "Release version 1.2.3", in which case “v1.2.3” is a tag name and the semantic version is “1.2.3”. On Wednesday, April 29, 2020 at 4:50:54 PM UTC+2, volf...@gmail.com wrote: > > Hello, > > recently I've created a new golang library and released it with pre-release > version first to catch any bugs before doing proper 1.0.0 release. > > The pre-release version was called 1.0.0-pre-release+1 , which according > to https://semver.org/ should be completely legal semver. If I read the > grammar correctly, it should fall under > > <version core> "-" <pre-release> "+" <build> > > with > > > > <version core> being 1.0.0, which is obviously correct. > > > > <pre-release> being pre-release, which should be ok > from this chain > > > > <pre-release> ::= <dot-separated pre-release identifiers> > > <dot-separated pre-release identifiers> ::= > <pre-release identifier> > | <pre-release identifier> "." <dot-separated pre-release identifiers> > > <pre-release identifier> ::= <alphanumeric identifier> > | <numeric identifier> > > <alphanumeric identifier> ::= <non-digit> > | <non-digit> <identifier characters> > | <identifier characters> <non-digit> > | <identifier characters> <non-digit> <identifier characters> > > <identifier characters> ::= <identifier character> > | <identifier character> <identifier characters> > > <identifier character> ::= <digit> > | <non-digit> > > <non-digit> ::= <letter> > | "-" > > so again, since all characters in pre-release fit into <non-digit>, that > should > be ok as well. > > > > <build> being 1 seems again obviously correct from > > <build identifier> ::= <alphanumeric identifier> | <digits> > > > > And despite the version being correct semver, it was mangled into > pseudo-version > v1.0.0-pre-release.0.20200420093620-87861123c523. However, to quote from > > https://github.com/golang/go/wiki/Modules#can-a-module-consume-a-package-that-has-not-opted-in-to-modules > > > If the repository does not have any valid semver tags, then the > repository's > > version will be recorded with a "pseudo-version" such as > > v0.0.0-20171006230638-a6e239ea1c69 > > > > I see basically 3 possibilites here: > > 1. Documentation is incorrect since only *subset* of semver is actually > supported. > > 2. There is bug somewhere in the semver parsing causing my version not to > be > considered correct. > > 3. I cannot read Backus-Naur and my version is *not* correct semver. > > Is there something else I did miss in this analysis? > > > W. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7a8c40e5-ff83-4624-9d8d-880be21a7a93%40googlegroups.com.