Clojure 1.5.0 RC 1

4,362 views
Skip to first unread message

Stuart Halloway

unread,
Dec 22, 2012, 11:09:07 AM12/22/12
to cloju...@googlegroups.com, clo...@googlegroups.com
I just kicked off the RC1 build for Clojure.  With luck, within a few hours it will show up at Maven Central [1]

Please test it.  It would be fantastic if as many people as possible updated their projects and tested with the RC, so we can flush out issues now instead of in release.

Regards,
Stu

Denis Labaye

unread,
Dec 22, 2012, 2:16:32 PM12/22/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Is the release note here: https://github.com/clojure/clojure/blob/master/changes.md ? 

Anyway it looks tasty: 
  • New and Improved Features: Reducers
  • New threading macros:
    • cond->
    • cond->>
    • as->
    • some->
...


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Joseph Smith

unread,
Dec 22, 2012, 2:55:26 PM12/22/12
to clo...@googlegroups.com, clo...@googlegroups.com, cloju...@googlegroups.com
Awesome stuff. I'm using those threading macros already. :)

---
Joseph Smith
@solussd

Peter Taoussanis

unread,
Dec 23, 2012, 11:50:21 AM12/23/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Were any breaking changes made between alpha3 and RC1? I haven't spent much time trying to track down causes so it's very possible I'm mistaken, but I seem to be running into some weird behavior under RC1.

Specifically, seem to be having trouble with `ring.middleware.reload/wrap-reload`:
Exception in thread "main" java.lang.IllegalArgumentException: contains? not supported on type: clojure.lang.LazySeq, compiling:(routes.clj:294:3)
Line 294 is where the wrap-reload is applied, and this compiles fine under alpha3.

Also `lein swank` appears to be failing on Leiningen 2.0.0-preview10: 
Exception in thread "main" java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.Compiler$CompilerException, compiling:(swank/commands/basic.clj:182:24)

Is anyone else having problems?

Alex Baranosky

unread,
Dec 23, 2012, 11:54:10 AM12/23/12
to clo...@googlegroups.com, cloju...@googlegroups.com
I have been unable to run lein-swank since, I think, clojure-1.5.0-beta1.

--
You received this message because you are subscribed to the Google

Peter Taoussanis

unread,
Dec 23, 2012, 11:56:21 AM12/23/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Both of these cases appear to relate to namespaces btw. Line 182 of swank/commands/basic.clj is the 3rd `let` form:

(defslimefn load-file [file-name]
(let [libs-ref @(resolve 'clojure.core/*loaded-libs*)
      libs @libs-ref
      ns-form (ns/read-file-ns-decl (java.io.File. file-name))
      ns (second ns-form)]
  (try
    (when ns
      (destroy-ns ns))
    (dosync (ref-set libs-ref #{}))
    (pr-str (clojure.core/load-file file-name))
    (finally
     (dosync (alter libs-ref into libs))))))

Peter Taoussanis

unread,
Dec 23, 2012, 12:04:00 PM12/23/12
to clo...@googlegroups.com, cloju...@googlegroups.com
Just confirming: both issues are indeed present in beta1 (and RC1), but not alpha3.

Will go over the changelog tomorrow and try track this down.

Jochen Schmitt

unread,
Dec 23, 2012, 1:11:31 PM12/23/12
to clo...@googlegroups.com
On Sat, Dec 22, 2012 at 11:09:07AM -0500, Stuart Halloway wrote:

> Please test it. It would be fantastic if as many people as possible
> updated their projects and tested with the RC, so we can flush out issues
> now instead of in release.

I have tried to build a RPM package of clojure-1.5.0-RC1 for Feodra
and have got the following error message:

test:
[java] Exception in thread "main" java.io.FileNotFoundException: Could not locate clojure/test/generative/runner__init.class or clojure/test/generative/runner.clj on classpath:
[java] at clojure.lang.RT.load(RT.java:434)
[java] at clojure.lang.RT.load(RT.java:402)
[java] at clojure.core$load$fn__5039.invoke(core.clj:5520)
[java] at clojure.core$load.doInvoke(core.clj:5519)
[java] at clojure.lang.RestFn.invoke(RestFn.java:408)
[java] at clojure.core$load_one.invoke(core.clj:5326)
[java] at clojure.core$load_lib$fn__4988.invoke(core.clj:5365)
[java] at clojure.core$load_lib.doInvoke(core.clj:5364)
[java] at clojure.lang.RestFn.applyTo(RestFn.java:142)
[java] at clojure.core$apply.invoke(core.clj:619)
[java] at clojure.core$load_libs.doInvoke(core.clj:5403)
[java] at clojure.lang.RestFn.applyTo(RestFn.java:137)
[java] at clojure.core$apply.invoke(core.clj:619)
[java] at clojure.core$require.doInvoke(core.clj:5486)
[java] at clojure.lang.RestFn.invoke(RestFn.java:408)
[java] at user$eval1.invoke(run_tests.clj:1)
[java] at clojure.lang.Compiler.eval(Compiler.java:6618)
[java] at clojure.lang.Compiler.load(Compiler.java:7062)
[java] at clojure.lang.Compiler.loadFile(Compiler.java:7019)
[java] at clojure.main$load_script.invoke(main.clj:286)
[java] at clojure.main$script_opt.invoke(main.clj:348)
[java] at clojure.main$main$fn__6676.invoke(main.clj:432)
[java] at clojure.main$main.doInvoke(main.clj:429)
[java] at clojure.lang.RestFn.invoke(RestFn.java:408)
[java] at clojure.lang.Var.invoke(Var.java:415)
[java] at clojure.lang.AFn.applyToHelper(AFn.java:161)
[java] at clojure.lang.Var.applyTo(Var.java:532)
[java] at clojure.main.main(main.java:37)

It may be nice, if you can give me a hint to solve this issue, so
I can add this package to Fedora Rawhide.

Best Regards:

Jochen Schmitt

Andy Fingerhut

unread,
Dec 23, 2012, 2:32:57 PM12/23/12
to clo...@googlegroups.com
If part of the script to build an RPM package is this command:

ant

then you should run the command "./antsetup.sh" just before that. Without "./antsetup.sh" you will see the error message you give below, because ant by itself does not pull in the necessary dependencies.

Andy

Stuart Sierra

unread,
Dec 23, 2012, 2:34:19 PM12/23/12
to clo...@googlegroups.com
On Sunday, December 23, 2012 1:11:31 PM UTC-5, JSchmitt wrote:
> I have tried to build a RPM package of clojure-1.5.0-RC1
> for Feodra and have got the following error message:
>
>  test: [java] Exception in thread "main"
> java.io.FileNotFoundException: Could not locate
> clojure/test/generative/runner__init.class or
> clojure/test/generative/runner.clj on classpath:

It looks like you're missing the test.generative library:
https://github.com/clojure/test.generative

The 'test' step of Clojure's build now requires the
test.generative library.

The Maven build will download test.generative automatically
as needed. If you're building with Ant, you need to run
'antsetup.sh' first.

-S

Sean Corfield

unread,
Dec 23, 2012, 2:42:50 PM12/23/12
to clo...@googlegroups.com
On Sun, Dec 23, 2012 at 8:50 AM, Peter Taoussanis <ptaou...@gmail.com> wrote:
Specifically, seem to be having trouble with `ring.middleware.reload/wrap-reload`:
Exception in thread "main" java.lang.IllegalArgumentException: contains? not supported on type: clojure.lang.LazySeq, compiling:(routes.clj:294:3)
Line 294 is where the wrap-reload is applied, and this compiles fine under alpha3.

Sounds like http://dev.clojure.org/jira/browse/CLJ-932 where contains? now throws an exception if used on a non-keyed collection type.
 
Also `lein swank` appears to be failing on Leiningen 2.0.0-preview10: 
Exception in thread "main" java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.Compiler$CompilerException, compiling:(swank/commands/basic.clj:182:24)

Given that swank-clojure is deprecated, this may be the not so subtle push that moves everyone over to nREPL :) IIRC, the problem is that swank constructs that Java class explicitly and its signature has changed to include column number?
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Jochen Schmitt

unread,
Dec 23, 2012, 3:33:34 PM12/23/12
to clo...@googlegroups.com
On Sun, Dec 23, 2012 at 11:32:57AM -0800, Andy Fingerhut wrote:

> If part of the script to build an RPM package is this command:
>
> ant
>
> then you should run the command "./antsetup.sh" just before that. Without "./antsetup.sh" you will see the error message you> give below, because ant by itself does not pull in the necessary dependencies.

This is not a acceptable solution because this will downloading files
from the internet. On the build server you will get error messages
which was cause my the attemp to make a internet connection.

Best Regards:

Jochen Schmitt

Andy Fingerhut

unread,
Dec 23, 2012, 3:45:50 PM12/23/12
to clo...@googlegroups.com
Are there no other RPMs that require Internet access to complete their build?

e.g. no others that use Maven to pull in dependencies before building?

If there is no provision for that, I'd open up the question to others with more experience in these matters: How would you recommend that someone create an RPM for Clojure on a build machine with no Internet access?

The only way I can think of would be to pull in the dependencies on a machine with Internet access, and make a package available to the RPM build machine with all dependencies included.

Either that, or get a pre-built JAR file for Clojure from the official distribution locations (e.g. the Maven repo) and put that into an RPM.

Andy

Jochen Schmitt

unread,
Dec 23, 2012, 4:11:09 PM12/23/12
to clo...@googlegroups.com
On Sun, Dec 23, 2012 at 12:45:50PM -0800, Andy Fingerhut wrote:

> Are there no other RPMs that require Internet access to complete their build?
>
> e.g. no others that use Maven to pull in dependencies before building?

Dependencies should be solved by the specification of BuildRequires statements
in the SPEC file, so the build system will install the packages which are required
to build a package before the build will be start.

> If there is no provision for that, I'd open up the question to others with more experience in these matters: How would you recommend that someone create an RPM for Clojure on a build machine with no Internet access?

Sorry, I'm talking about the official build system of the Fedora projejct and
the download of data during the build process may a violatation of the
packaging policies.

> The only way I can think of would be to pull in the dependencies on a machine with Internet access, and make a package available to the RPM build machine with all dependencies included.

???

> Either that, or get a pre-built JAR file for Clojure from the official distribution locations (e.g. the Maven repo) and put that into an RPM.

Using of pre-built JAR files in a package is also a violation of the packaging
policy which state that all stuff should be built from soruce.

Because it's looks like, thest test.gnerative may be a speicial JAR file
for Clojure, the best way may to include it into the official Clojure
soruce pacakge.

In the meanwhile, I have found a way to suppres the test step in the
ant script.

Best Regards:

Jochen Schmitt

Softaddicts

unread,
Dec 23, 2012, 4:12:42 PM12/23/12
to clo...@googlegroups.com

If find this odd, these days you need remote access to install things,
wether it's Maven or some RPM repos is irrelevant.

Pulling RPMs by hand is a nightmare, even worse than Maven, there is a myriad
of RPM dependencies out there depending on your Linux distro.

Jochen, I would suggest implementing apache archiva on a server that has internet
access. Using lein on this server would allow you to pull the dependencies
locally and then transfer them by hand on the other server if needed.

You can define repos to search in archiva (you can add clojars, sonatype is there by
default I think).

If your build server has access to this gateway server, it's even simpler.

Archiva can serve as a cache for all the other computers
that need artifacts from maven. It would require you to change the repos in your builds
to refer to your archiva repos but this should be a minimal change.

You can even add your own artifacts if you need to. A typical example are
projects that do not publish to maven.

Archiva is very simple to use and configure compared to other softwares like nexus.

It's comparable to apt-proxy.

If you need more help, drop me an email off the mailing list.

Luc
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
--
Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad!

Softaddicts

unread,
Dec 23, 2012, 5:40:20 PM12/23/12
to clo...@googlegroups.com
Jochen,

Official Clojure libs including test.generative already go through a strict build process
using Hudson + test matrixes against multiple JVM implementations.

You are creating an RPM from components that are not managed through RPMs but
through an alien build process.

Do you intend to rerun the Hudson test matrix against multiple JVM implementations ?
If not, your current "build" is far from being complete compared to what
Hudson does.

Build redundancy here does not provide any added value. Most users source
the implementation from Maven or through direct downloads, Hudson must not fail
building these artifacts upfront. It already guards against corrupted artifacts.

Creating an RPM here should only be a nicer way to package all the dependencies
out from Maven and place them at the appropriate spot in a Fedora system.
Getting a proper JVM if necessary is part of that process (this is an RPM dependency).

As a Linux user I would not expect more from such a package.

Luc P.
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

Toby Crawley

unread,
Dec 23, 2012, 7:21:35 PM12/23/12
to clo...@googlegroups.com

Sean Corfield writes:

> On Sun, Dec 23, 2012 at 8:50 AM, Peter Taoussanis <ptaou...@gmail.com>wrote:
>> Also `lein swank` appears to be failing on Leiningen 2.0.0-preview10:
>> Exception in thread "main" java.lang.IllegalArgumentException: No matching
>> ctor found for class clojure.lang.Compiler$CompilerException,
>> compiling:(swank/commands/basic.clj:182:24)
>>
>
> Given that swank-clojure is deprecated, this may be the not so subtle push
> that moves everyone over to nREPL :) IIRC, the problem is that swank
> constructs that Java class explicitly and its signature has changed to
> include column number?

This has actually been fixed in swank-clojure 1.4.3, but the latest
lein-swank (1.4.4) still pulls in swank-clojure 1.4.2. Maybe it's time
to release a newer lein-swank - I'll chat with Phil about that.

--
Toby Crawley
http://immutant.org | http://torquebox.org

Jeff Dik

unread,
Dec 23, 2012, 10:07:07 PM12/23/12
to clo...@googlegroups.com
Cool.

This is also working for me with clojure 1.5.0-RC1:
https://clojars.org/org.clojars.chouser/lein-swank

Jeff

Toby Crawley

unread,
Dec 23, 2012, 10:21:37 PM12/23/12
to clo...@googlegroups.com

Jeff Dik writes:
>
> This is also working for me with clojure 1.5.0-RC1:
> https://clojars.org/org.clojars.chouser/lein-swank

The change to lein-swank to load the proper swank-clojure is already on
master[1] - is chouser's version just a release with that change?

[1]: https://github.com/technomancy/swank-clojure/commit/3446bbbe2618e5683799fe1d01e50083b3a60245

Jeff Dik

unread,
Dec 23, 2012, 11:07:39 PM12/23/12
to clo...@googlegroups.com
On Sun, Dec 23, 2012 at 10:21 PM, Toby Crawley <to...@tcrawley.org> wrote:
>
> Jeff Dik writes:
>>
>> This is also working for me with clojure 1.5.0-RC1:
>> https://clojars.org/org.clojars.chouser/lein-swank
>
> The change to lein-swank to load the proper swank-clojure is already on
> master[1] - is chouser's version just a release with that change?

No, it was pushed one day before your 1.4.3 changes :-) I think it
was just a stopgap for lein-swank not working with clojure
1.5.0-beta1.

Looking forward for a new lein-swank release,
Jeff

Toby Crawley

unread,
Dec 26, 2012, 9:34:07 AM12/26/12
to clo...@googlegroups.com
I just pushed a new lein-swank release (1.4.5)[1] that should work with
1.5.0-RC1. Let me know if you have any issues with it.

[1]: https://groups.google.com/d/topic/swank-clojure/WIrLw2NxuEs/discussion

Brandon Bloom

unread,
Jan 2, 2013, 1:45:06 AM1/2/13
to cloju...@googlegroups.com, clo...@googlegroups.com
> Please test it.

I just tried it out and was really bummed to discover that http://dev.clojure.org/jira/browse/CLJ-873 was not merged. That's the clojure.core// division symbol issue.

It's a pretty straightforward patch that fixes a real problem for ClojureScript and a few other random libraries that I work with. The discussion seems all positive, so I'm not sure why it didn't make the cut for 1.5

Other than that, it seems to be working smoothly for my projects.

Stuart Halloway

unread,
Jan 2, 2013, 7:28:28 AM1/2/13
to clo...@googlegroups.com
Changing the way Clojure is *packaged* to meet the needs of an alien build system is the tail wagging the dog. 

Clojure uses the de facto Java standard (Maven) to deal with these things.  Clojure's build depends on a number of plugins (maven-release-plugin, maven-source-plugin, maven-jar-plugin, maven-assembly-plugin, build-helper-maven-plugin, maven-antrun-plugin, and maven-compiler-plugin), and most of these dependencies have been present for several releases already, so this is not a new problem.

Whatever technique prevents those items from being downloaded from the Internet should also be considered for test.generative.  

Stu



Best Regards:

Jochen Schmitt

Stefan Kamphausen

unread,
Jan 2, 2013, 12:16:46 PM1/2/13
to cloju...@googlegroups.com, clo...@googlegroups.com
Hi,


On Saturday, December 22, 2012 5:09:07 PM UTC+1, Stuart Halloway wrote:

Please test it.

my current projects work fine with this RC.  Some even seem to be a little bit faster, but I didn't profile it thoroughly.


Kind regards,
Stefan

Andy Fingerhut

unread,
Jan 2, 2013, 1:56:38 PM1/2/13
to clo...@googlegroups.com
Stu:

Note that Clojure 1.4.0 can be built without Maven, and with no connection to the Internet, by using the command "ant" (which runs the tests) or "ant jar" (which does not run the tests).

With Clojure 1.5.0, the same is true for "ant jar", but "ant" no longer works unless you first run ./antsetup.sh, which requires Maven and pulls in the test.generative dependency, among others, if they are not already available in the local Maven repo in ~/.m2

So there is something different here with Clojure 1.5.0 since the previous release.  I'm not suggesting changing anything for 1.5.0, but the above is likely the reason that Jochen and others didn't come across this issue before now.

Andy

Andy Fingerhut

unread,
Jan 2, 2013, 2:20:17 PM1/2/13
to clojure, cloju...@googlegroups.com
On Dec 23, 2012, at 8:50 AM, Peter Taoussanis wrote:

> Were any breaking changes made between alpha3 and RC1? I haven't spent much time trying to track down causes so it's very possible I'm mistaken, but I seem to be running into some weird behavior under RC1.
>
> Specifically, seem to be having trouble with `ring.middleware.reload/wrap-reload`:
> Exception in thread "main" java.lang.IllegalArgumentException: contains? not supported on type: clojure.lang.LazySeq, compiling:(routes.clj:294:3)
> Line 294 is where the wrap-reload is applied, and this compiles fine under alpha3.


Peter:

This exception you show above is new with this commit for CLJ-932:

https://github.com/clojure/clojure/commit/3acb6ee7ec5c295ae14de861d03a5efd115a5968

http://dev.clojure.org/jira/browse/CLJ-932

It appears that somewhere in ring or other code you are using, there is a call to contains? on a lazy sequence. Before this always silently returned false, but now it throws an exception, in hopes of catching bugs in code where contains? is called on collections for which it doesn't make sense.

Andy

Peter Taoussanis

unread,
Jan 3, 2013, 12:52:54 AM1/3/13
to clo...@googlegroups.com, cloju...@googlegroups.com
Sean, Andy:

Sorry for the delay following up on this. Yes, it turns out that CLJ-932 exposes a bug in ns-tracker which is used by the standard Ring wrap-reload middleware. I'm surprised more folks haven't run into this.

There's already a pull-request from last month waiting for merging: https://github.com/weavejester/ns-tracker/pull/9

Will contact James and see if he can't get the merge done, and update the dependency Ring-side.

Cheers!

Peter Taoussanis

unread,
Jan 3, 2013, 1:23:53 AM1/3/13
to clo...@googlegroups.com, cloju...@googlegroups.com
Have just pushed a temporary fork of ns-tracker for anyone else running into the same trouble with Ring's wrap-reload: https://clojars.org/com.taoensso.forks/ns-tracker

If you're going to use this, remember to add `ns-tracker` to your Lein :exclusions.
Reply all
Reply to author
Forward
0 new messages