<!-- 
RSS generated by JIRA (4.4#649-r158309) at Mon May 20 08:37:49 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-1066/CLJ-1066.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-1066] No dependency on jsr166y</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1066</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The Clojure 1.5.0-alpha4 jars that have been deployed to maven.org seem to have been compiled against JDK6 which causes&lt;br/&gt;
an exception if one tries to use reducers/fold.&lt;/p&gt;

&lt;p&gt;&amp;#8212; snip &amp;#8212;&lt;br/&gt;
Setup:&lt;/p&gt;

&lt;p&gt;    user=&amp;gt; (require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.core.reducers :as r&amp;#93;&lt;/span&gt;)&lt;br/&gt;
    nil&lt;br/&gt;
    user=&amp;gt; (def v (vec (range 10000)))&lt;br/&gt;
    #&apos;user/v&lt;/p&gt;

&lt;p&gt;;; JDK7 + clojure 1.5.0-alpha4 from maven.org&lt;br/&gt;
;; &#8594; :dependencies [&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/clojure &amp;quot;1.5.0-alpha4&amp;quot;&amp;#93;&lt;/span&gt;] in project.clj&lt;/p&gt;

&lt;p&gt;    user=&amp;gt; (r/fold + (r/map inc v))&lt;br/&gt;
    ClassNotFoundException jsr166y.ForkJoinTask  java.net.URLClassLoader$1.run (URLClassLoader.java:366)&lt;/p&gt;

&lt;p&gt;;; JDK7 + clojure 1.5.0-alpha4 from maven.org&lt;br/&gt;
;; &#8594; :dependencies [&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/clojure &amp;quot;1.5.0-alpha4&amp;quot;&amp;#93;&lt;/span&gt;&lt;br/&gt;
;;                  &lt;span class=&quot;error&quot;&gt;&amp;#91;org.codehaus.jsr166-mirror/jsr166y &amp;quot;1.7.0&amp;quot;&amp;#93;&lt;/span&gt;]&lt;/p&gt;

&lt;p&gt;    user=&amp;gt; (r/fold + (r/map inc v))&lt;br/&gt;
    50005000&lt;/p&gt;

&lt;p&gt;;; JDK7 + clojure 1.5.0-alpha4 locally compiled (mvn install) against OpenJDK7&lt;br/&gt;
;; &#8594; :dependencies [&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/clojure &amp;quot;1.5.0-alpha4&amp;quot;&amp;#93;&lt;/span&gt;] in project.clj&lt;/p&gt;

&lt;p&gt;    user=&amp;gt; (r/fold + (r/map inc v))&lt;br/&gt;
    5000050000&lt;br/&gt;
&amp;#8212; snip &amp;#8212;&lt;/p&gt;

&lt;p&gt;It would be wonderful if this issue could be fixed before the release of 1.5.0.&lt;/p&gt;

&lt;p&gt;Have a nice day&lt;/p&gt;

&lt;p&gt;    Wolodja&lt;/p&gt;</description>
                <environment>$ java -version&lt;br/&gt;
java version &amp;quot;1.7.0_03&amp;quot;&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea7 2.1.2) (7u3-2.1.2-2)&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)&lt;br/&gt;
$ lein version&lt;br/&gt;
Leiningen 2.0.0-preview10 on Java 1.7.0_03 OpenJDK 64-Bit Server VM&lt;br/&gt;
</environment>
            <key id="15691">CLJ-1066</key>
            <summary>No dependency on jsr166y</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="stu">Stuart Halloway</assignee>
                                <reporter username="babilen">Wolodja Wentland</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Tue, 11 Sep 2012 10:21:51 -0500</created>
                <updated>Sat, 20 Oct 2012 09:53:42 -0500</updated>
                    <resolved>Sat, 20 Oct 2012 09:53:42 -0500</resolved>
                            <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                                        <due></due>
                    <votes>4</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="29427" author="tsdh" created="Wed, 12 Sep 2012 09:44:01 -0500"  >&lt;p&gt;That&apos;s really a nasty problem.  I wrote the code that makes it possible to compile clojure with either a JDK7 and native ForkJoin or an older JDK + jsr166y.  Unfortunately, if you build clojure with a JDK7, reducers&apos; fold requires a JDK7 at runtime, and if you build clojure with a JDK &amp;lt;7 + jsr166y, fold also requires jsr166y at runtime.&lt;/p&gt;

&lt;p&gt;The essential problem is that clojure is AOT-compiled to class-files and those are put into the release jars.  Ordinary clojure libraries are distributed as jar files containing clj files that are compiled when loaded.  There, the implemented approach works just fine.  For example, again your example with 1.5.0-alpha4:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;;; 1.5.0-master4 compiled with JDK6 + jsr166y running on a JDK7
user=&amp;gt; (require &apos;[clojure.core.reducers :as r])
nil
user=&amp;gt; (def v (vec (range 10000)))
#&apos;user/v
user=&amp;gt; (r/fold + (r/map inc v))
ClassNotFoundException jsr166y.ForkJoinTask  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Now load the reducers.clj source code again, so that it
;; picks the right ForkJoin-impl for the current platform
(load-file &quot;/home/horn/Repos/clj/clojure/src/clj/clojure/core/reducers.clj&quot;)
nil
user=&amp;gt; (r/fold + (r/map inc v))
50005000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So IMO, the best thing we can do is to omit AOT-compilation for reducers but to include only its clj file so that it&apos;ll be compiled automatically on the platform it eventually runs.&lt;/p&gt;</comment>
                    <comment id="29428" author="tsdh" created="Wed, 12 Sep 2012 11:55:48 -0500"  >&lt;p&gt;This patch removes the clojure.core.reducers namespace from the namespaces to be AOT compiled.  So now this namespace will be JIT-compiled when being required, and at that point either the JDK7 ForkJoin classes or the jsr166y classes need to be there.&lt;/p&gt;</comment>
                    <comment id="29514" author="stu" created="Fri, 21 Sep 2012 13:31:25 -0500"  >&lt;p&gt;Rich: what is the right approach here?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11493" name="0001-Don-t-AOT-compile-clojure.core.reducers.patch" size="929" author="tsdh" created="Wed, 12 Sep 2012 11:55:48 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>