[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

versioning (was: svn commit: rev 2201 - trunk trunk/build)

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-14 22:11:06 CEST

On Fri, Jun 14, 2002 at 02:26:58PM -0500, Ben Collins-Sussman wrote:
> Philip Martin <philip@codematters.co.uk> writes:
> > On a related note, what does adding a version number to the library
> > name give us that we don't get from the normal shared library version
> > number?
> Philip, read this document. It's actually really good:
> http://www106.pair.com/rhp/parallel.html
> To quote from this article:
> "Library sonames only address the problem of runtime linking
> previously-compiled applications. They don't address the issue of
> compiling applications that require a previous version, and they
> don't address anything other than libraries."

As a case in point, consider our use of Berkeley DB. On my system, some apps
link against db-3.2 and some against db-4. It all works out quite well :-)
The basic problem is that you link against foo.so, rather than foo.so.1 or
foo.so.2. In this model, you link against foo-1.so or foo-2.so.

Note that we only need -1 or -2 or whatever. Per the rules specified in our
versioning document(*) (well, APR's, but we use it), we only change APIs at
major version number changes.

Hmm. Maybe that isn't quite right. If somebody builds against 1.2, they
cannot link against 1.1 (although the reverse is true). The issue is that we
want apps built against 1.1 to be usable against 1.2, 1.3, etc. But if they
link against libsvn_fs-1.1, then they won't get the newer libraries.

Well, heck. I'm of a mind to say that the minor version new vs old should be
handled by package dependencies. If you use a (new) function from 1.2, then
set your dep to be >= 1.2 and link against -1. Worst case (for systems
without deps) is that an error will pop from the runtime link loader.
"upgrade your lib"

This does make me think that we need a bit more rigor in the versioning. We
shouldn't use #define to map old APIs into new APIs. Otherwise, somebody
could end up using a newer API without realizing it. If they list their
package dep as >= 1.0 since they think, "I'm not using any APIs other than
what is 1.0", but their system has 1.4 and it remaps some functions, then
their package dep is wrong.

I'm going to go fix up the versioning document now...


Greg Stein, http://www.lyra.org/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 14 22:09:39 2002

This is an archived mail posted to the Subversion Dev mailing list.