ANN: Clojure 1.4.0-beta1

86 views
Skip to first unread message

Stuart Sierra

unread,
Feb 3, 2012, 10:47:41 AM2/3/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Clojure 1.4 goes beta! This release is essentially the same as
1.4.0-alpha5. It will hit the Maven Central repository in a few hours.

No new features in the 1.4 line after this point. Bug fixes are still allowed.

Also, if somebody wants to compile a list on the wiki of all the bug
fixes and changes since 1.3, that would be very helpful. Thanks!

-Stuart Sierra
clojure.com

David Nolen

unread,
Feb 3, 2012, 12:05:48 PM2/3/12
to cloju...@googlegroups.com
One small bug that would be nice to fix - ClojureScript uses the Clojure reader. clojure.core// is hard-coded in. Similarly it would be nice to have cljs.core// in there. Think we can get this in?

David

Michael Fogus

unread,
Feb 3, 2012, 12:12:20 PM2/3/12
to cloju...@googlegroups.com
> One small bug that would be nice to fix - ClojureScript uses the Clojure
> reader. clojure.core// is hard-coded in. Similarly it would be nice to have
> cljs.core// in there. Think we can get this in?

It's deeper than that even. The ClojureScript reader is the Clojure
reader, but it also has a runtime reader in cljs.reader. This causes
some problems around supporting the tagged literals in Clojure 1.4, as
I'm sure you can surmise.

David Nolen

unread,
Feb 3, 2012, 12:17:51 PM2/3/12
to cloju...@googlegroups.com
What's the deeper problem besides code duplication? 

Tassilo Horn

unread,
Feb 3, 2012, 12:19:27 PM2/3/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Stuart Sierra <the.stua...@gmail.com> writes:

Hi Stu,

> Clojure 1.4 goes beta! This release is essentially the same as
> 1.4.0-alpha5. It will hit the Maven Central repository in a few
> hours.

Great news, I'd very much like to test-drive it before the 1.4.0
release. Is there anything better than downloading its JAR and
replacing the clojure-1.3.0.jar in my project with it?

As soon as I change my [org.clojure/clojure "1.3.0"] dependency to
"1.4.0-alpha5" (beta1 seems not have arrived yet) or "[1.3.0,)", maven
gets messed up when fetching dependencies...

Right now, my minimized test project deps are

:dependencies [[org.clojure/clojure "1.3.0"]
[ordered "0.3.0"]
[org.clojure/tools.macro "[0.1.1,)"]]

which works fine. Now I've seen that ordered-1.0.0 is out. That still
works fine.

:dependencies [[org.clojure/clojure "1.3.0"]
[ordered "1.0.0"]
[org.clojure/tools.macro "[0.1.1,)"]]

Now trying to get the clojure snapshot breaks maven's dependency
management.

:dependencies [[org.clojure/clojure "1.4.0-alpha5"]
[ordered "1.0.0"]
[org.clojure/tools.macro "[0.1.1,)"]]

It errors because it couldn't download
org.clojure:clojure:jar:1.3.0-alpha5. But why 1.3.0-alpha5?!?

Strangely, when reverting my test project to an older ordered version,
it works fine again.

:dependencies [[org.clojure/clojure "1.4.0-alpha5"]
[ordered "0.3.0"]
[org.clojure/tools.macro "[0.1.1,)"]]

Argh, I'll never understand maven. Is there something option to make it
show the dependency tree? I mean, tools.macro doesn't seem to have any
dependencies declared and ordered 1.0.0 has clojure "[1.2.0,1.3.0]" as
dependency. But why on earth does maven then try to get 1.3.0-alpha5?

And is there a way to influence external deps? For example, I'm pretty
sure that the ordered library works just fine with 1.4.0. Currently, it
seems to me that in order to upgrade my own project to 1.4.0, I have to
wait until all my dependencies also added 1.4.0 as a allowed dependency,
which might take ages and hinders early test-driving and adoption of new
clojure releases.

Sorry, that mail was not intended to become a long rant. But I'm really
interested to know how others deal with the "maven hell".

Bye,
Tassilo

Phil Hagelberg

unread,
Feb 3, 2012, 1:10:51 PM2/3/12
to cloju...@googlegroups.com
Tassilo Horn <tas...@member.fsf.org> writes:

> Argh, I'll never understand maven. Is there something option to make it
> show the dependency tree? I mean, tools.macro doesn't seem to have any
> dependencies declared and ordered 1.0.0 has clojure "[1.2.0,1.3.0]" as
> dependency. But why on earth does maven then try to get 1.3.0-alpha5?

I don't know what is causing this particular problem, but I've recently
discovered that version ranges are very problematic and almost always
more trouble than they are worth. Part of the problem is that version
ranges in your dependencies always "win" over direct declarations in
your project, and part of the problem is that a build with
non-overlapping ranges will simply refuse to resolve.

I highly recommend avoiding ranges entirely; rather than specifying
compatible versions in project.clj you should do so in your project's
documentation. You can use ":exclusions [org.clojure/clojure]" inside
each dependency vector; that should allow your top-level declaration on
the 1.4 beta to win.

-Phil

Stuart Sierra

unread,
Feb 3, 2012, 2:08:21 PM2/3/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Both Maven and Leiningen can exclude transitive dependencies. In lein, it looks like this:

https://github.com/technomancy/leiningen/blob/8baf33ec80bae1d3509590215262351aa2d72fbe/sample.project.clj#L35

-S

Tassilo Horn

unread,
Feb 3, 2012, 2:20:04 PM2/3/12
to cloju...@googlegroups.com
Phil Hagelberg <ph...@hagelb.org> writes:

Hi Phil,

> I highly recommend avoiding ranges entirely; rather than specifying
> compatible versions in project.clj you should do so in your project's
> documentation.

Yes, I don't want to specify compatible versions at all. I want to say
"I need at least foobar version 0.3.7, but anything more recent is fine
as well." If there are incompatible changes in a lib, I'll adapt to
them immediately and adjust the minimum version of that lib accordingly.

If such a workflow is not doable in the maven world: is there at least a
way to query what dependencies have more recent versions than I have
specified in my project.clj (or in the pom.xml generated from it)?

> You can use ":exclusions [org.clojure/clojure]" inside each dependency
> vector; that should allow your top-level declaration on the 1.4 beta
> to win.

Yes, that does the trick when being added into the ordered lib's
dependency vector. The meaning is "disable this particular dep of the
lib", right? That's very, very useful.

Ok, back to the original topic: after updating to 1.4.0-beta1, all my
tests still pass, so at least nothing overly obvious in clojure itself
that already existed in 1.3.0 seems to be broken, ordered-1.0.0 seems to
be compatible as well, ditto for core.logic-0.6.1,
core.match-0.2.0-alpha8, and tools.macro-0.1.1...

Bye,
Tassilo

Tassilo Horn

unread,
Feb 3, 2012, 2:28:17 PM2/3/12
to cloju...@googlegroups.com, clo...@googlegroups.com
Stuart Sierra <the.stua...@gmail.com> writes:

Hi Stuart,

> Both Maven and Leiningen can exclude transitive dependencies. In lein,
> it looks like this:
>
> https://github.com/technomancy/leiningen/blob/8baf33ec80bae1d3509590215262351aa2d72fbe/sample.project.clj#L35

Yes, Phil already pointed that out, and it does the trick. :-)

Thanks,
Tassilo (running successfully on 1.4.0-beta1, now)

Reply all
Reply to author
Forward
0 new messages