Proper library version numbering
larryv at macports.org
Sat May 2 17:56:00 PDT 2015
On May 2, 2015, at 8:09 PM, Joshua Root <jmr at macports.org> wrote:
> On 2015-5-2 23:30 , Lawrence Velázquez wrote:
> tl;dr version:
> Increase current_version when the library changes in any way.
> Increase compatibility_version when new symbols are added.
Unless the new symbols are exported as weak references.
> Increase the major version (AKA "soname") when any symbols are removed
> or have their semantics changed.
Addendum: The product version, library major version, and library minor version (in your gettext example: "0.19.4", "8", and "10.3.0") need not be related at all. Linking them as tidy seems to have done could be considered imprudent, since it conflates technical information (library versioning) with marketing information (product version).
From our perspective, I think the biggest problems are (1) when a library breaks backwards compatibility and doesn't increase its major version, and (2) when it increases its major version *without* breaking backwards compatibility, thus requiring needless rebuilds.
More information about the macports-dev