Search code examples
releaseversions

library- vs. application-version


If you have a project, that releases a library and an application, how you handle version-numbers between the two.

Example: Your project delivers a library, that convert different file-formats into each other. The library is released for inclusion into other applications. But you also release a command-line-application, that uses this library and implements an interface to the functionality.

New releases of the library lead to new releases of the application (to make use of all new features), but new releases of the application may not trigger new releases of the library. Now how are the versions numbers handled: Completely independent or should library- and application-version be dependent in some way?


Solution

  • I'd say use separate version numbers, and of course document what minimum library version is required for each release of the app. If they always have the same version number, and you only ever test the app against the equal-numbered library version, then they aren't really separate components, so don't say they are. Release the whole lot as one lump.

    If you make them separate, you can still give them the same version number when it's appropriate - for example after a major compatibility break you might release Version 2.0 of both simultaneously.

    The following example illustrates: xsltproc (a command-line app) is released as part of libxslt (a library), so doesn't have its own version number. But libxslt depends on two other libraries, and the version numbers of those are independent.

    $ xsltproc --version
    Using libxml 20628, libxslt 10120 and libexslt 813
    xsltproc was compiled against libxml 20628, libxslt 10120 and libexslt 813
    libxslt 10120 was compiled against libxml 20628
    libexslt 813 was compiled against libxml 20628