How do people deal with this? How can one simultaneously use two
libraries which have hardwired dependencies on two different Clojure
versions, each of which might be mutually incompatible?

What's the community protocol around locally installing Clojure 1.2,
and adding that as a dependency for a published library?

It's necessary in these circumstances to use AOT as sparingly as
possible. If there's no AOT done, there's no problem with mixing Clojure
versions (within reason). So the latest version of Leiningen does zero
AOT'ing unless you explicitly ask for it.

That wasn't quite my question.

Say I rely on a particular feature in 1.2, perhaps


commit b63af1ad6ce38b50552be3c424ea166cb063ee7c
Author: Chouser <chou...@n01se.net>
Date:   Mon Jan 11 02:04:32 2010 -0500

Add agent error handlers and error modes :fail and :continue. Fixes #30


My code doesn't work on 1.1 or earlier.

* How can I express a dependency in a published library for a library which has not been published? Tough question. People will be annoyed if I upload my own build of 1.2, then don't fix my POM when Clojure 1.2 is officialy released.

* What happens when someone else's code -- which explicitly specifies Clojure 1.1 -- wants to use my library? If one uses AOT, you might get some odd stack trace. If one does not use AOT, you get a compile error. Much better solutions are "you get a warning", or "you can specify a range of allowable versions, and the build software chooses the right version".

This is a hard problem, and any dependency management system which requires you to pick a single version of a dependency, when multiple versions exist (and your code might work on more than one) is going to hit it. I don't think "everybody has to upgrade at once" is a good solution.




What's the right way to get lein itself to use a recent Clojure build,
rather than the version with which it ships?

Leiningen allows the project to use a different version of Clojure than
Leiningen itself, so (modulo a bug in the repl task for which this
doesn't apply) this is a non-issue.

Thanks for clarifying.

It appears that it does not work with 1.2, because running `lein` after changing CLOJURE_JAR to point to my 1.2 build caused that error to occur!

-R

--
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