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

Re: Clojure versioning



On Sat Aug 21 22:34, Peter Collingbourne wrote:
> I am in the process of packaging Clojure 1.2 for Debian.  While
> doing so, I noticed that Clojure 1.1 AOT compiled packages, such as
> clojure-contrib, won't work with 1.2.  This led me to discover that
> AOT compiled packages are in general not guaranteed to work between
> Clojure versions.  The way I see it we have two possible solutions:
> 
> 1) Do nothing.  This would essentially mean all clojure libraries would
>    need to move in lockstep with the clojure package.
> 
> 2) Introduce multi version support for clojure.  Each version of clojure
>    would have a version number (major.minor) as part of the package
>    name.  I guess a disadvantage here is that new Clojure versions
>    may be slow moving through NEW.

There's probably also a third: python has a version-dependent compiled format,
which is created when you install the library (I think) and (presumably)
rebuilt when you upgrade python. We could do something like that here - 
but I don't know if it's feasible, since I know nothing about clojure.

> I'd appreciate any possible feedback on this proposal.  If there are
> any Maven experts around I would like to know how feasible the maven
> parts are.

I don't like either solution very much. Of the two, what I would prefer is:

 - version clojure itself
 - have clojure be a metapackage depending on the current version
 - things b-d on clojure and depend on clojureX.Y, with AOT compilation
 - when you upgrade clojure, add a new clojureX.Y, replace clojure metapackage
 but leave the old clojureX.Y. At this point everything in the archive still
 works, depending on the old clojureX.Y
 - slowly rebuild all the libraries to use the new clojure/clojureX.Y
 - when nothing depends on the old clojureX.Y, remove it from the archive

Helper tools can do the dependency calculation for you, so the rebuilds might
not even need source changes. It might also mean that during the transition you
need both versions of clojure installed (but this should only happen in
unstable/testing), but I think that's  better than building multiple versions
of each package. There are also issues of two libraries being used by the same
program, only one of which has been upgraded, which will have to be considered.

Matt

Attachment: signature.asc
Description: Digital signature


Reply to: