[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Versioned releases

From: Dmitry Marakasov
Subject: Re: Versioned releases
Date: Thu, 4 Jun 2020 23:11:20 +0300

* Paul Smith (psmith@gnu.org) wrote:

> Regarding the format of the version:
> First, semver is not right for gnulib.  The entire concept behind
> semver and similar versioning schemes is to use a version string to
> describe compatibility guarantees between different versions.  That's
> (IMO) completely inappropriate for a source-only package like gnulib.

Why, that's precisely what semver is useful and was designed for.
It's MAJOR.MINOR.PATCH - if you break API, bump MAJOR, if you introduce
new feature, bump MINOR, otherwise bump PATCH.

So as a consumer I may just require e.g. version >=1.2.3 <2, and expect
it to be API-compatible and have all the features my code requires. With
that, library code may be safely (even automatically) updated to the
latest 1.x version, be it a systemwide package maintained by someone
else, or a bundled code/subrepository, and consumer code will not break,
yet having all the latest features/fixes from the library.

> I think the Git SHA is the single most critical element and must be
> included.  However, it's not too informative unless the user has the
> Git repo.
> My recommendation would be to automatically add a tag once a month
> (say) to the gnulib Git repo with the date, and then use the "git
> describe" output as the version.  This gives an easily-comparable
> version string with all the info needed.

This complicates the format, as SHAs are never appropriate in the
verions, for they are not monotonic and alphabetic characters are not
compatible with all package managers. Someone may include them, some may
omit them, and we'll end up with incompatible versioning schemes again.

If you're going to introduce a version, please be sure it's the same
being a tag or embedded in the source. You may as well embed git commit
or `git describe` output, but it should be clearly separated from the

Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:              https://github.com/AMDmi3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]