Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

i'm working on clojure.core/repeat reducer.

12 Answers

0 votes
by

Comment made by: jafingerhut

Jason, have you tried to build this using JDK 1.6.0? I've tried on Mac OS X 10.6.8 + Oracle/Apple JDK 1.6.0 and Ubuntu 11.10 + IBM JDK 1.6.0, and on both it compiles, but during the tests fails with a ClassNotFoundException for class jsr166y.ForkJoinTask.

It builds and tests cleanly on Ubuntu 11.10 + Oracle JDK 1.7.0 for me.

0 votes
by

Comment made by: jasonjckn

That's an issue that applies to all of core.reducers. Alan Malloy experienced it as well. I tried fixing it, but eventually just upgraded to JDK 1.7. I don't understand why it's happening.

0 votes
by

Comment made by: jasonjckn

This issue is isolated to mvn test afaik.

When I include clojure inside a leiningen project, and add jsr166y.jar to lib directory, core.reducers works fine with java 1.6.

0 votes
by

Comment made by: jafingerhut

Jason, you say it applies to all of core.reducers in your May 17, 2012 comment. I don't understand. Without your patch applied, I can run "./antsetup.sh ; ant" in a freshly-pulled Clojure git repo on either of the JDK 1.6.0 versions mentioned in my earlier comment, and do not get any errors during the tests. Are you saying perhaps that core.reducers currently has no tests that exercise the problem now, but your patch adds such tests that fail, even with no other changes to the code?

0 votes
by

Comment made by: jasonjckn

Yah that's right. Now that you mention it, my patch is the first unit test to call r/fold (the existing tests do non-parallel reductions).

0 votes
by

Comment made by: jafingerhut

With Stuart Halloway's commit to Clojure master on June 8, 2012 titled "let reducers tests work under ant", patch 0001-repeat-for-clojure.core.reducers.patch dated May 11, 2012 now runs correctly even the new unit tests requiring class jsr166y.ForkJoinTask with Oracle/Apple JDK 1.6 and Linux IBM JDK 1.6.

0 votes
by

Comment made by: jasonjckn

I'm on the contributors list. Is this patch still needed?
sorry for long long delay.

0 votes
by

Comment made by: jasonjckn

This patch should wait until http://dev.clojure.org/jira/browse/CLJ-993 is committed. I think there's a some shared code.

0 votes
by

Comment made by: gshayban

repeat is now reducible in 1.7.0

0 votes
by

Comment made by: gshayban

Can we close this ticket?

0 votes
by

Comment made by: alexandergunnarson

I think it would be nice to have this reducer included for purposes of parallelism, or else extend CollFold to clojure.lang.Repeat (which is perhaps cleaner).

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-994 (reported by jasonjckn)
Welcome to Clojure Q&A, where you can ask questions and receive answers from members of the Clojure community.
...