Hi,

Am 22.01.2010 um 21:07 schrieb Richard Newman:

>> BTW: commit ids as version numbers break down here, because they are
>> not ordered.
> 
> They have a partial ordering wrt a particular repo. Many repos have 
> straight-line histories, and thus have a total ordering.

So how do I find out the ordering of your x repository here in my machine, 
possibly without having x installed. Or your repo cloned?

>> Neither maven nor ivy are so simple-minded to allow only one version.
>> How well ranges work out... I can't really know. I only know the
>> theory for now.
> 
> That the underlying system allows it is no comfort when there seems to be no 
> obvious provision in project.clj for this:
> 
>  :dependencies [[org.clojure/clojure "1.1.0"]
>                 [org.clojure/clojure-contrib "1.0-SNAPSHOT"]
>                 [clout "0.1"]]
> 
> Does that mean "use whatever's appropriate", or "I must use 1.1.0 only"? Do 
> these version strings admit that Maven syntax?

One can investigate this. If lein doesn't support this notation.. Sorry to play 
the tool card: maven does, ant+ivy does, gradle does.

> How does one tell Maven/lein "never use two different versions of Clojure"?

It does never use two different versions of Clojure. Either there is a range of 
allowed versions, then some conflict resolver (choosable by you) chooses an 
appropriate version. If no such range is available, it stops telling you about 
the problem.

> How does one tell Maven to *rebuild* a library -- e.g., Compojure -- using 
> 1.2, so that I can safely use it in my requires-1.2 project?

For Clojure this is only an issue when using AOT. Without it just works. If 
there is a problem, because it uses for example a removed function, then a 
rebuild wouldn't help anyway.

> (Or "look in a repo to find a version of Compojure built using 1.2"?)

With AOT you are (maybe) locked into a specific Clojure version. One solution 
could be to provide several versions compatible with the different versions of 
the dependency. But that would be not very nice I agree. But see below.

> These are questions that I think must be addressed, because these problems 
> come up all the time.
> 
> Just this week I noticed that Apache HttpComponents 4.0.1 and 4.1 use 
> completely different methods to apply pre-emptive HTTP Basic Auth, and have 
> even changed class hierarchies. A version of clj-apache-http targeted at 
> 4.0.1 won't even run against a 4.1 jar (and vice versa), *even without AOT*, 
> because the package names are different. On the other hand, some libraries -- 
> such as log4j -- preserve API compatibility across versions.
> 
> Sorry to be raining on everyone's parade with this...

Then let me open the umbrella.

The root cause of this situation is not a broken version system, but broken API 
design. If you need 4.1 and clj-apache-http needs 4.0.1 and both can't coexist, 
then you are hosed. And no whatsoever clever system of handling dependencies 
will ever be able to fix that. If log4j does preserve API compatibility.. 
hooray *clapclap*. But then you will also have no problem with the version 
systems.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to