<!--
RSS generated by JIRA (4.4#649-r158309) at Tue May 21 18:48:37 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/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+CLJ+AND+resolution+%3D+Unresolved+AND+assignee+is+EMPTY+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+CLJ+AND+resolution+%3D+Unresolved+AND+assignee+is+EMPTY+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="252" total="252"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJ-21] GC Issue 17: arity checking during compilation</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-21</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by richhickey, Dec 17, 2008
Use available metadata to check calls when possible&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13418">CLJ-21</key>
            <summary>GC Issue 17: arity checking during compilation</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 22:59:00 -0500</created>
                <updated>Tue, 24 Aug 2010 14:44:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22519" author="importer" created="Tue, 24 Aug 2010 14:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/21&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/21&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-47] GC Issue 43: Dead code in generated bytecode</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-47</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by Levente.Santha, Jan 11, 2009
The bug was described in detail in &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; thread: http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/
&lt;/span&gt;group/clojure/browse_thread/thread/81ba15d7e9130441

For clojure.core$last__2954.invoke the correct bytecode would be (notice 
the removed &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt;    65&quot;&lt;/span&gt; after &lt;span class=&quot;code-quote&quot;&gt;&quot;41:  &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt;    0&quot;&lt;/span&gt;):

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; java.lang.&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; invoke(java.lang.&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)   &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; 
java.lang.Exception;
  Code:
   0:   getstatic       #22; &lt;span class=&quot;code-comment&quot;&gt;//Field const__0:Lclojure/lang/Var;
&lt;/span&gt;   3:   invokevirtual   #37; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Var.get:()Ljava/lang/
&lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   6:   checkcast       #39; &lt;span class=&quot;code-comment&quot;&gt;//class clojure/lang/IFn
&lt;/span&gt;   9:   aload_1
   10:  invokeinterface #41,  2; &lt;span class=&quot;code-comment&quot;&gt;//InterfaceMethod clojure/lang/IFn.invoke:
&lt;/span&gt;(Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   15:  dup
   16:  ifnull  44
   19:  getstatic       #47; &lt;span class=&quot;code-comment&quot;&gt;//Field java/lang/&lt;span class=&quot;code-object&quot;&gt;Boolean&lt;/span&gt;.FALSE:Ljava/lang/
&lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;Boolean&lt;/span&gt;;
   22:  if_acmpeq       45
   25:  getstatic       #22; &lt;span class=&quot;code-comment&quot;&gt;//Field const__0:Lclojure/lang/Var;
&lt;/span&gt;   28:  invokevirtual   #37; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Var.get:()Ljava/lang/
&lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   31:  checkcast       #39; &lt;span class=&quot;code-comment&quot;&gt;//class clojure/lang/IFn
&lt;/span&gt;   34:  aload_1
   35:  invokeinterface #41,  2; &lt;span class=&quot;code-comment&quot;&gt;//InterfaceMethod clojure/lang/IFn.invoke:
&lt;/span&gt;(Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   40:  astore_1
   41:  &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt;    0
   44:  pop
   45:  getstatic       #26; &lt;span class=&quot;code-comment&quot;&gt;//Field const__1:Lclojure/lang/Var;
&lt;/span&gt;   48:  invokevirtual   #37; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Var.get:()Ljava/lang/
&lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   51:  checkcast       #39; &lt;span class=&quot;code-comment&quot;&gt;//class clojure/lang/IFn
&lt;/span&gt;   54:  aload_1
   55:  aconst_null
   56:  astore_1
   57:  invokeinterface #41,  2; &lt;span class=&quot;code-comment&quot;&gt;//InterfaceMethod clojure/lang/IFn.invoke:
&lt;/span&gt;(Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
   62:  areturn

Our JIT reported incorrect stack size along the basic block introduced by 
the unneeded &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt;.
The bug was present in SVN rev 1205.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13444">CLJ-47</key>
            <summary>GC Issue 43: Dead code in generated bytecode</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 15:18:00 -0500</created>
                <updated>Fri, 8 Oct 2010 10:21:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22584" author="importer" created="Fri, 8 Oct 2010 10:21:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/47&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/47&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22585" author="importer" created="Fri, 8 Oct 2010 10:21:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="22586" author="importer" created="Fri, 8 Oct 2010 10:21:00 -0500"  >&lt;p&gt;aredington said: This appears to still be a problem with the generated bytecode in 1.3.0. Examining the bytecode for last, the problem has moved to invokeStatic:&lt;/p&gt;

&lt;p&gt;&amp;lt;pre&amp;gt;&lt;br/&gt;
public static java.lang.Object invokeStatic(java.lang.Object)   throws java.lang.Exception;&lt;br/&gt;
  Code:&lt;br/&gt;
   0: aload_0&lt;br/&gt;
   1: invokestatic #50; //Method clojure/core$next.invokeStatic:(Ljava/lang/Object;)Ljava/lang/Object;&lt;br/&gt;
   4: dup&lt;br/&gt;
   5: ifnull 25&lt;br/&gt;
   8: getstatic #56; //Field java/lang/Boolean.FALSE:Ljava/lang/Boolean;&lt;br/&gt;
   11: if_acmpeq 26&lt;br/&gt;
   14: aload_0&lt;br/&gt;
   15: invokestatic #50; //Method clojure/core$next.invokeStatic:(Ljava/lang/Object;)Ljava/lang/Object;&lt;br/&gt;
   18: astore_0&lt;br/&gt;
   19: goto 0&lt;br/&gt;
   22: goto 30&lt;br/&gt;
   25: pop&lt;br/&gt;
   26: aload_0&lt;br/&gt;
   27: invokestatic #59; //Method clojure/core$first.invokeStatic:(Ljava/lang/Object;)Ljava/lang/Object;&lt;br/&gt;
   30: areturn&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;

&lt;p&gt;Line number 22 is an unreachable goto given the prior goto on line 19.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-64] GC  Issue 61:    Make Clojure datatype Java Serializable</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-64</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by straszheimjeffrey, Jan 30, 2009

I mentioned &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; on Google Groups.

Currently the core Clojure datatypes are not Java Serializable.  This means
that they cannot easily be streamed as binary objects.  Also, it will be
difficult to use them with certain Java features like RMI.

Comment 1 by rob.nikander, Mar 11, 2009

I voted &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; because I&apos;m experimenting with using Clojure &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; web apps.  Tomcat barfs trying to serialize 
objects in the session, like clojure.lang.Cons.

Comment 2 by cjkent, Mar 25, 2009

I&apos;m experimenting with Clojure and Wicket.  Any Wicket page classes containing maps
that use Keywords as keys can&apos;t be saved to the session because Keyword isn&apos;t
serializable.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13461">CLJ-64</key>
            <summary>GC  Issue 61:    Make Clojure datatype Java Serializable</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 23:38:00 -0500</created>
                <updated>Tue, 24 Aug 2010 14:44:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22625" author="importer" created="Tue, 24 Aug 2010 14:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/64&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/64&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22626" author="importer" created="Tue, 24 Aug 2010 14:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="22627" author="importer" created="Tue, 24 Aug 2010 14:44:00 -0500"  >&lt;p&gt;cemerick said: A patch has been submitted (via ticket #174) to add Serializable support to c.l.Keyword.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-77] GC Issue 74:    Clojure compiler emits too-large classfiles (results in ClassFormatError)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-77</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by cemer...@snowtide.com, Feb 10, 2009

The jvm has certain implementation limits around the maximum size of
classfiles, literal strings, method length, etc; however, in certain
circumstances, the Clojure compiler can currently emit classfiles that
violate some of those limitations, causing an error later when the
classfile is loaded.

While test coverage would necessarily detect &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; sort of problem on a
project-by-project basis when one&apos;s tests attempted to load a project&apos;s
classfiles, it seems like Clojure should &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; the following to ensure failure
as quickly as possible:

- &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; an exception immediately &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; compiling a lib, it is detected
that the resulting classfile(s) would violate any classfile implementation
limits.  Ideally, the exception&apos;s message would detail what file and on
which line number the offending form is (e.g. &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; a method&apos;s bytecode would
be too &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;).  I can imagine that doing &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; may not be straightforward; a
reasonable stop-gap would be &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the compiler to immediately attempt to
load the generated classfile in order to ensure up-front failure.

- emit a warning &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; any clojure form is read that would, upon being
compiled, require violating any of the classfile implementation limits; I
suspect that *most* people looking to generate classfiles would be doing so
in a &lt;span class=&quot;code-quote&quot;&gt;&quot;build&quot;&lt;/span&gt; environment (rather than loading some code, tinkering, and
then using clojure.core/compile), but &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; those that aren&apos;t, I can imagine
there being a good deal of frustration around seeing that loading and using
some code successfully would eventually produce unusable classfiles.

I&apos;ve appended a sample stack trace emitted by java when it attempted to
load a too-&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; method implementation (which was produced by embedding a
large list literal in a compiled lib).

Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.ClassFormatError: Invalid method  
Code length 105496 in class file com/foo/MyClass__init
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.defineClass1(Native Method)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.defineClass(&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.java:675)
         at  
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.loadClass(&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.java:316)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
288)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.loadClass(&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.java:251)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.loadClassInternal(&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.java:
374)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;.forName0(Native Method)
         at java.lang.&lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;.forName(&lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;.java:247)
         at clojure.lang.RT.loadClassForName(RT.java:1512)
         at clojure.lang.RT.load(RT.java:394)
         at clojure.lang.RT.load(RT.java:374)
         at clojure.core$load__4911$fn__4913.invoke(core.clj:3623)
         at clojure.core$load__4911.doInvoke(core.clj:3622)
         at clojure.lang.RestFn.invoke(RestFn.java:413)
         at clojure.core$load_one__4863.invoke(core.clj:3467)
         at clojure.core$compile__4918$fn__4920.invoke(core.clj:3633)
         at clojure.core$compile__4918.invoke(core.clj:3632)
         at clojure.lang.Var.invoke(Var.java:336)
         at clojure.lang.Compile.main(Compile.java:56)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13474">CLJ-77</key>
            <summary>GC Issue 74:    Clojure compiler emits too-large classfiles (results in ClassFormatError)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 16:16:00 -0500</created>
                <updated>Tue, 24 Aug 2010 06:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22678" author="importer" created="Tue, 24 Aug 2010 06:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/77&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/77&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22679" author="importer" created="Tue, 24 Aug 2010 06:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-115] GC  Issue 111: Enable naming an array parameter for areduce</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-115</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by bo...@boriska.com, Apr 28, 2009

Currently there is no way to access anonymous array parameter of areduce.

Consider:

(areduce (.. &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt; getProperties values toArray) 
     i r 0 (some_expression))
some_expression has no way to access the array.

Per Rich:
--------------------
Yes, areduce would be nicer &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; it looked like a binding set:

(areduce [aname anarray, ret init] expr)
(areduce [aname anarray, ret init, start-idx  start-n] expr)
(areduce [aname anarray, ret init, start-idx  start-n, end-idx end-n]
expr) 
--------------------

This was discussed here:
http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/group/clojure/tree/browse_frm/thread/40597a8ac322bc37/8cf6b17328ea7e8b?rnum=1&amp;amp;_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fthread%2F40597a8ac322bc37%2F8cf6b17328ea7e8b%3Ftvc%3D1%26pli%3D1%26#doc_9ea7e3c5d500ed3c&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13512">CLJ-115</key>
            <summary>GC  Issue 111: Enable naming an array parameter for areduce</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 16:11:00 -0500</created>
                <updated>Tue, 24 Aug 2010 05:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22803" author="importer" created="Tue, 24 Aug 2010 05:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/115&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/115&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22804" author="importer" created="Tue, 24 Aug 2010 05:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-126] abstract superclass with non-public accessibility</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-126</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following code works in Java 6 but not in Java 5:&lt;/p&gt;

&lt;p&gt;(def Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
user=&amp;gt; (def s (new StringBuilder &quot;aaa&quot;))&lt;br/&gt;
#&apos;user/s&lt;br/&gt;
user=&amp;gt; (. s setCharAt (int 0) (char \a))&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: setCharAt in this context&lt;/p&gt;

&lt;p&gt;This was discussed on the Clojure mailing list and Stephen C. Gillardi came up with the following conclusion:&lt;/p&gt;

&lt;p&gt;_StringBuilder extends AbstractStringBuilder (though the JavaDoc docs lie and say it extends Object). AbstractStringBuilder has default accessibility (not public, protected, or private) which makes the class inaccessible to code outside the java.lang package. In both Java SE 5 and Java SE 6, StringBuilder does not contain a .setCharAt method definition. It relies on the inherited public method in AbstractStringBuilder. (I downloaded the source code for both versions from Sun to check.)&lt;/p&gt;

&lt;p&gt;In Java SE 5, when Clojure checks whether or not .setCharAt on StringBuilder is public, it finds that it&apos;s a public method of a non-public base class and throws the exception you saw. (It looks like you&apos;re using a version of Clojure older than 18 May 2009 (Clojure svn r1371). Versions later than that print the more detailed message I saw.)&lt;/p&gt;

&lt;p&gt;In Java SE 6, Clojure&apos;s checks for accessibility of this method succeed and the method call works.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure whether or not Clojure could be modified to make this method call work in Java 5. Google searches turn up discussion that this pattern of using an undocumented abstract superclass with non-public accessibility is not common in the JDK._ &lt;/p&gt;

&lt;p&gt;This ticket is being filed in the event that Clojure can handle these types of situations somehow.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13523">CLJ-126</key>
            <summary>abstract superclass with non-public accessibility</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 17:57:00 -0500</created>
                <updated>Tue, 24 Aug 2010 04:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22882" author="importer" created="Tue, 24 Aug 2010 04:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/126&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/126&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22883" author="importer" created="Tue, 24 Aug 2010 04:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="22884" author="importer" created="Tue, 24 Aug 2010 04:45:00 -0500"  >&lt;p&gt;hiredman said: &lt;b&gt;Related&lt;/b&gt; association with ticket #259 was added&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-127] DynamicClassLoader&apos;s call to ClassLoader.getSystemClassLoader is prohibited in some environments</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-127</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently, clojure.lang.DynamicClassLoader&apos;s constructor has the&lt;br/&gt;
following call to super():&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;super&lt;/span&gt;(EMPTY_URLS,
      (&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.currentThread().getContextClassLoader() == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; ||
        &lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.currentThread().getContextClassLoader() == &lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.getSystemClassLoader()) ?
          &lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.class.getClassLoader() : &lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.currentThread().getContextClassLoader());&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That call to ClassLoader.getSystemClassLoader() is forbidden by Google&lt;br/&gt;
AppEngine&apos;s security policies. That restricts you from being able to&lt;br/&gt;
load any resources from the classpath that haven&apos;t been AOT-compiled.&lt;br/&gt;
I&apos;ve verified that just removing that removing the &quot; ||&lt;br/&gt;
Thread.currentThread().getContextClassLoader() ==&lt;br/&gt;
ClassLoader.getSystemClassLoader()&quot; does in fact result in something&lt;br/&gt;
that works in GAE (as far as my needs go). Unfortunately, I&apos;m not sure&lt;br/&gt;
whether that breaks anything, which, presumably, it does.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13524">CLJ-127</key>
            <summary>DynamicClassLoader&apos;s call to ClassLoader.getSystemClassLoader is prohibited in some environments</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Jun 2009 06:54:00 -0500</created>
                <updated>Tue, 24 Aug 2010 03:45:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22885" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/127&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/127&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22886" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;jmcconnell said: I&apos;d be happy to take this up with the GAE folks if it winds up looking like this is something they should probably allow or if we need any further information from them on their policies.&lt;/p&gt;</comment>
                    <comment id="22887" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#127, #128, #129, #130)&lt;/p&gt;</comment>
                    <comment id="22888" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;mikehinchey said: GAE made some changes a few weeks ago, maybe changed this because I&apos;m able to load from .clj files now (not the servlet, of course, which must be gen-class).&lt;/p&gt;</comment>
                    <comment id="22889" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)&lt;/p&gt;</comment>
                    <comment id="22890" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;mattrevelle said: J. McConnell, was this issue resolved by a change in GAE policy?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-150] Doc for array-map should mention its characteristics/caveats</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-150</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Doc for array-map should mention its characteristics: preserves order of keys, linear O&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/thumbs_down.gif&quot; height=&quot;19&quot; width=&quot;19&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; search so appropriate only for small maps, operations on array-maps return hash-maps.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13547">CLJ-150</key>
            <summary>Doc for array-map should mention its characteristics/caveats</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Jul 2009 15:11:00 -0500</created>
                <updated>Tue, 24 Aug 2010 04:54:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22998" author="importer" created="Tue, 24 Aug 2010 04:54:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/150&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/150&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-153] Suggest adding set-precision! API to accompany with-precision</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-153</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Ticket #137 makes &lt;tt&gt;&lt;b&gt;math-context&lt;/b&gt;&amp;lt;/code&amp;gt; settable at the REPL. However, &amp;lt;code&amp;gt;&lt;b&gt;math-context&lt;/b&gt;&lt;/tt&gt; is not a public name in Clojure.&lt;/p&gt;

&lt;p&gt;The related public function is &lt;tt&gt;with-precision&amp;lt;/code&amp;gt; which works by pushing a new binding for &amp;lt;code&amp;gt;&lt;b&gt;math-context&lt;/b&gt;&amp;lt;/code&amp;gt;. This ticket suggests adding &amp;lt;code&amp;gt;set-precision!&amp;lt;/code&amp;gt; to Clojure&apos;s public API. Its effect would be the same as &amp;lt;code&amp;gt;with-precision&amp;lt;/code&amp;gt;, but accomplished by using &amp;lt;code&amp;gt;set!&amp;lt;/code&amp;gt; on the current &amp;lt;code&amp;gt;&lt;b&gt;math-context&lt;/b&gt;&lt;/tt&gt; binding rather than by pushing a new binding.&lt;/p&gt;

&lt;p&gt;Chouser suggests that we also add a doc string for &lt;tt&gt;&lt;b&gt;math-context&lt;/b&gt;&amp;lt;/code&amp;gt; noting that it is private and pointing the user to &amp;lt;code&amp;gt;with-precision&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;set-precision!&lt;/tt&gt;. I agree.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13550">CLJ-153</key>
            <summary>Suggest adding set-precision! API to accompany with-precision</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 Jul 2009 19:58:00 -0500</created>
                <updated>Tue, 24 Aug 2010 00:55:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23012" author="importer" created="Tue, 24 Aug 2010 00:55:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/153&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/153&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-140] Single :tag for type hints conflates value&apos;s type with type of return value from an invoke</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-140</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The value of a Var can be operated on directly, or, if it is a fn, it can be invoked and the resulting value operated on.  :tag metadata on a Var is used to provide a type hint to the compiler to avoid reflection.  Having a single metadata key for this two distinct uses makes it possible (even easy, if unlikely) to create a situation where type-hinting the value causes a ClassCastException on an operation on the invocation return value, or the reverse.  The only obvious solution is two use different keys for the two uses.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13537">CLJ-140</key>
            <summary>Single :tag for type hints conflates value&apos;s type with type of return value from an invoke</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 Jul 2009 21:55:00 -0500</created>
                <updated>Tue, 24 Aug 2010 03:51:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22956" author="importer" created="Tue, 24 Aug 2010 03:51:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/140&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/140&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-213] Invariants and the STM</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-213</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(ticket requested here &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/119311e89fa46806/4903ce25ff6deaa6#4903ce25ff6deaa6&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/119311e89fa46806/4903ce25ff6deaa6#4903ce25ff6deaa6&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The general idea is to declare invariants inside a transaction and, when at commit time an invariant doesn&apos;t hold anymore, the transaction retries.&lt;br/&gt;
So it can both act as a kind of soft ensure or to specify actions that &quot;partially commute&quot;.&lt;br/&gt;
Thus it would enable coarser refs.&lt;/p&gt;

&lt;p&gt;See the attached file for quick prototype.&lt;/p&gt;

&lt;p&gt;User code would looks like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(invariant (@world :key))
(commute world update-in [:key] val-transform-fn)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This means the commute will occur only if (@world :key) returns the same value in-transaction and at commit point.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13610">CLJ-213</key>
            <summary>Invariants and the STM</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Dec 2009 06:29:00 -0600</created>
                <updated>Tue, 24 Aug 2010 07:23:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23280" author="importer" created="Tue, 24 Aug 2010 07:23:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/213&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/213&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
invariants.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/dd4kUS3MWr3QvMeJe5aVNr/download/dd4kUS3MWr3QvMeJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/dd4kUS3MWr3QvMeJe5aVNr/download/dd4kUS3MWr3QvMeJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-233] better error reporting of nonexistent var</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-233</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;simple improvement to error message when referencing a var that doesn&apos;t exist.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13630">CLJ-233</key>
            <summary>better error reporting of nonexistent var</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Dec 2009 11:08:00 -0600</created>
                <updated>Wed, 29 Sep 2010 05:29:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23363" author="importer" created="Wed, 29 Sep 2010 05:29:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/233&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/233&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23364" author="importer" created="Wed, 29 Sep 2010 05:29:00 -0500"  >&lt;p&gt;chouser@n01se.net said: Stuart, I don&apos;t see a patch attached.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-252] Support typed non-primitive fields in deftype</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-252</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Right now hints are accepted but not used as field type.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13649">CLJ-252</key>
            <summary>Support typed non-primitive fields in deftype</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jan 2010 05:52:00 -0600</created>
                <updated>Tue, 24 Aug 2010 06:07:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23419" author="importer" created="Tue, 24 Aug 2010 06:07:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/252&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/252&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-277] Making clojure.xml/emit a little friendler to xml consumers</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-277</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently, clojure.xml/emit breaks the eBay api, because emit adds whitespace before and after :contents. This trivial patch fixes it for me:&lt;br/&gt;
&lt;a href=&quot;http://github.com/tjg/clojure/commit/bbff079d26e627c655b847319a58d76b8b3cec7c&quot;&gt;http://github.com/tjg/clojure/commit/bbff079d26e627c655b847319a58d76b8b3cec7c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Dunno whether there&apos;s a good reason emit works that way, or if I&apos;m missing something obvious.)&lt;/p&gt;

&lt;p&gt;I realize that emit&apos;s behavior conforms to the XML spec and it&apos;s probably eBay at fault here. But I can nevertheless see this whitespace causing problems.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13674">CLJ-277</key>
            <summary>Making clojure.xml/emit a little friendler to xml consumers</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Mar 2010 17:58:00 -0600</created>
                <updated>Tue, 24 Aug 2010 09:41:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23539" author="importer" created="Tue, 24 Aug 2010 09:41:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/277&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/277&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23540" author="importer" created="Tue, 24 Aug 2010 09:41:00 -0500"  >&lt;p&gt;bpsm said: I&apos;ve attached a patch to #410, which also fixes this issue. (In fact, it turns out that it&apos;s the same patch tlj previously attached here.)&lt;/p&gt;</comment>
                    <comment id="23541" author="importer" created="Tue, 24 Aug 2010 09:41:00 -0500"  >&lt;p&gt;stu said: &lt;b&gt;Duplicated&lt;/b&gt; association with ticket #410 was added&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-319] TransactionalHashMap bug</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-319</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;TransactionalHashMap computation of the bin is buggy. The implementation doesn&apos;t unset the sign bit before using it in accessing the bin array which in some cases cause an ArrayOutOfBoundException to be thrown.&lt;/p&gt;

&lt;p&gt;As Rich Hickey has pointed out, this is an unsupported experimental Class and won&apos;t be fixed unless I provided a patch, so attached is the patch file.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13716">CLJ-319</key>
            <summary>TransactionalHashMap bug</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Apr 2010 18:58:00 -0500</created>
                <updated>Fri, 1 Oct 2010 16:06:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23762" author="importer" created="Fri, 1 Oct 2010 16:06:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/319&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/319&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
TransactionalHashMap.java.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/cuuZnsuuWr36H0eJe5dVir/download/cuuZnsuuWr36H0eJe5dVir&quot;&gt;https://www.assembla.com/spaces/clojure/documents/cuuZnsuuWr36H0eJe5dVir/download/cuuZnsuuWr36H0eJe5dVir&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23763" author="importer" created="Fri, 1 Oct 2010 16:06:00 -0500"  >&lt;p&gt;megabyte2021 said: [&lt;a href=&quot;file:cuuZnsuuWr36H0eJe5dVir&quot;&gt;file:cuuZnsuuWr36H0eJe5dVir&lt;/a&gt;]: The patch file&lt;/p&gt;</comment>
                    <comment id="23764" author="importer" created="Fri, 1 Oct 2010 16:06:00 -0500"  >&lt;p&gt;stu said: Please add a test case.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-434] Additional copy methods for URLs in clojure.java.io</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-434</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The copy method in clojure.java.io doesn&apos;t handle java.net.URL as input.&lt;br/&gt;
The necessary methods can be found in the mailing list post:&lt;br/&gt;
[&lt;span class=&quot;error&quot;&gt;&amp;#91;url:http://groups.google.com/group/clojure/browse_thread/thread/24a105b12466a8e8&amp;#93;&lt;/span&gt;]&lt;/p&gt;</description>
                <environment></environment>
            <key id="13831">CLJ-434</key>
            <summary>Additional copy methods for URLs in clojure.java.io</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Sep 2010 07:32:00 -0500</created>
                <updated>Fri, 10 Sep 2010 07:32:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="24226" author="importer" created="Fri, 10 Sep 2010 07:32:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/434&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/434&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-459] RFE: modify description of &quot;assoc&quot;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-459</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The documentation for &quot;assoc&quot; in clojure.core should probably &lt;br/&gt;
include&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(assoc vector index val)
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
and

&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;(assoc vector index val &amp;amp; ivs)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;in the usage line.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13856">CLJ-459</key>
            <summary>RFE: modify description of &quot;assoc&quot;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Oct 2010 16:55:00 -0500</created>
                <updated>Thu, 14 Oct 2010 16:55:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="24307" author="importer" created="Thu, 14 Oct 2010 16:55:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/459&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/459&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-148] Poor reporting of symbol conflicts when using (ns)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-148</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I have a module that includes pprint and my own utils.&lt;/p&gt;

&lt;p&gt;When com.howard.lewisship.cascade.dom/write was changed from private to public I get the following error:&lt;/p&gt;

&lt;p&gt;java.lang.IllegalStateException: write already refers to: #&apos;clojure.contrib.pprint/write in namespace: com.howardlewisship.cascade.test-views (test_views.clj:0)&lt;/p&gt;

&lt;p&gt;(ns com.howardlewisship.cascade.test-views ; line 15&lt;br/&gt;
  (:use&lt;br/&gt;
   (clojure.contrib test-is pprint duck-streams)&lt;br/&gt;
   (app1 views fragments)&lt;br/&gt;
   (com.howardlewisship.cascade config dom view-manager)&lt;br/&gt;
   com.howardlewisship.cascade.internal.utils))&lt;/p&gt;

&lt;p&gt;That line number is wrong but better yet, identifying the true conflict (com.howard.lewisship.cascade.dom/write) would be even more important.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13545">CLJ-148</key>
            <summary>Poor reporting of symbol conflicts when using (ns)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Jul 2009 00:08:00 -0500</created>
                <updated>Tue, 28 Jun 2011 18:42:50 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22990" author="importer" created="Tue, 24 Aug 2010 03:54:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/148&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/148&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22991" author="importer" created="Tue, 24 Aug 2010 03:54:00 -0500"  >&lt;p&gt;scgilardi said: It&apos;s saying that the symbol com.howardlewisship.cascade.test-views/write already resolves to #&#65533;&#65533;&#65533;clojure.contrib.pprint/write, so you can&apos;t def a new write in com.howardlewisship.cascade.test-views.&lt;/p&gt;

&lt;p&gt;What do you propose for an alternate wording of the error message here?&lt;/p&gt;</comment>
                    <comment id="26430" author="rosejn" created="Thu, 12 May 2011 09:49:03 -0500"  >&lt;p&gt;I think the issue is that only one side of the conflict is reported in the error, so if you get this kind of error in the middle of a large project it can be hard to figure out which namespace is conflicting.  Take a toy example:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (ns foo)&lt;br/&gt;
foo=&amp;gt; (def foobar 42)&lt;br/&gt;
foo=&amp;gt; (ns bar)&lt;br/&gt;
bar=&amp;gt; (def foobar 0)&lt;br/&gt;
bar=&amp;gt; (ns problem)&lt;br/&gt;
problem=&amp;gt; (refer &apos;foo)&lt;br/&gt;
problem=&amp;gt; (refer &apos;bar)&lt;br/&gt;
java.lang.IllegalStateException: foobar already refers to: #&apos;foo/foobar in namespace: problem (NO_SOURCE_FILE:0)&lt;/p&gt;

&lt;p&gt;In this case it would be best if the error said something like:&lt;/p&gt;

&lt;p&gt;&quot;Conflict referring to #&apos;bar/foobar in #&amp;lt;Namespace problem&amp;gt; because foobar already refers to: #&apos;foo/foobar.&quot;&lt;/p&gt;

&lt;p&gt;This way the error message clearly identifies the location of the conflict, and the locations of the two conflicting vars.&lt;/p&gt;

&lt;p&gt;Hopefully this helps clarify.  I think I see where to fix it in warnOrFailOnReplace on line 88 of src/jvm/clojure/lang/Namespace.java, and this reminds me I need to send in a CA so I can pitch in next time...&lt;/p&gt;</comment>
                    <comment id="26539" author="aaron" created="Tue, 28 Jun 2011 18:42:50 -0500"  >&lt;p&gt;It looks like the true conflict is in test-views, not in dom. A small example of the line number breakage showing the problem on master (1.3) would be very helpful.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-272] load/ns/require/use overhaul</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-272</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Creating this ticket to describe various things people have wanted to change about how ns works:&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Minimalneeds&quot;&gt;&lt;/a&gt;Minimal needs  &lt;/h2&gt;

&lt;ol&gt;
	&lt;li&gt;there should be a primitive level of loading (presumably &lt;tt&gt;load&lt;/tt&gt;) that just loads without question.&lt;/li&gt;
	&lt;li&gt;the api should be unified across the ns and direct forms. No more keywords or quoting! So &lt;tt&gt;(use foo)&amp;lt;/code&amp;gt; not &amp;lt;code&amp;gt;(use &apos;foo)&amp;lt;/code&amp;gt;. This makes &amp;lt;code&amp;gt;use&amp;lt;/code&amp;gt; et al macros, so there should also be new fn versions (maybe &amp;lt;code&amp;gt;use*&lt;/tt&gt;).&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;&lt;a name=&quot;Otherpossibilitiestodiscuss.&quot;&gt;&lt;/a&gt;Other possibilities to discuss.&lt;/h2&gt;

&lt;ol&gt;
	&lt;li&gt;Feature addressing the {{:like&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;:clone&amp;lt;/code&amp;gt; ideas from &lt;a href=&quot;http://onclojure.com/2010/02/17/managing-namespaces/&quot;&gt;http://onclojure.com/2010/02/17/managing-namespaces/&lt;/a&gt;. I think I would prefer a single new option &amp;lt;code&amp;gt;:clone&amp;lt;/code&amp;gt; which allows &amp;lt;code&amp;gt;:only&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;:exclude}} features as subspecifiers.&lt;/li&gt;
	&lt;li&gt;Convenience fn to unmap all names in a namespace?&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
            <key id="13669">CLJ-272</key>
            <summary>load/ns/require/use overhaul</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Feb 2010 03:47:00 -0600</created>
                <updated>Tue, 28 Feb 2012 03:56:11 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="23522" author="importer" created="Tue, 24 Aug 2010 09:27:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/272&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/272&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23523" author="importer" created="Tue, 24 Aug 2010 09:27:00 -0500"  >&lt;p&gt;stu said: Suggestions from Volkan Yazici:&lt;/p&gt;

&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I saw your &quot;load/ns/require/use overhaul&quot; ticket&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; and would like to&lt;br/&gt;
ask for a few extra overhaulings. I have a project called retop, and&lt;br/&gt;
here is its file hiearachy:&lt;/p&gt;

&lt;p&gt; tr/edu/bilkent/cs/retop.clj&lt;br/&gt;
 tr/edu/bilkent/cs/retop/km.clj&lt;br/&gt;
 tr/edu/bilkent/cs/retop/graph.clj&lt;br/&gt;
 tr/edu/bilkent/cs/retop/main.clj&lt;br/&gt;
 tr/edu/bilkent/cs/retop/util.clj&lt;/p&gt;

&lt;p&gt;In retop.clj, I have below ns definition.&lt;/p&gt;

&lt;p&gt; (ns tr.edu.bilkent.cs.retop&lt;br/&gt;
   (:gen-class)&lt;br/&gt;
   (:import&lt;br/&gt;
    (com.sun.jna&lt;br/&gt;
     Function&lt;br/&gt;
     Pointer)&lt;br/&gt;
    (com.sun.jna.ptr&lt;br/&gt;
     IntByReference)&lt;br/&gt;
    (tr.edu.bilkent.cs.patoh&lt;br/&gt;
     HyperGraph&lt;br/&gt;
     HyperGraphException&lt;br/&gt;
     Parititoning&lt;br/&gt;
     ParititoningParameters))&lt;br/&gt;
   (:load&lt;br/&gt;
    &quot;retop/util&quot;&lt;br/&gt;
    &quot;retop/km&quot;&lt;br/&gt;
    &quot;retop/graph&quot;&lt;br/&gt;
    &quot;retop/main&quot;))&lt;/p&gt;

&lt;p&gt;And in every .clj file in retop/ directory I have below in-ns in the&lt;br/&gt;
very first line.&lt;/p&gt;

&lt;p&gt; (in-ns &apos;tr.edu.bilkent.cs.retop)&lt;/p&gt;

&lt;p&gt;The problems with the ns decleration are:&lt;/p&gt;

&lt;p&gt;1) Most of the :import&apos;s in retop.clj only belong to a single .clj file.&lt;br/&gt;
  For instance,&lt;/p&gt;

&lt;p&gt;    (tr.edu.bilkent.cs.patoh&lt;br/&gt;
     HyperGraph&lt;br/&gt;
     HyperGraphException&lt;br/&gt;
     Parititoning&lt;br/&gt;
     ParititoningParameters)&lt;/p&gt;

&lt;p&gt;  imports are only used by graph.clj. Yep, I can add an (import ...)&lt;br/&gt;
  line just after the (in-ns ...), but wouldn&apos;t it be better if I can&lt;br/&gt;
  specify that in (in-ns ...) form?&lt;/p&gt;

&lt;p&gt;2) See (:load ...) clause in (ns ...) form. There are lots of&lt;br/&gt;
  unnecessary directory prefixes. I&apos;d be prefer something ala Common&lt;br/&gt;
  Lisp&apos;s defpackage:&lt;/p&gt;

&lt;p&gt;    (:load&lt;br/&gt;
     &quot;packages&quot;   ; packages.clj&lt;br/&gt;
     (&quot;retop&quot;&lt;br/&gt;
      &quot;util&quot;      ; retop/util.clj&lt;br/&gt;
      &quot;km&quot;        ; retop/km.clj&lt;br/&gt;
      &quot;graph&quot;     ; retop/graph.clj&lt;br/&gt;
      (&quot;graph&quot;&lt;br/&gt;
       &quot;foo&quot;      ; retop/graph/foo.clj&lt;br/&gt;
       &quot;bar)      ; retop/graph/bar.clj&lt;br/&gt;
      &quot;main&quot;))    ; retop/main.clj&lt;/p&gt;

&lt;p&gt;  Also, being able to use wildcards would be awesome.&lt;/p&gt;

&lt;p&gt;3) There are inconsistencies between macros and functions. For instance,&lt;br/&gt;
  consider:&lt;/p&gt;

&lt;p&gt;    (ns foo.bar.baz (:use mov))&lt;br/&gt;
    (in-ns &apos;foo.bar.baz)&lt;br/&gt;
    (use &apos;mov)&lt;/p&gt;

&lt;p&gt;  I&apos;d like to get rid of quotations in both cases.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure if I&apos;m using the right tools and doing the right approach&lt;br/&gt;
for such a project. But if you agree with the above overhauling&lt;br/&gt;
requirements, I&apos;d like to see them appear in the same assembla ticket as&lt;br/&gt;
well.&lt;/p&gt;</comment>
                    <comment id="23524" author="importer" created="Tue, 24 Aug 2010 09:27:00 -0500"  >&lt;p&gt;stuart.sierra said: My requests:&lt;/p&gt;

&lt;p&gt;1. If writing macros that do not evaluate their arguments, provide function versions that do evaluate their arguments.&lt;/p&gt;

&lt;p&gt;2. Do not support prefix lists for loading Clojure namespaces.  It&apos;s hard to parse with external tools.&lt;/p&gt;

&lt;p&gt;3. Do not conflate importing Java classes with loading Clojure namespaces.  They are fundamentally different operations with different semantics.&lt;/p&gt;

&lt;p&gt;I have implemented some ideas in a macro called &quot;need&quot; at &lt;a href=&quot;http://github.com/stuartsierra/need&quot;&gt;http://github.com/stuartsierra/need&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26026" author="stuart.sierra" created="Sun, 12 Dec 2010 16:08:30 -0600"  >&lt;p&gt;Further requests:&lt;/p&gt;

&lt;p&gt;Permit tools to read the &quot;ns&quot; declaration and statically determine the dependencies of a namespace, without evaluating any code.&lt;/p&gt;</comment>
                    <comment id="27883" author="pmoriarty" created="Tue, 28 Feb 2012 03:56:11 -0600"  >&lt;blockquote&gt;&lt;p&gt;Permit tools to read the &quot;ns&quot; declaration and statically determine the dependencies of a namespace, without evaluating any code.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This would be great for building OSGi bundles where Bnd is currently not  much help.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-400] A faster flatten</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-400</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As discussed in &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/c9eef488d27bdf37&quot;&gt;this thread&lt;/a&gt;, I am submitting a more performant version of flatten for review. It has the same semantics as the current core/flatten. I have also updated the doc string to say that &quot;(flatten nil) returns the empty list&quot;, because that&apos;s what the current version of core/flatten does as well.&lt;/p&gt;

&lt;p&gt;I haven&apos;t mailed in a CA yet, but I will tomorrow morning.&lt;/p&gt;

&lt;p&gt;Edit: Of course I&apos;d mess my first ticket up &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. I am not immediately seeing an option to edit this to add the &quot;patch&quot; tag or add the &quot;ready to test&quot; action. Sorry folks&lt;/p&gt;</description>
                <environment></environment>
            <key id="13797">CLJ-400</key>
            <summary>A faster flatten</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Jul 2010 13:18:00 -0500</created>
                <updated>Tue, 24 Aug 2010 00:19:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="24104" author="importer" created="Tue, 24 Aug 2010 00:19:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/400&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/400&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
flatten-enhancement.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/c5chtAJQir353NeJe5cbLr/download/c5chtAJQir353NeJe5cbLr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/c5chtAJQir353NeJe5cbLr/download/c5chtAJQir353NeJe5cbLr&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-190] enhance with-open to be extensible with a new close multimethod</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-190</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Discussion: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/8e4e56f6fc65cc8e/618a893a5b2a5410&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/8e4e56f6fc65cc8e/618a893a5b2a5410&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Currently, with-open calls .close when it&apos;s finished.  I&apos;d like it to have a (defmulti close type) so it&apos;s behavior is extensible.  A standard method could be defined for java.io.Closeable and a :default method with no type hint.  I&apos;ve come across a few cases where some external library defines what is essentially a close method but names it shutdown or disable, etc., and adding my own &quot;defmethod close&quot; would be much easier than rewriting with-open.  This would also allow people to eliminate reflection for classes like sql Connection that were created before Closeable.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13587">CLJ-190</key>
            <summary>enhance with-open to be extensible with a new close multimethod</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Sep 2009 11:31:00 -0500</created>
                <updated>Fri, 23 Dec 2011 06:50:59 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23185" author="importer" created="Tue, 24 Aug 2010 04:30:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/190&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/190&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
clojure-190-with-open.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/ca27R6Ojur3PQ0eJe5afGb/download/ca27R6Ojur3PQ0eJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/ca27R6Ojur3PQ0eJe5afGb/download/ca27R6Ojur3PQ0eJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23186" author="importer" created="Tue, 24 Aug 2010 04:30:00 -0500"  >&lt;p&gt;mikehinchey said: [&lt;a href=&quot;file:ca27R6Ojur3PQ0eJe5afGb&quot;&gt;file:ca27R6Ojur3PQ0eJe5afGb&lt;/a&gt;]: fix adds close method and tests&lt;/p&gt;</comment>
                    <comment id="23187" author="importer" created="Tue, 24 Aug 2010 04:30:00 -0500"  >&lt;p&gt;mikehinchey said: Note, I only defined methods for :default (reflection of .close) and Closeable, not sql or the numerous other classes in java that should be Closeable but are not.  Maybe clojure.contrib.sql and other such libraries should define related close methods.&lt;/p&gt;</comment>
                    <comment id="23188" author="importer" created="Tue, 24 Aug 2010 04:30:00 -0500"  >&lt;p&gt;richhickey said: I want to hold off on this until scopes are in&lt;/p&gt;</comment>
                    <comment id="27494" author="tsdh" created="Fri, 23 Dec 2011 06:50:59 -0600"  >&lt;p&gt;Probably better implemented using a protocol.  See &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-308&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-308&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-450] Add default predicate argument to filter, every?, take-while</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-450</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Some seq processing functions that take predicates could be improved by the addition of a default value of identity for the predicate argument.&lt;/p&gt;

&lt;p&gt;This has been discussed on the mailing list, and people seem favorable:&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/600559b7ee261908/3bc5d144ac54854e?lnk=gst&amp;amp;q=filter+identity#3bc5d144ac54854e&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/600559b7ee261908/3bc5d144ac54854e?lnk=gst&amp;amp;q=filter+identity#3bc5d144ac54854e&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/0a9b5750dd7ec4ca&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/0a9b5750dd7ec4ca&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can put together a patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13847">CLJ-450</key>
            <summary>Add default predicate argument to filter, every?, take-while</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Oct 2010 16:39:00 -0500</created>
                <updated>Fri, 27 Apr 2012 11:38:28 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="24284" author="importer" created="Fri, 1 Oct 2010 16:39:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/450&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/450&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27938" author="jorendorff" created="Tue, 13 Mar 2012 14:51:07 -0500"  >&lt;p&gt;I independently wanted this. Here&apos;s a patch for: some, not-any?, every?, not-every?. If this is roughly what&apos;s wanted I&apos;ll be happy to add filter, remove, take-while, drop-while.&lt;/p&gt;</comment>
                    <comment id="27939" author="jorendorff" created="Tue, 13 Mar 2012 16:57:27 -0500"  >&lt;p&gt;Note that there are a few cases of (every? identity ...) and (some identity ...) in core.clj itself; the patch removes &quot;identity&quot; from those.&lt;/p&gt;</comment>
                    <comment id="28289" author="jafingerhut" created="Thu, 26 Apr 2012 19:51:32 -0500"  >&lt;p&gt;clj-450-add-default-pred-arg-to-core-fns-patch.txt dated Apr 26 2012 is identical to Jason Orendorff&apos;s, except it is in git format.  Jason is not on the list of Clojure contributors as of today.  I have sent him an email asking if he has done so, or is planning to.&lt;/p&gt;</comment>
                    <comment id="28292" author="jorendorff" created="Fri, 27 Apr 2012 10:35:00 -0500"  >&lt;p&gt;Of course I&apos;d be happy to send in a contributor agreement. ...Is there actually any interest in taking this patch or something like it?&lt;/p&gt;</comment>
                    <comment id="28294" author="jafingerhut" created="Fri, 27 Apr 2012 11:38:28 -0500"  >&lt;p&gt;I don&apos;t know if there is any interest in taking this patch.  Perhaps a Clojure screener will take a look at it and comment, but I am not a screener and can&apos;t promise anything.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11115" name="clj-450-add-default-pred-arg-to-core-fns-patch.txt" size="9598" author="jafingerhut" created="Thu, 26 Apr 2012 19:51:32 -0500" />
                    <attachment id="10991" name="clojure-default-every-argument-v1.patch" size="9139" author="jorendorff" created="Tue, 13 Mar 2012 14:51:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-451] fn literals lack name/arglists/namespace metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-451</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I would expect (meta (fn not-so-anonymous &lt;span class=&quot;error&quot;&gt;&amp;#91;a b c&amp;#93;&lt;/span&gt;)) to include {:name not-so-anonymous :arglists (&lt;span class=&quot;error&quot;&gt;&amp;#91;a b c&amp;#93;&lt;/span&gt;)} alongside line number information and possibly namespace/file as well, but currently it only includes :line.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13848">CLJ-451</key>
            <summary>fn literals lack name/arglists/namespace metadata</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Oct 2010 00:29:00 -0500</created>
                <updated>Tue, 5 Oct 2010 00:29:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="24285" author="importer" created="Tue, 5 Oct 2010 00:29:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/451&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/451&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-396] Better support for multiple inheritance in hierarchies and multimethods</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-396</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;While the hierarchies produced with &apos;derive&apos; allow multiple parents per child, there is no way to indicate precedence between those parents, other than by laboriously specifying &apos;prefer-method&apos; for every type X every multimethod. When 2 multimethods are both applicable to the supplied arguments, Clojure produces a nonspecific IllegalArgumentException containing only an error string. All this means that while Clojure does have an &quot;inheritance&quot; mechanism in the form of the ad hoc hierarchies, it is currently not really possible to implement multiple inheritance using the ad hoc hierarchy mechanism. &apos;Prefer-method&apos; will not scale up to use in large applications with complex type hierarchies and heavy use of multimethods. &lt;/p&gt;

&lt;p&gt;Some potential ways to solve this are:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;allowing &apos;defmulti&apos; to take a &apos;tie-breaker&apos; function (tie-breaker &lt;span class=&quot;error&quot;&gt;&amp;#91;arglist speclist1 speclist2&amp;#93;&lt;/span&gt; ...) which is called instead of throwing an IllegalArgumentException, and must return the &apos;winning speclist&apos;.&lt;/li&gt;
	&lt;li&gt;instead of throwing IllegalArgumentException, throw a TiedMultiMethodsException &amp;#8211; the exception instance should contain the offending speclists, the function, and the arguments that were supplied.&lt;/li&gt;
	&lt;li&gt;allowing specification of precedence when using &apos;derive&apos; (if only via a &quot;last in = highest precedence&quot; rule).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Paul&lt;/p&gt;</description>
                <environment></environment>
            <key id="13793">CLJ-396</key>
            <summary>Better support for multiple inheritance in hierarchies and multimethods</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Jul 2010 02:51:00 -0500</created>
                <updated>Tue, 24 Aug 2010 11:06:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="24087" author="importer" created="Tue, 24 Aug 2010 11:06:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/396&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/396&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-405] better error messages for bad defrecord calls</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-405</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;defrecord could tell you if, e.g., you didn&apos;t specify an interface before leaping into method bodies. See &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/f52f90954edd8b09&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/f52f90954edd8b09&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13802">CLJ-405</key>
            <summary>better error messages for bad defrecord calls</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Jul 2010 15:53:00 -0500</created>
                <updated>Tue, 24 Aug 2010 00:28:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="24122" author="importer" created="Tue, 24 Aug 2010 00:28:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/405&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/405&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24123" author="importer" created="Tue, 24 Aug 2010 00:28:00 -0500"  >&lt;p&gt;stu said: This could be fixed with an assert-valid-defrecord call in core_deftype, similar to assert-valid-fdecl in core.clj. Such a function would also be a place to hang other defrecord error messages.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-379] problem with classloader when run as windows service</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-379</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I found following error when I run clojure application as MS Windows service (via procrun from Apache Daemon project).  When I tried to do &apos;require&apos; during run-time, I got NullPointerException.  This happened as baseLoader function from RT class returned null in such environment (the value of Thread.currentThread().getContextClassLoader()).  (Although my app works fine when I run my application as standalone program, not as service).&lt;br/&gt;
This error was fixed by explicit setting of class loader with following code: &lt;/p&gt;

&lt;p&gt;(.setContextClassLoader (Thread/currentThread) (java.lang.ClassLoader/getSystemClassLoader))&lt;/p&gt;

&lt;p&gt;before any call to &apos;require&apos;....&lt;/p&gt;

&lt;p&gt;May be you need to modify &apos;baseLoader&apos; function, so it will check is value of Thread.currentThread().getContextClassLoader() is null or not, and if null, then return value of java.lang.ClassLoader.getSystemClassLoader() ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13776">CLJ-379</key>
            <summary>problem with classloader when run as windows service</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Jun 2010 10:24:00 -0500</created>
                <updated>Tue, 24 Aug 2010 10:40:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="24022" author="importer" created="Tue, 24 Aug 2010 10:40:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/379&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/379&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
ticket-379-fix.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/c5XWHcD4yr34HveJe5ccaP/download/c5XWHcD4yr34HveJe5ccaP&quot;&gt;https://www.assembla.com/spaces/clojure/documents/c5XWHcD4yr34HveJe5ccaP/download/c5XWHcD4yr34HveJe5ccaP&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24023" author="importer" created="Tue, 24 Aug 2010 10:40:00 -0500"  >&lt;p&gt;alexott said: possible fix is attached&lt;/p&gt;</comment>
                    <comment id="24024" author="importer" created="Tue, 24 Aug 2010 10:40:00 -0500"  >&lt;p&gt;alexott said: [&lt;a href=&quot;file:c5XWHcD4yr34HveJe5ccaP&quot;&gt;file:c5XWHcD4yr34HveJe5ccaP&lt;/a&gt;]&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-130] Namespace metadata lost in AOT compile</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-130</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;For example, the namespace @clojure.contrib.def@ has metadata for doc and author.&lt;/p&gt;

&lt;p&gt;We see this when we load the file directly from source:&lt;br/&gt;
&amp;lt;pre&amp;gt;&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
 tom@goya:~/src/clj$ java -cp clojure/clojure.jar:clojure-contrib/src clojure.lang.Repl&lt;br/&gt;
 Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
 user=&amp;gt; (load &quot;clojure/contrib/def&quot;)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; (find-ns &apos;clojure.contrib.def)     &lt;br/&gt;
 #&amp;lt;Namespace clojure.contrib.def&amp;gt;&lt;br/&gt;
 user=&amp;gt; ^(find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 {:author &quot;Stephen C. Gilardi&quot;, :doc &quot;def.clj provides variants of def that make including doc strings and\nmaking private definitions more succinct.&quot;}&lt;br/&gt;
 user=&amp;gt; &lt;br/&gt;
&amp;lt;/code&amp;gt;&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;

&lt;p&gt;But if we load the file from the jar where it&apos;s been compiled, the metadata is lost:&lt;br/&gt;
&amp;lt;pre&amp;gt;&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
 tom@goya:~/src/clj$ java -cp clojure/clojure.jar:clojure-contrib/clojure-contrib.jar clojure.lang.Repl&lt;br/&gt;
 Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
 user=&amp;gt; (use &apos;clojure.contrib.def)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; (find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 #&amp;lt;Namespace clojure.contrib.def&amp;gt;&lt;br/&gt;
 user=&amp;gt; ^(find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; &lt;br/&gt;
&amp;lt;/code&amp;gt;&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;

&lt;p&gt;Even if we use @load@, we don&apos;t see metadata on the item:&lt;br/&gt;
&amp;lt;pre&amp;gt;&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
 tom@goya:~/src/clj$ java -cp clojure/clojure.jar:clojure-contrib/clojure-contrib.jar clojure.lang.Repl&lt;br/&gt;
 Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
 user=&amp;gt; (load &quot;clojure/contrib/def&quot;)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; (find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 #&amp;lt;Namespace clojure.contrib.def&amp;gt;&lt;br/&gt;
 user=&amp;gt; ^(find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; &lt;br/&gt;
&amp;lt;/code&amp;gt;&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;


&lt;p&gt;The jar isn&apos;t the problem, for if we use the slim jar (without the AOT&lt;br/&gt;
class files), we see that the metadata is fine: &lt;br/&gt;
&amp;lt;pre&amp;gt;&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
 tom@goya:~/src/clj$ java -cp clojure/clojure.jar:clojure-contrib/clojure-contrib-slim.jar clojure.lang.Repl&lt;br/&gt;
 Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
 user=&amp;gt; (use &apos;clojure.contrib.def)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; (find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 #&amp;lt;Namespace clojure.contrib.def&amp;gt;&lt;br/&gt;
 user=&amp;gt; ^(find-ns &apos;clojure.contrib.def)&lt;br/&gt;
 {:author &quot;Stephen C. Gilardi&quot;, :doc &quot;def.clj provides variants of def that make including doc strings and\nmaking private definitions more succinct.&quot;}&lt;br/&gt;
 user=&amp;gt; &lt;br/&gt;
&amp;lt;/code&amp;gt;&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;

&lt;p&gt;This seems to be true usually, but not always. For example the&lt;br/&gt;
metadata on the pretty print namespace is just fine from the AOT version:&lt;br/&gt;
&amp;lt;pre&amp;gt;&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
 tom@goya:~/src/clj$ java -cp clojure/clojure.jar:clojure-contrib/clojure-contrib.jar clojure.lang.Repl&lt;br/&gt;
 Clojure 1.1.0-alpha-SNAPSHOT&lt;br/&gt;
 user=&amp;gt; (use &apos;clojure.contrib.pprint)&lt;br/&gt;
 nil&lt;br/&gt;
 user=&amp;gt; (find-ns &apos;clojure.contrib.pprint)&lt;br/&gt;
 #&amp;lt;Namespace clojure.contrib.pprint&amp;gt;&lt;br/&gt;
 user=&amp;gt; ^(find-ns &apos;clojure.contrib.pprint)&lt;br/&gt;
 {:author &quot;Tom Faulhaber&quot;, :doc &quot;This module comprises two elements:\n1) A pretty printer for Clojure data structures, implemented in the function \&quot;pprint\&quot;\n2) A Common Lisp compatible format function, implemented as \&quot;cl-format\&quot; because\n   Clojure is using the name \&quot;format\&quot; for its own format.\n\nComplete documentation is available on the wiki at the contrib google code site.&quot;, :see-also [&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;PrettyPrinting&amp;quot; &amp;quot;Documentation for the pretty printer&amp;quot;&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;CommonLispFormat&amp;quot; &amp;quot;Documentation for Common Lisp format function&amp;quot;&amp;#93;&lt;/span&gt;]}&lt;br/&gt;
 user=&amp;gt; &lt;br/&gt;
&amp;lt;/code&amp;gt;&lt;br/&gt;
&amp;lt;/pre&amp;gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13527">CLJ-130</key>
            <summary>Namespace metadata lost in AOT compile</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Jun 2009 00:47:00 -0500</created>
                <updated>Fri, 3 Dec 2010 10:48:15 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="22905" author="importer" created="Tue, 24 Aug 2010 06:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/130&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/130&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22906" author="importer" created="Tue, 24 Aug 2010 06:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#127, #128, #129, #130)&lt;/p&gt;</comment>
                    <comment id="22907" author="importer" created="Tue, 24 Aug 2010 06:45:00 -0500"  >&lt;p&gt;juergenhoetzel said: This is still a issue on &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Clojure 1.2.0-master-SNAPSHOT&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Any progress, hints? I prefer interactive documentiation via slime/repl&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-401] Promote &quot;seqable?&quot; from contrib?</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-401</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This was vaguely discussed &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/c9eef488d27bdf37&quot;&gt;here&lt;/a&gt; and could potenntially help &lt;a href=&quot;http://www.assembla.com/spaces/clojure/support/tickets/400-a-faster-flatten&quot;&gt;this ticket&lt;/a&gt; as well as be generally useful.&lt;/p&gt;

&lt;p&gt;I don&apos;t speak for everyone but when I saw sequential? I assumed it would have the semantics that seqable? does. Just my opinion, I&apos;d love to hear someone&apos;s who is more informed than mine.&lt;/p&gt;

&lt;p&gt;In the proposed patch referenced in the ticket above, if seqable? could be used in place of sequential? flatten could be more powerful and work with maps/sets/java collections. Here&apos;s how it would look:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn flatten [coll]
  (lazy-seq
    (when-let [coll (seq coll)]
      (let [x (first coll)]
        (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (seqable? x)
          (concat (flatten x) (flatten (next coll)))
          (cons x (flatten (next coll))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And an example:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (flatten #{1 2 3 #{4 5 {6 {7 &lt;a href=&quot;#tok1-block-tok&quot;&gt;8 9 10 #�tok1-block-tok&lt;/a&gt;}}}})&lt;br/&gt;
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13798">CLJ-401</key>
            <summary>Promote &quot;seqable?&quot; from contrib?</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Jul 2010 10:45:00 -0500</created>
                <updated>Tue, 24 Aug 2010 09:19:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="24105" author="importer" created="Tue, 24 Aug 2010 09:19:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/401&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/401&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-112] GC  Issue 108: All Clojure interfaces should specify CharSequence instead of String when possible</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-112</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by redchin, Apr 20, 2009

rhickey: unlink: then just use a map {:escaped &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; :val &lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;}

unlink: What I meant is, everything in between would want to see something 
&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;-y, not caring whether it&apos;s a &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; or MyString.

hiredman: unlink: &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; you use something that &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; CharSequence and 
IMeta (I think it&apos;s IMeta) you get something that is basically a &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, 
but with metadata

rhickey: what hiredman said

hiredman: ideally most things would not specify &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; but CharSequence in 
their &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt;

hiredman: but somehow I doubt that is &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt;

unlink: ok.

unlink: Good to know.

rhickey: hiredman: unfortunately that&apos;s not &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; of some of Clojure - could 
you enter an issue &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; it please - use CharSequence when possible?&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13509">CLJ-112</key>
            <summary>GC  Issue 108: All Clojure interfaces should specify CharSequence instead of String when possible</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 14:06:00 -0500</created>
                <updated>Tue, 24 Aug 2010 03:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22794" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/112&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/112&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22795" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-440] java method calls cannot omit varargs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-440</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;From &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/7d0d6cb32656a621&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/7d0d6cb32656a621&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;E.g., trying to call java.util.Collections.addAll(Collection c, T... elements)&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (Collections/addAll [] (object-array 0))
&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
user=&amp;gt; (Collections/addAll [])
IllegalArgumentException No matching method: addAll  clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$StaticMethodExpr.&amp;lt;init&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:1401)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Method class provides an isVarArg() method, which could be used to inform the compiler to process things differently.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13837">CLJ-440</key>
            <summary>java method calls cannot omit varargs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Sep 2010 20:19:00 -0500</created>
                <updated>Mon, 29 Oct 2012 10:56:32 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>5</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="24237" author="importer" created="Mon, 27 Sep 2010 20:19:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/440&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/440&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26340" author="ataggart" created="Fri, 1 Apr 2011 23:16:23 -0500"  >&lt;p&gt;Patch adds support for varargs.  Builds on top of patch in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="26344" author="ataggart" created="Tue, 5 Apr 2011 17:45:41 -0500"  >&lt;p&gt;Patch updated to current &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt; patch.&lt;/p&gt;</comment>
                    <comment id="29866" author="klauern" created="Mon, 29 Oct 2012 08:12:35 -0500"  >&lt;p&gt;Is this ticket on hold?  I find myself typing &lt;tt&gt;(.someCall arg1 arg2 (into-array SomeType nil))&lt;/tt&gt; alot just to get the right method to be called. This ticket sounds like it would address that extraneous &lt;tt&gt;into-array&lt;/tt&gt; arg that I use alot.&lt;/p&gt;</comment>
                    <comment id="29868" author="jafingerhut" created="Mon, 29 Oct 2012 10:45:47 -0500"  >&lt;p&gt;fixbug445.diff uploaded on Oct 29 2012 was written Oct 23 2010 by Alexander Taggart.  I am simply copying it from the old Assembla ticket tracking system to here to make it more easily accessible.  Not surprisingy, it doesn&apos;t apply cleanly to latest master.  I don&apos;t know how much effort it would be to update it, but only a few hunks do not apply cleanly according to &apos;patch&apos;.  See the &quot;Updating stale patches&quot; section on the JIRA workflow page here: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29869" author="jafingerhut" created="Mon, 29 Oct 2012 10:56:32 -0500"  >&lt;p&gt;Ugh.  Deleted the attachment because it was for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt;, or at least it was named that way.  &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt; definitely has a long comment history, so if one or more of its patches address this issue, then you can read the discussion there to see the history.&lt;/p&gt;

&lt;p&gt;I don&apos;t know of any &quot;on hold&quot; status for tickets, except for one or two where Rich Hickey has explicitly said in a comment that he wants to wait a while before making the change.  There are just tickets that contributors choose to work on and ones that screeners choose to screen.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-19] GC Issue 15: JavaDoc for interfaces</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-19</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by richhickey, Dec 17, 2008
Add JavaDoc to those interfaces supported &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; use - IFn,
IPersistentCollection etc.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13416">CLJ-19</key>
            <summary>GC Issue 15: JavaDoc for interfaces</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 14:58:00 -0500</created>
                <updated>Sat, 17 Nov 2012 20:05:58 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22508" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/19&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/19&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22509" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="29959" author="hiredman" created="Sat, 17 Nov 2012 20:05:58 -0600"  >&lt;p&gt;this seems like a great task for someone just starting out contributing to clojure.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-274] cannot close over mutable fields (in deftype)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-274</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Simplest case:&lt;/p&gt;

&lt;p&gt;user=&amp;gt;&lt;br/&gt;
(deftype Bench &lt;span class=&quot;error&quot;&gt;&amp;#91;#^{:unsynchronized-mutable true} val&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Runnable&lt;br/&gt;
  (run &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (fn [] (set! val 5))))&lt;/p&gt;

&lt;p&gt;java.lang.IllegalArgumentException: Cannot assign to non-mutable: val (NO_SOURCE_FILE:5)&lt;/p&gt;

&lt;p&gt;Functions should be able to mutate mutable fields in their surrounding deftype (just like inner classes do in Java).&lt;/p&gt;

&lt;p&gt;Filed as bug, because the loop special form expands into a fn form sometimes:&lt;/p&gt;

&lt;p&gt;user=&amp;gt;&lt;br/&gt;
(deftype Bench &lt;span class=&quot;error&quot;&gt;&amp;#91;#^{:unsynchronized-mutable true} val&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Runnable&lt;br/&gt;
  (run &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (let [x (loop [] (set! val 5))])))&lt;br/&gt;
java.lang.IllegalArgumentException: Cannot assign to non-mutable: val (NO_SOURCE_FILE:9)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13671">CLJ-274</key>
            <summary>cannot close over mutable fields (in deftype)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Feb 2010 16:41:00 -0600</created>
                <updated>Fri, 1 Oct 2010 09:35:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23526" author="importer" created="Fri, 1 Oct 2010 09:35:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/274&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/274&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23527" author="importer" created="Fri, 1 Oct 2010 09:35:00 -0500"  >&lt;p&gt;donmullen said: Updated each run to &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt; for new syntax.&lt;/p&gt;

&lt;p&gt;Now gives exception listed.&lt;/p&gt;</comment>
                    <comment id="23528" author="importer" created="Fri, 1 Oct 2010 09:35:00 -0500"  >&lt;p&gt;richhickey said: We&apos;re not going to allow closing over mutable fields. Instead we&apos;ll have to generate something other than fn for loops et al used as expressions. Not going to come before cinc&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-15] GC Issue 11: incremental hashcode calculation for collections</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-15</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by richhickey, Dec 17, 2008
So hachCode can be &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt;, more efficient to calc as you go.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13412">CLJ-15</key>
            <summary>GC Issue 11: incremental hashcode calculation for collections</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 11:55:00 -0500</created>
                <updated>Fri, 8 Mar 2013 06:20:08 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="22495" author="importer" created="Tue, 24 Aug 2010 03:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/15&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/15&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30715" author="cgrand" created="Fri, 8 Mar 2013 06:20:08 -0600"  >&lt;p&gt;Wouldn&apos;t the naive approach incur realizing lazy sequences when adding them to a list or a vector or as values in a map?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-259] clojure.lang.Reflector.invokeMatchingMethod is not complete (rejects pontentially valid method invocations)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-259</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There exists invoke expressions on instances, where Java is able to perform the call, yet clojure is not reflectively.&lt;br/&gt;
The problem is when the declaringClass of the found method is not public then the call to getAsMethodOfPublicBase uses the found method or searching for classes/interfaces that contain/define this method yet are declared publicly.&lt;/p&gt;

&lt;p&gt;This restricts the possible search space. I suggest that if target is not null (e.g. is not a static method), the target.getClass() should be used instead as a root for getAsMethodOfPublicBase.&lt;br/&gt;
This fixes my issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13656">CLJ-259</key>
            <summary>clojure.lang.Reflector.invokeMatchingMethod is not complete (rejects pontentially valid method invocations)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Feb 2010 22:05:00 -0600</created>
                <updated>Tue, 24 Aug 2010 15:12:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23449" author="importer" created="Tue, 24 Aug 2010 15:12:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/259&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/259&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23450" author="importer" created="Tue, 24 Aug 2010 15:12:00 -0500"  >&lt;p&gt;richhickey said: How about some sample case that demonstrates the problem?&lt;/p&gt;</comment>
                    <comment id="23451" author="importer" created="Tue, 24 Aug 2010 15:12:00 -0500"  >&lt;p&gt;hiredman said: &lt;b&gt;Related&lt;/b&gt; association with ticket #126 was added&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1001] Proxy cannot call proper super-class method</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1001</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Attached is a program that reproduces this issue.  We have a proxy, `p&apos;, which sub-classes java.io.InputStream.  There are three methods named `read&apos; in java.io.InputStream: abstract int read(); int read(byte[] b); and int read(byte[] b, int off, int len); see &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html&quot;&gt;http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html&lt;/a&gt;.  In the definition of proxy `p&apos;, we implement the abstract variant of method `read&apos;, making `p&apos; a concrete instance of java.io.InputStream.&lt;/p&gt;

&lt;p&gt;The first invocation, (. p read), returns -1, which is expected.&lt;/p&gt;

&lt;p&gt;The second invocation, (. p (read b 0 n)), should call int read(byte[] b, int off, int len); in java.io.InputStream.  But these are actual behavior:&lt;/p&gt;


&lt;p&gt;$ clojure1.2 ~/tmp/proxy-bug.clj &lt;br/&gt;
Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Wrong number of args (4) passed to: user$eval1$fn (proxy-bug.clj:0)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:5441)&lt;br/&gt;
        at clojure.lang.Compiler.load(Compiler.java:5858)&lt;br/&gt;
        at clojure.lang.Compiler.loadFile(Compiler.java:5821)&lt;br/&gt;
        at clojure.main$load_script.invoke(main.clj:221)&lt;br/&gt;
        at clojure.main$script_opt.invoke(main.clj:273)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:354)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:365)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:161)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:482)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;br/&gt;
Caused by: java.lang.IllegalArgumentException: Wrong number of args (4) passed to: user$eval1$fn&lt;br/&gt;
        at clojure.lang.AFn.throwArity(AFn.java:437)&lt;br/&gt;
        at clojure.lang.AFn.invoke(AFn.java:51)&lt;br/&gt;
        at user.proxy$java.io.InputStream$0.read(Unknown Source)&lt;br/&gt;
        at user$eval1.invoke(proxy-bug.clj:9)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:5425)&lt;br/&gt;
        ... 10 more&lt;/p&gt;


&lt;p&gt;$ clojure1.2 ~/tmp/proxy-bug.clj &lt;br/&gt;
Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Wrong number of args (4) passed to: user$eval1$fn (proxy-bug.clj:0)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:5441)&lt;br/&gt;
        at clojure.lang.Compiler.load(Compiler.java:5858)&lt;br/&gt;
        at clojure.lang.Compiler.loadFile(Compiler.java:5821)&lt;br/&gt;
        at clojure.main$load_script.invoke(main.clj:221)&lt;br/&gt;
        at clojure.main$script_opt.invoke(main.clj:273)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:354)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:365)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:161)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:482)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;br/&gt;
Caused by: java.lang.IllegalArgumentException: Wrong number of args (4) passed to: user$eval1$fn&lt;br/&gt;
        at clojure.lang.AFn.throwArity(AFn.java:437)&lt;br/&gt;
        at clojure.lang.AFn.invoke(AFn.java:51)&lt;br/&gt;
        at user.proxy$java.io.InputStream$0.read(Unknown Source)&lt;br/&gt;
        at user$eval1.invoke(proxy-bug.clj:9)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:5425)&lt;br/&gt;
        ... 10 more&lt;/p&gt;</description>
                <environment>Linux herberteuler 3.2.0-2-amd64 #1 SMP Sat May 12 23:08:28 UTC 2012 x86_64 GNU/Linux</environment>
            <key id="15471">CLJ-1001</key>
            <summary>Proxy cannot call proper super-class method</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="herberteuler@yahoo.com.cn">Guanpeng Xu</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 May 2012 22:21:33 -0500</created>
                <updated>Wed, 23 May 2012 22:24:43 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28577" author="herberteuler@yahoo.com.cn" created="Wed, 23 May 2012 22:24:43 -0500"  >&lt;p&gt;The second behavior should be in Clojure 1.3:&lt;/p&gt;

&lt;p&gt;$ clojure1.3 ~/tmp/proxy-bug.clj &lt;br/&gt;
Exception in thread &quot;main&quot; clojure.lang.ArityException: Wrong number of args (4) passed to: user$eval1$fn&lt;br/&gt;
        at clojure.lang.AFn.throwArity(AFn.java:437)&lt;br/&gt;
        at clojure.lang.AFn.invoke(AFn.java:51)&lt;br/&gt;
        at user.proxy$java.io.InputStream$0.read(Unknown Source)&lt;br/&gt;
        at user$eval1.invoke(proxy-bug.clj:9)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:6468)&lt;br/&gt;
        at clojure.lang.Compiler.load(Compiler.java:6905)&lt;br/&gt;
        at clojure.lang.Compiler.loadFile(Compiler.java:6866)&lt;br/&gt;
        at clojure.main$load_script.invoke(main.clj:282)&lt;br/&gt;
        at clojure.main$script_opt.invoke(main.clj:342)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:426)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:401)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:161)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:518)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;/p&gt;

&lt;p&gt;Sorry for the inconvenience.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11247" name="proxy-bug.clj" size="274" author="herberteuler@yahoo.com.cn" created="Wed, 23 May 2012 22:21:33 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-698] class accessible from deftype method bodies is not suitable for instance?, ...</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-698</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Example interaction: &lt;a href=&quot;http://pastebin.com/cTdUCKfp&quot;&gt;http://pastebin.com/cTdUCKfp&lt;/a&gt;&lt;br/&gt;
Which directly contradicts documentation for deftype&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc).&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
            <key id="14307">CLJ-698</key>
            <summary>class accessible from deftype method bodies is not suitable for instance?, ...</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bendlas">Herwig Hochleitner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Dec 2010 09:38:07 -0600</created>
                <updated>Wed, 29 Dec 2010 12:45:45 -0600</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26067" author="stu" created="Wed, 29 Dec 2010 12:45:45 -0600"  >&lt;p&gt;The problem occurs in 1.2 but is fixed on master. Leaving in backlog in case we ever cut another 1.2 release--if not, then mark as fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-740] Unnecessary boxing of primitives in case form</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-740</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Found this while profiling some performance-critical code.&lt;/p&gt;

&lt;p&gt;Consider the following Clojure function:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn test-&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; ^&lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; [^&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; i ^&lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; d1 ^&lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; d2]
  (&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; i)
    0 d1
    d2))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Current Clojure 1.3 snapshot compiles it to:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; invokePrim(&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;)   &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; java.lang.Exception;
  Code:
   0:	lload_1
   1:	invokestatic	#67; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/RT.intCast:(J)I
&lt;/span&gt;   4:	istore	7
   6:	iload	7
   8:	i2l
   9:	invokestatic	#73; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Numbers.num:(J)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;;
&lt;/span&gt;   12:	invokestatic	#79; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Util.hash:(Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)I
&lt;/span&gt;   15:	iconst_0
   16:	ishr
   17:	iconst_1
   18:	iand
   19:	tableswitch{ &lt;span class=&quot;code-comment&quot;&gt;//0 to 0
&lt;/span&gt;		0: 36;
		&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;: 58 }
   36:	iload	7
   38:	i2l
   39:	invokestatic	#73; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Numbers.num:(J)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;;
&lt;/span&gt;   42:	getstatic	#45; &lt;span class=&quot;code-comment&quot;&gt;//Field const__3:Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;
&lt;/span&gt;   45:	invokestatic	#83; &lt;span class=&quot;code-comment&quot;&gt;//Method clojure/lang/Util.equals:(Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)Z
&lt;/span&gt;   48:	ifeq	58
   51:	dload_3
   52:	invokestatic	#88; &lt;span class=&quot;code-comment&quot;&gt;//Method java/lang/&lt;span class=&quot;code-object&quot;&gt;Double&lt;/span&gt;.valueOf:(D)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Double&lt;/span&gt;;
&lt;/span&gt;   55:	&lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt;	63
   58:	dload	5
   60:	invokestatic	#88; &lt;span class=&quot;code-comment&quot;&gt;//Method java/lang/&lt;span class=&quot;code-object&quot;&gt;Double&lt;/span&gt;.valueOf:(D)Ljava/lang/&lt;span class=&quot;code-object&quot;&gt;Double&lt;/span&gt;;
&lt;/span&gt;   63:	checkcast	#92; &lt;span class=&quot;code-comment&quot;&gt;//class java/lang/&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;
&lt;/span&gt;   66:	invokevirtual	#96; &lt;span class=&quot;code-comment&quot;&gt;//Method java/lang/&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;.doubleValue:()D
&lt;/span&gt;   69:	dreturn
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This bytecode contains boxing of primitives (calls to clojure/lang/Numbers.num and java/lang/Double.valueOf) and calls to clojure/lang/Util.hash and clojure/lang/Util.equals that does not seem necessary.&lt;/p&gt;

&lt;p&gt;At 60-66 primitive double is boxed into Double only to be converted back into primitive.&lt;/p&gt;

&lt;p&gt;The equivalent Java code compiles to much simpler and faster bytecode:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; testCase(&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;);
  Code:
   0:	lload_1
   1:	l2i
   2:	lookupswitch{ &lt;span class=&quot;code-comment&quot;&gt;//1
&lt;/span&gt;		0: 20;
		&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;: 22 }
   20:	dload_3
   21:	dreturn
   22:	dload	5
   24:	dreturn
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14354">CLJ-740</key>
            <summary>Unnecessary boxing of primitives in case form</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kryshen">Mikhail Kryshen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Feb 2011 02:49:45 -0600</created>
                <updated>Tue, 1 Mar 2011 02:51:43 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26250" author="ataggart" created="Mon, 28 Feb 2011 14:16:07 -0600"  >&lt;p&gt;Improved via patch on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-426&quot; title=&quot;case should handle hash collision&quot;&gt;&lt;del&gt;CLJ-426&lt;/del&gt;&lt;/a&gt;.&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;(defn test-case ^double [^long i ^double d1 ^double d2]
  (case (int i)
    0 d1
    d2))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;now emits as&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; 0  lload_1 [i]
 1  invokestatic clojure.lang.RT.intCast(long) : int [67]
 4  istore 7 [G__7903] // let-bound expression
 6  iload 7 [G__7903]
 8  tableswitch default: 32
      case 0: 28
28  dload_3 [d2]
29  goto 34
32  dload 5 [arg2]
34  dreturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or if the int cast of the expression is omitted:&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; 0  lload_1 [i]
 1  lstore 7 [G__7903] // let-bound expression
 3  lload 7 [G__7903]
 5  l2i
 6  tableswitch default: 35
      case 0: 24
24  lconst_0           // match, verify long expr wasn&apos;t truncated
25  lload 7 [G__7903]
27  lcmp
28  ifne 35
31  dload_3 [d2]
32  goto 37
35  dload 5 [arg2]
37  dreturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-760] ClassNotFound when AOT compiling a self-referring deftype extended to a protocol</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-760</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If I create a deftype that refers to itself in a protocol extension like below:&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;(ns type-test)

(defprotocol Foo
  (isa-foo [x]))

(deftype TypeTest []
  Foo
  (isa-foo [x]
           (instance? TypeTest x)))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And use that code via another namespace:&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;(ns test-type-user
  (:use [type-test :only (isa-foo)])
  (:import [type-test TypeTest]))

(isa-foo (TypeTest.))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I try to AOT compile the test-type-user namespace with Clojure 1.2.0, I get &lt;em&gt;java.lang.NoClassDefFoundError: compile&lt;/em&gt;&lt;em&gt;stub/type-test/TypeTest (test_type_user.clj:5)&lt;/em&gt;.  Full stack trace attached.  Running the same code on 1.2.1 and 1.3.0-alpha6 yielded the same exception with a slightly different error message (stacktrace for 1.2.1 is also in the attached file).&lt;/p&gt;

&lt;p&gt;This came up in a test at Revelytix.  We worked around this issue by not using &lt;em&gt;instance?&lt;/em&gt; and instead comparing based on class name.  Another workaround is to define the deftype and the extension separately (using extend-type or something similar).  This problem also doesn&apos;t occur if the usage of the deftype and the definition of it are in the same namespace (i.e. if &lt;em&gt;type-test&lt;/em&gt; and &lt;em&gt;test-type-user&lt;/em&gt; were in the same file).&lt;/p&gt;
</description>
                <environment>Clojure 1.2.0, 1.2.1, 1.3.0-alpha6, JDK 1.6.0_24, Ubuntu 10.10</environment>
            <key id="14376">CLJ-760</key>
            <summary>ClassNotFound when AOT compiling a self-referring deftype extended to a protocol</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ryansenior">Ryan Senior</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Mar 2011 09:06:37 -0500</created>
                <updated>Fri, 18 Mar 2011 10:27:46 -0500</updated>
                                    <version>Release 1.2</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26312" author="alexmiller" created="Fri, 18 Mar 2011 10:27:46 -0500"  >&lt;p&gt;The first case where we saw this was actually in having a deftype implement a Java interface (not a protocol) and in that case you cannot extend the interface outside the deftype (although comparing based on class name of course works).  &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10153" name="stacktraces.txt" size="4744" author="ryansenior" created="Fri, 18 Mar 2011 09:06:37 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-864] defrecord positional arity factory fn should have an inline version that calls the record constructor</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-864</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;defrecord positional arity factory fn should have an inline version that calls the record constructor&lt;/p&gt;</description>
                <environment></environment>
            <key id="14900">CLJ-864</key>
            <summary>defrecord positional arity factory fn should have an inline version that calls the record constructor</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 03:17:55 -0500</created>
                <updated>Wed, 26 Oct 2011 03:17:55 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1046] Drop-while as a reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1046</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Implement drop-while as a reducer. Follows the same atom-based strategy as drop and take.&lt;/p&gt;

&lt;p&gt;Does not depend on any of my other reducer patches, but there will probably be some minor merge conflicts unless it is merged after &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1045&quot; title=&quot;Generalize/refactor implementation of PersistentVector/coll-fold&quot;&gt;CLJ-1045&lt;/a&gt;, and before &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-992&quot; title=&quot;`iterate` reducer&quot;&gt;CLJ-992&lt;/a&gt; and &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-993&quot; title=&quot;`range` reducer&quot;&gt;CLJ-993&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15636">CLJ-1046</key>
            <summary>Drop-while as a reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Aug 2012 19:11:59 -0500</created>
                <updated>Sat, 18 Aug 2012 19:11:59 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                                <attachments>
                    <attachment id="11445" name="drop-while-reducer.patch" size="1997" author="amalloy" created="Sat, 18 Aug 2012 19:11:59 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-887] Error when calling primitive functions with destructuring in the arg vector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-887</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If one defines a primitive-taking function with destructuring, calling that function will result in a ClassCastException, IFF the primitive return-type hint is present.&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;Clojure 1.4.0-master-SNAPSHOT
user=&amp;gt; (defn foo [[a b] ^long x ^long y] 0)
#&apos;user/foo
user=&amp;gt; (foo [1 2] 3 4)
0
user=&amp;gt; (defn foo ^long [[a b] ^long x ^long y] 0)
#&apos;user/foo
user=&amp;gt; (foo [1 2] 3 4)
ClassCastException user$foo cannot be cast to clojure.lang.IFn$OLLL  user/eval9 (NO_SOURCE_FILE:4)
user=&amp;gt; (pst)
ClassCastException user$foo cannot be cast to clojure.lang.IFn$OLLL
	user/eval9 (NO_SOURCE_FILE:4)
	clojure.lang.Compiler.eval (Compiler.java:6493)
	clojure.lang.Compiler.eval (Compiler.java:6459)
	clojure.core/eval (core.clj:2796)
	clojure.main/repl/read-eval-print--5967 (main.clj:244)
	clojure.main/repl/fn--5972 (main.clj:265)
	clojure.main/repl (main.clj:265)
	clojure.main/repl-opt (main.clj:331)
	clojure.main/main (main.clj:427)
	clojure.lang.Var.invoke (Var.java:397)
	clojure.lang.Var.applyTo (Var.java:518)
	clojure.main.main (main.java:37)
nil
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15038">CLJ-887</key>
            <summary>Error when calling primitive functions with destructuring in the arg vector</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Nov 2011 15:46:47 -0600</created>
                <updated>Tue, 29 Nov 2011 15:48:19 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-884] Reflector error messages can be improved when no matching method is found.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-884</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When accessing a java method with an arity mismatch or a mismatched parameter type, Reflector.java returns the following error on REPL:&lt;br/&gt;
IllegalArgumentException No matching method found: xyz for class com.abc.MyClass&lt;/p&gt;

&lt;p&gt;eventhough method xyz might exist on MyClass, but was being called with the wrong number of arguments.&lt;/p&gt;

&lt;p&gt;Attached is a patch that fixes that problem.&lt;/p&gt;
</description>
                <environment>All</environment>
            <key id="15031">CLJ-884</key>
            <summary>Reflector error messages can be improved when no matching method is found.</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="rahulpilani">Rahul Pilani</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Nov 2011 15:56:51 -0600</created>
                <updated>Fri, 23 Mar 2012 01:14:18 -0500</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27984" author="jafingerhut" created="Thu, 22 Mar 2012 20:47:21 -0500"  >&lt;p&gt;diff.patch of Nov 27, 2011 does not apply cleanly to latest master version of Clojure code (using &quot;patch -p1 &amp;lt; diff.patch&quot;, at least).  It is preferred by Clojure team that patches are in git format-patch format.  Instructions for producing such a patch are given at &lt;a href=&quot;http://clojure.org/patches&quot;&gt;http://clojure.org/patches&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rahul, are you planning to sign a Clojure Contributor Agreement?  Without that, this code cannot be included in Clojure, unless a contributor reimplements it on their own.&lt;/p&gt;</comment>
                    <comment id="27985" author="jafingerhut" created="Fri, 23 Mar 2012 01:14:18 -0500"  >&lt;p&gt;In private communication with the patch author today, he expressed an interest in submitting a signed CA so this patch can be considered for inclusion in Clojure.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10718" name="diff.patch" size="4785" author="rahulpilani" created="Sun, 27 Nov 2011 15:56:51 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1016] Global scope overrides lexical scope for classes (Clojure assumes no classes in default package / Clojure cannot handle yFiles JARs in classpath)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1016</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The most visible symptom of this bug is having a class named &apos;w&apos; (default package) in your classpath (such classes are produced by Java obfuscation tools such as yFiles) and then attempting to load Clojure&apos;s core class. For example:&lt;/p&gt;

&lt;p&gt;  java -cp hotspotapi.jar:clojure-1.4.0-slim.jar clojure.main&lt;/p&gt;

&lt;p&gt;(where hotspotapi.jar is a stereotypical example of an obfuscated JAR) results in:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError&lt;br/&gt;
	at clojure.main.&amp;lt;clinit&amp;gt;(main.java:20)&lt;br/&gt;
Caused by: java.lang.NoSuchFieldException: close, compiling:(clojure/core.clj:6139)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2178)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5919)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)&lt;br/&gt;
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.access$100(Compiler.java:37)&lt;br/&gt;
	at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:518)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6515)&lt;br/&gt;
	at clojure.lang.Compiler.load(Compiler.java:6952)&lt;br/&gt;
	at clojure.lang.RT.loadResourceScript(RT.java:359)&lt;br/&gt;
	at clojure.lang.RT.loadResourceScript(RT.java:350)&lt;br/&gt;
	at clojure.lang.RT.load(RT.java:429)&lt;br/&gt;
	at clojure.lang.RT.load(RT.java:400)&lt;br/&gt;
	at clojure.lang.RT.doInit(RT.java:436)&lt;br/&gt;
	at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:318)&lt;br/&gt;
	... 1 more&lt;br/&gt;
Caused by: java.lang.NoSuchFieldException: close&lt;br/&gt;
	at java.lang.Class.getField(Class.java:1537)&lt;br/&gt;
	at clojure.lang.Compiler$StaticFieldExpr.&amp;lt;init&amp;gt;(Compiler.java:1180)&lt;br/&gt;
	at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:923)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	... 37 more&lt;br/&gt;
Could not find the main class: clojure.main. Program will exit.&lt;/p&gt;

&lt;p&gt;To understand what is going on, consider this simple test:&lt;/p&gt;

&lt;p&gt;import java.io.StringReader;&lt;/p&gt;

&lt;p&gt;import clojure.lang.Compiler;&lt;br/&gt;
import clojure.lang.RT;&lt;/p&gt;

&lt;p&gt;public class Test {&lt;br/&gt;
    public static void main(String[] args) {
        RT.var(&quot;clojure.core&quot;, &quot;require&quot;);
        String s = &quot;(let [mumble (new java.io.StringReader \&quot;\&quot;)] (. mumble close))&quot;;
        Compiler.load(new StringReader(s));
    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;It should be clear that &apos;mumble&apos; in the dot operator is referencing the locally defined mumble. However, if we define a class named &apos;mumble&apos; in the default package, Clojure picks that one up instead.&lt;/p&gt;

&lt;p&gt;To forestall any objections: yes, we know that placing classes in the default package is extremely poor form. Point of the matter is, the Java ecosystem is extremely diverse and there are a lot of JARs people may not have control over. While one might argue, &quot;Don&apos;t put classes in the default namespace&quot;, point of the matter is, Clojure is wrong here, and these situations arise in practice, through no fault of the implementer.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15547">CLJ-1016</key>
            <summary>Global scope overrides lexical scope for classes (Clojure assumes no classes in default package / Clojure cannot handle yFiles JARs in classpath)</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ezyang">Edward Z. Yang</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jun 2012 10:31:20 -0500</created>
                <updated>Mon, 27 Aug 2012 21:24:13 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28886" author="ezyang" created="Thu, 21 Jun 2012 11:01:06 -0500"  >&lt;p&gt;Here is a workaround patch which makes this error less likely to occur.&lt;/p&gt;</comment>
                    <comment id="29274" author="jafingerhut" created="Mon, 27 Aug 2012 19:37:34 -0500"  >&lt;p&gt;Edward, it is Rich Hickey&apos;s policy only to consider for inclusion in Clojure patches written by people who have signed a Contributor Agreement: &lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Were you interested in becoming a contributor?&lt;/p&gt;</comment>
                    <comment id="29276" author="ezyang" created="Mon, 27 Aug 2012 21:24:13 -0500"  >&lt;p&gt;Sure, although the patch attached is emphatically not the one you want to actually applying, since it only band-aids the problem.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11340" name="collision-workaround.patch" size="1128" author="ezyang" created="Thu, 21 Jun 2012 11:01:06 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-959] after call to clojure.java.shell/sh, jvm won&apos;t exit</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-959</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Create the following four-line file, shell_example.clj:&lt;/p&gt;

&lt;p&gt;;; simple example of call to sh that causes jvm to hang after print&lt;br/&gt;
(require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.java.shell :as shell&amp;#93;&lt;/span&gt;)&lt;br/&gt;
(shell/sh &quot;ls&quot;)&lt;br/&gt;
(println &quot;jvm should exit after this, but it doesn&apos;t&quot;)&lt;/p&gt;

&lt;p&gt;Run:&lt;br/&gt;
java -jar clojure-1.3.0.jar shell_example.clj&lt;/p&gt;

&lt;p&gt;After the message is printed, the jvm doesn&apos;t quit. It just sits there. I have to hit Ctrl-C to force the jvm to quit.&lt;/p&gt;

&lt;p&gt;This happens on 1.3 and the most recent code in github as of 3/26/2012. I imagine the jvm is waiting for a thread that hasn&apos;t terminated, but the code in the sh function doesn&apos;t look like it&apos;s doing anything obviously wrong. I&apos;m too much of a newcomer to Clojure to dig any deeper.&lt;/p&gt;

&lt;p&gt;My workaround right now is to do (System/exit 0) to force the jvm to quit.&lt;/p&gt;

&lt;p&gt;Thank you for your work on Clojure, it&apos;s simply an amazing language.&lt;/p&gt;</description>
                <environment>Reproduced on Ubuntu using Sun Java 1.6, OpenJDK 1.6, and Sun Java 1.7&lt;br/&gt;
</environment>
            <key id="15295">CLJ-959</key>
            <summary>after call to clojure.java.shell/sh, jvm won&apos;t exit</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="codeforkjeff">Jeff Chiu</reporter>
                        <labels>
                        <label>shell</label>
                    </labels>
                <created>Mon, 26 Mar 2012 21:55:26 -0500</created>
                <updated>Fri, 8 Jun 2012 12:47:07 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28023" author="jafingerhut" created="Tue, 27 Mar 2012 00:19:03 -0500"  >&lt;p&gt;Jeff, this occurs in any Clojure program where certain threading mechanisms are invoked.  In your case, clojure.java.shell/sh uses future, which causes threads to be created that then sit around for about 60 seconds after everything else quits, and the main Java process does not exit until that happens.  Another way to get the program to exit quickly is to call (shutdown-agents), but that isn&apos;t any more convenient than (System/exit 0), nor is there any obvious way you can tell as a newcomer that you should be doing this.&lt;/p&gt;

&lt;p&gt;The ticket &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-124&quot; title=&quot;GC  Issue 120: Determine mechanism for controlling automatic shutdown of Agents, with a default policy and mechanism for changing that policy as needed&quot;&gt;CLJ-124&lt;/a&gt; is marked with status &quot;Approved&quot; at this time, which leads me to believe that perhaps soon there will be a change made to Clojure such that this situation will change.&lt;/p&gt;</comment>
                    <comment id="28750" author="jafingerhut" created="Fri, 8 Jun 2012 12:47:07 -0500"  >&lt;p&gt;This behavior is now documented on clojuredocs.org for future, and both pmap and clojure.java.shell/sh refer to future for details.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1013] Clojure&apos;s classloader cannot handle out-of-order loading</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1013</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Here is a minimal test-case:&lt;/p&gt;

&lt;p&gt;import java.io.IOException;&lt;/p&gt;

&lt;p&gt;    import clojure.lang.PersistentTreeMap;&lt;br/&gt;
    import clojure.lang.RT;&lt;/p&gt;


&lt;p&gt;    public class TestClass {&lt;/p&gt;

&lt;p&gt;            static Class y = RT.class;&lt;br/&gt;
            //static PersistentTreeMap x = PersistentTreeMap.EMPTY;&lt;/p&gt;

&lt;p&gt;            /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@param args&lt;/li&gt;
	&lt;li&gt;@throws ClassNotFoundException&lt;/li&gt;
	&lt;li&gt;@throws IOException&lt;br/&gt;
             */&lt;br/&gt;
            public static void main(String[] args) throws IOException, ClassNotFoundException {
                    PersistentTreeMap x = PersistentTreeMap.EMPTY;
     
            }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;This results in the exception:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError&lt;br/&gt;
            at java.lang.Class.forName0(Native Method)&lt;br/&gt;
            at java.lang.Class.forName(Class.java:247)&lt;br/&gt;
            at clojure.lang.RT.loadClassForName(RT.java:2056)&lt;br/&gt;
            at clojure.lang.RT.load(RT.java:419)&lt;br/&gt;
            at clojure.lang.RT.load(RT.java:400)&lt;br/&gt;
            at clojure.lang.RT.doInit(RT.java:436)&lt;br/&gt;
            at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:318)&lt;br/&gt;
            at clojure.lang.PersistentTreeMap.&amp;lt;init&amp;gt;(PersistentTreeMap.java:45)&lt;br/&gt;
            at clojure.lang.PersistentTreeMap.&amp;lt;clinit&amp;gt;(PersistentTreeMap.java:32)&lt;br/&gt;
            at TestClass.main(TestClass.java:19)&lt;br/&gt;
    Caused by: java.lang.NullPointerException&lt;br/&gt;
            at clojure.lang.APersistentSet.contains(APersistentSet.java:33)&lt;br/&gt;
            at clojure.lang.RT.contains(RT.java:700)&lt;br/&gt;
            at clojure.core$contains_QMARK_.invoke(core.clj:1386)&lt;br/&gt;
            at clojure.core$load_lib.doInvoke(core.clj:5255)&lt;br/&gt;
            at clojure.lang.RestFn.applyTo(RestFn.java:142)&lt;br/&gt;
            at clojure.core$apply.invoke(core.clj:603)&lt;br/&gt;
            at clojure.core$load_libs.doInvoke(core.clj:5298)&lt;br/&gt;
            at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
            at clojure.core$apply.invoke(core.clj:603)&lt;br/&gt;
            at clojure.core$require.doInvoke(core.clj:5381)&lt;br/&gt;
            at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
            at clojure.core__init.load(Unknown Source)&lt;br/&gt;
            at clojure.core__init.&amp;lt;clinit&amp;gt;(Unknown Source)&lt;br/&gt;
            ... 10 more&lt;/p&gt;

&lt;p&gt;The crux of the issue appears Clojure&apos;s classloader doesn&apos;t understand how to handle out-of-order classloading.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15532">CLJ-1013</key>
            <summary>Clojure&apos;s classloader cannot handle out-of-order loading</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ezyang">Edward Z. Yang</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Jun 2012 15:21:42 -0500</created>
                <updated>Wed, 13 Jun 2012 15:21:42 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-968] ns emitting gen-class before imports results in imported annotations being discarded.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-968</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following discards the imported annotations:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(ns com.example.BaseXModuleTest
  (:&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; (org.basex.query QueryModule QueryModule$Deterministic))
  (:gen-class
     :&lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; org.basex.query.QueryModule
     :methods [
       [^{QueryModule$Deterministic {}}
        addOne [&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;] &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;]]))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, when moving the &lt;tt&gt;gen-class&lt;/tt&gt; call out of the &lt;tt&gt;ns&lt;/tt&gt; declaration, the annotation is correctly applied:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(ns com.example.BaseXModuleTest
  (:&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; (org.basex.query QueryModule QueryModule$Deterministic)))

(gen-class
  :&lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; org.basex.query.QueryModule
  :name com.example.BaseXModuleTest
  :methods [
    [^{QueryModule$Deterministic {}}
     addOne [&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;] &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;]])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It appears that imported names are not yet in-scope when gen-class is run from a &lt;tt&gt;ns&lt;/tt&gt; declaration.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15321">CLJ-968</key>
            <summary>ns emitting gen-class before imports results in imported annotations being discarded.</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="charles-dyfis-net">Charles Duffy</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Apr 2012 15:38:07 -0500</created>
                <updated>Mon, 9 Apr 2012 15:38:07 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-969] Symbol/keyword implements IFn for lookup but a non-collection argument produces non-intuitive results</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-969</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(&apos;+ 1 2) ;; return 2 because it is treated as (get 1 &apos;+ 2)&lt;/p&gt;

&lt;p&gt;Whilst this is &quot;consistent&quot; once you know the lookup behavior, it&apos;s confusing for Clojure newbies and it seems to be a non-useful behavior.&lt;/p&gt;

&lt;p&gt;Proposal: modify Keyword.invoke() and Symbol.invoke() to restrict first Object argument to instanceof ILookup, Map or IPersistentSet (or null) so that the &quot;not found&quot; behavior doesn&apos;t produce non-intuitive behavior.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15323">CLJ-969</key>
            <summary>Symbol/keyword implements IFn for lookup but a non-collection argument produces non-intuitive results</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Apr 2012 17:29:03 -0500</created>
                <updated>Mon, 9 Apr 2012 17:29:03 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-971] Jar within a jar throws a runtime error</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-971</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve created two jar files in my multi-project Maven setup.  The first jar is the &quot;engine&quot;, and it includes the clojure jar in it.  The other jar is the &quot;application&quot;.  It includes the engine and then packages itself into a one-jar jar file.  This means we have a jar within a jar: The &quot;onejar&quot; contains the engine jar, which in turn contains that clojure jar.&lt;/p&gt;

&lt;p&gt;I then get an error in the runtime:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.reflect.InvocationTargetException&lt;br/&gt;
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;br/&gt;
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
    at java.lang.reflect.Method.invoke(Method.java:616)&lt;br/&gt;
    at com.simontuffs.onejar.Boot.run(Boot.java:340)&lt;br/&gt;
    at com.simontuffs.onejar.Boot.main(Boot.java:166)&lt;br/&gt;
Caused by: java.lang.ExceptionInInitializerError&lt;br/&gt;
    at com.ziroby.clojure.App.main(App.java:14)&lt;br/&gt;
    ... 6 more&lt;br/&gt;
Caused by: java.lang.NullPointerException&lt;br/&gt;
    at clojure.lang.RT.lastModified(RT.java:374)&lt;br/&gt;
    at clojure.lang.RT.load(RT.java:408)&lt;br/&gt;
    at clojure.lang.RT.load(RT.java:398)&lt;br/&gt;
    at clojure.lang.RT.doInit(RT.java:434)&lt;br/&gt;
    at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:316)&lt;br/&gt;
... 7 more&lt;/p&gt;

&lt;p&gt;See also my Stack Overflow question on this at &lt;a href=&quot;http://stackoverflow.com/questions/7763480/making-an-executable-jar-that-evals-clojure-strings&quot;&gt;http://stackoverflow.com/questions/7763480/making-an-executable-jar-that-evals-clojure-strings&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In researching it, I&apos;ve found the problem lies in RT.lastModified, where it tries to determine last modified time by looking at the modified time on the jar file for Clojure.  But there&apos;s not actually a jar file, since it&apos;s embedded in another.&lt;/p&gt;

&lt;p&gt;I&apos;ve found that adding a null check solves the problem.  My lastModified looks like this now:&lt;/p&gt;

&lt;p&gt;static public long lastModified(URL url, String libfile) throws Exception{&lt;br/&gt;
	if(url.getProtocol().equals(&quot;jar&quot;)) {
		ZipEntry entry = ((JarURLConnection) url.openConnection()).getJarFile().getEntry(libfile);
		if (entry != null)
			return entry.getTime();
	}&lt;/p&gt;

&lt;p&gt;	return url.openConnection().getLastModified();&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;This runs successfully.&lt;/p&gt;

&lt;p&gt;If you&apos;d prefer, I can submit a patch, or commit directly.    &lt;/p&gt;
</description>
                <environment>Maven using the one-jar plugin</environment>
            <key id="15326">CLJ-971</key>
            <summary>Jar within a jar throws a runtime error</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ziroby">Ron Romero</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 10 Apr 2012 22:39:36 -0500</created>
                <updated>Tue, 10 Apr 2012 22:39:36 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-903] extend-protocol does not allow classnames as a String</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-903</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In various places Clojure accepts classnames as &lt;tt&gt;String&lt;/tt&gt;, eg. in &lt;tt&gt;gen-class&lt;/tt&gt; or type hints. However it does not in &lt;tt&gt;extend-protocol&lt;/tt&gt;. This does not allow simple specification of array types.&lt;/p&gt;

&lt;p&gt;See also here: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/722a0c09d02bb0ac&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/722a0c09d02bb0ac&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15090">CLJ-903</key>
            <summary>extend-protocol does not allow classnames as a String</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="mbrandmeyer">Meikel Brandmeyer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Dec 2011 17:17:12 -0600</created>
                <updated>Fri, 30 Dec 2011 17:17:12 -0600</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1022] gen-class destroys method annotations</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1022</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When extending a class gen-class doesn&apos;t preserve method annotations.&lt;/p&gt;

&lt;p&gt;If class com.bar.Foo has annotated methods  then in MyClass all annotations are gone.&lt;/p&gt;


&lt;p&gt;(gen-class&lt;br/&gt;
   :name com.my.MyClass&lt;br/&gt;
   :extends com.bar.Foo&lt;br/&gt;
   :implements &lt;span class=&quot;error&quot;&gt;&amp;#91;com.google.common.base.Supplier&amp;#93;&lt;/span&gt;&lt;br/&gt;
   :prefix demo-&lt;br/&gt;
   :post-init post-init)&lt;/p&gt;

&lt;p&gt;(defn demo-post-init &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (info &quot;initialized&quot;)&lt;br/&gt;
  (swank.swank/start-server :port 68478))&lt;/p&gt;

&lt;p&gt;(defn demo-get &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (get-msg))&lt;/p&gt;



&lt;p&gt;            Class&amp;lt;?&amp;gt; aClass = Class.forName(&quot;com.my.MyClass&quot;);&lt;br/&gt;
            Method[] methods = aClass.getMethods();&lt;/p&gt;

&lt;p&gt;            for (Method m : methods) {&lt;br/&gt;
                Annotation[] annotations = m.getAnnotations();&lt;br/&gt;
                System.out.println(m.getName()+&quot; &quot;+annotations.length);&lt;br/&gt;
                for (Annotation a : annotations) {
                    System.out.println(a.annotationType().getClass().getName());
                }&lt;br/&gt;
            }&lt;/p&gt;</description>
                <environment></environment>
            <key id="15566">CLJ-1022</key>
            <summary>gen-class destroys method annotations</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="maris">Maris Orbidans</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 3 Jul 2012 06:19:26 -0500</created>
                <updated>Tue, 3 Jul 2012 06:19:26 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-911] &apos;proxy&apos; prevents overriding Object.finalize (and doesn&apos;t document it)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-911</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;It appears to be impossible to override Object.finalize() using proxy.  If the method is defined using proxy, then it cannot be called straightforwardly (see below), and it is not called as a finalizer during normal program execution (not demonstrated below).&lt;/p&gt;

&lt;p&gt;See extensive discussion at: &lt;a href=&quot;https://groups.google.com/group/clojure/browse_thread/thread/a1e2fca45af6c1af&quot;&gt;https://groups.google.com/group/clojure/browse_thread/thread/a1e2fca45af6c1af&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;user=&amp;gt; (def m (proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;java.util.HashMap&amp;#93;&lt;/span&gt; []&lt;br/&gt;
        (finalize []&lt;br/&gt;
          ;(proxy-super finalize)&lt;br/&gt;
          (prn &quot;finalizing...&quot;))&lt;br/&gt;
        (hashCode []&lt;br/&gt;
          99)))&lt;br/&gt;
#&apos;user/m&lt;br/&gt;
user=&amp;gt; (.hashCode m)&lt;br/&gt;
99&lt;br/&gt;
user=&amp;gt; (.finalize m)&lt;br/&gt;
IllegalArgumentException No matching field found: finalize for class user.proxy$java.util.HashMap$0 clojure.lang.Reflector.getInstanceField (Reflector.java:289)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;There is at least one of two bugs here (thanks to Cedric Greevey for summarising this way):&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If the inability to override finalize() is unintentional, that&apos;s a bug.&lt;/li&gt;
	&lt;li&gt;If it&apos;s intentional for some reason, then (a) that&apos;s not documented, and (b) the failure is silent, in the sense that an explicit call produces an apparently completely unrelated error (above), and the failure to call the method during object finalization is completely silent.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>OS X, Java 1.6.0?</environment>
            <key id="15118">CLJ-911</key>
            <summary>&apos;proxy&apos; prevents overriding Object.finalize (and doesn&apos;t document it)</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="nxg">Norman Gray</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Jan 2012 08:36:27 -0600</created>
                <updated>Mon, 16 Jan 2012 08:36:27 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1037] Allow doc strings for both interfaces and concrete implementations</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1037</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In this post&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/84de74740928da76#&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/84de74740928da76#&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I mentioned the rationale (I think) why this is important and needed. Thank you for consideration.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15613">CLJ-1037</key>
            <summary>Allow doc strings for both interfaces and concrete implementations</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="wrn.lynn">Warren Lynn</reporter>
                        <labels>
                    </labels>
                <created>Sat, 4 Aug 2012 10:30:53 -0500</created>
                <updated>Sat, 4 Aug 2012 10:30:53 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-986] Adds an exit function to exit clojure process</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-986</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There is no standard function to exit the clojure process.&lt;br/&gt;
In java implementation,we use (System/exit 0),but in other implementations(CLR), i have to use another function.&lt;/p&gt;

&lt;p&gt;Why not add a standard function in clojure.core?&lt;br/&gt;
For example:&lt;/p&gt;

&lt;p&gt;(defn exit&lt;br/&gt;
   ([] (exit 0)&lt;br/&gt;
   (&lt;span class=&quot;error&quot;&gt;&amp;#91;status&amp;#93;&lt;/span&gt; (System/exit status)))&lt;/p&gt;

&lt;p&gt;I think it&apos;s useful for us.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15414">CLJ-986</key>
            <summary>Adds an exit function to exit clojure process</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="killme2008">dennis zhuang</reporter>
                        <labels>
                        <label>exit</label>
                        <label>function</label>
                        <label>quit</label>
                    </labels>
                <created>Sun, 6 May 2012 21:25:57 -0500</created>
                <updated>Sun, 6 May 2012 21:25:57 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-919] cannot create anonymous primitive functions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-919</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Primitive functions only work (e.g. return primitive types) when defined with `defn`.  An equivalent function created with `fn` does not behave the same way as when created with `defn`.  For example:&lt;/p&gt;

&lt;p&gt;(definterface IPrimitiveTester&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;^int x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;^long x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;^float x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;^double x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;^Object x&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;(deftype PrimitiveTester []&lt;br/&gt;
   IPrimitiveTester&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;this ^int x&amp;#93;&lt;/span&gt; :int)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;this ^long x&amp;#93;&lt;/span&gt; :long)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;this ^float x&amp;#93;&lt;/span&gt; :float)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;this ^double x&amp;#93;&lt;/span&gt; :double)&lt;br/&gt;
   (getType &lt;span class=&quot;error&quot;&gt;&amp;#91;this ^Object x&amp;#93;&lt;/span&gt; :object))&lt;/p&gt;

&lt;p&gt;(defmacro pt &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;&lt;br/&gt;
   `(.getType (PrimitiveTester.) ~x))&lt;/p&gt;

&lt;p&gt;(defn with-defn ^double &lt;span class=&quot;error&quot;&gt;&amp;#91;^double x&amp;#93;&lt;/span&gt;&lt;br/&gt;
   (+ x 0.5))&lt;/p&gt;

&lt;p&gt;(pt (with-defn 1.0)) ; =&amp;gt; :double&lt;/p&gt;

&lt;p&gt;(let [a (fn ^double &lt;span class=&quot;error&quot;&gt;&amp;#91;^double x&amp;#93;&lt;/span&gt; (+ x 0.5))] &lt;br/&gt;
  (pt (a 0.1))) ; =&amp;gt; :object &lt;/p&gt;


&lt;p&gt;Please see the discussion on the mailing list for more details and thoughts on what is happening:&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/d83c8643a7c7d595?hl=en&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/d83c8643a7c7d595?hl=en&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15149">CLJ-919</key>
            <summary>cannot create anonymous primitive functions</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bmabey">Ben Mabey</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Jan 2012 16:48:42 -0600</created>
                <updated>Fri, 27 Jan 2012 16:48:42 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-979] map-&gt;R returns different class when invoked from AOT ccode</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-979</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(defrecord Dontwork &lt;span class=&quot;error&quot;&gt;&amp;#91;a&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;(= (type (Dontwork. nil))&lt;br/&gt;
   (type (map-&amp;gt;Dontwork {:a 1})))&lt;/p&gt;

&lt;p&gt;Will return true if the namespace is not AOT compiled and false if it is.&lt;/p&gt;

&lt;p&gt;I have created a small example project with AOT and non-AOT namespaces to demonstrate&lt;br/&gt;
&lt;a href=&quot;https://github.com/ejackson/aotquestion&quot;&gt;https://github.com/ejackson/aotquestion&lt;/a&gt;&lt;/p&gt;

</description>
                <environment>Mac OS X 10.5, lein 1.7 and lein 2.0</environment>
            <key id="15400">CLJ-979</key>
            <summary>map-&gt;R returns different class when invoked from AOT ccode</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ejackson">Edmund Jackson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 May 2012 03:01:37 -0500</created>
                <updated>Sun, 13 May 2012 22:35:35 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28483" author="scottlowe" created="Sat, 12 May 2012 21:05:37 -0500"  >&lt;p&gt;I can&apos;t reproduce this under Clojure 1.3 or 1.4, and Leiningen 1.7.1 on either Java 1.7.0-jdk7u4-b21 OpenJDK 64-Bit or Java 1.6.0_31 Java HotSpot 64-Bit. OS is Mac OS X 10.7.&lt;/p&gt;

&lt;p&gt;Edmund, how are you running this AOT code? I wrapped your code in a main function and built an uberjar from it.&lt;/p&gt;</comment>
                    <comment id="28485" author="ejackson" created="Sun, 13 May 2012 02:20:57 -0500"  >&lt;p&gt;Hi Scott,&lt;/p&gt;

&lt;p&gt;Interesting.  &lt;/p&gt;

&lt;p&gt;I have two use cases&lt;br/&gt;
1. AOT compile and call from repl.&lt;br/&gt;
My steps: git clone, lein compile, lein repl, (use &apos;aots.death), (in-ns &apos;aots.death), (= (class (Dontwork. nil)) (class (map-&amp;gt;Dontwork {:a 1}))) =&amp;gt; false&lt;/p&gt;

&lt;p&gt;2. My original use case, which I&apos;ve minimised here, is an AOT ns, producing a genclass that is called instantiated from other Java (no main).  This produces the same error. I will produce an example of this and post it too.&lt;/p&gt;</comment>
                    <comment id="28486" author="ejackson" created="Sun, 13 May 2012 04:23:46 -0500"  >&lt;p&gt;Hi Scott,&lt;/p&gt;

&lt;p&gt;Here is an example of it failing in the interop case: &lt;a href=&quot;https://github.com/ejackson/aotquestion2&quot;&gt;https://github.com/ejackson/aotquestion2&lt;/a&gt;&lt;br/&gt;
The steps I&apos;m following to compile this all up are&lt;/p&gt;

&lt;p&gt;git clone git@github.com:ejackson/aotquestion2.git&lt;br/&gt;
cd aotquestion2/cljside/&lt;br/&gt;
lein uberjar&lt;br/&gt;
lein install&lt;br/&gt;
cd ../javaside/&lt;br/&gt;
mvn package&lt;br/&gt;
java -jar ./target/aotquestion-1.0-SNAPSHOT.jar&lt;/p&gt;

&lt;p&gt;and it dies with this:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.ClassCastException: cljside.core.Dontwork cannot be cast to cljside.core.Dontwork&lt;br/&gt;
	at cljside.MyClass.makeDontwork(Unknown Source)&lt;br/&gt;
	at aotquestion.App.main(App.java:8)&lt;/p&gt;

&lt;p&gt;The error message is really confusing (to me, anyway), but I think its the same root problem as for the REPL case.&lt;/p&gt;

&lt;p&gt;What do you see when you run the above ?&lt;/p&gt;</comment>
                    <comment id="28487" author="scottlowe" created="Sun, 13 May 2012 08:41:21 -0500"  >&lt;p&gt;Ah, yes, looks like my initial attempt to reproduce was too simplistic. I used your second git repo, and can now confirm that it&apos;s failing for me with the same error.&lt;/p&gt;</comment>
                    <comment id="28497" author="scottlowe" created="Sun, 13 May 2012 22:35:35 -0500"  >&lt;p&gt;I looked into this a little further and the AOT generated code looks correct, in the sense that both code paths appear to be returning the same type.&lt;/p&gt;

&lt;p&gt;However, I wonder if this is really a ClassLoader issue, whereby two definitions of the same class are being loaded at different times, because that would cause the x.y.Class cannot be cast to x.y.Class exception that we&apos;re seeing here.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-994] repeat reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-994</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;i&apos;m working on clojure.core/repeat reducer. &lt;/p&gt;</description>
                <environment></environment>
            <key id="15436">CLJ-994</key>
            <summary>repeat reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jasonjckn">Jason Jackson</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 May 2012 13:46:08 -0500</created>
                <updated>Fri, 14 Sep 2012 14:37:35 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28512" author="jafingerhut" created="Thu, 17 May 2012 18:18:00 -0500"  >&lt;p&gt;Jason, have you tried to build this using JDK 1.6.0?  I&apos;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.&lt;/p&gt;

&lt;p&gt;It builds and tests cleanly on Ubuntu 11.10 + Oracle JDK 1.7.0 for me.&lt;/p&gt;</comment>
                    <comment id="28513" author="jasonjckn" created="Thu, 17 May 2012 18:41:45 -0500"  >&lt;p&gt;That&apos;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&apos;t understand why it&apos;s happening.&lt;/p&gt;

</comment>
                    <comment id="28540" author="jasonjckn" created="Sat, 19 May 2012 14:55:46 -0500"  >&lt;p&gt;This issue is isolated to mvn test afaik. &lt;/p&gt;

&lt;p&gt;When I include clojure inside a leiningen project, and add jsr166y.jar to lib directory, core.reducers works fine with java 1.6.&lt;/p&gt;</comment>
                    <comment id="28543" author="jafingerhut" created="Sun, 20 May 2012 03:00:58 -0500"  >&lt;p&gt;Jason, you say it applies to all of core.reducers in your May 17, 2012 comment.  I don&apos;t understand.  Without your patch applied, I can run &quot;./antsetup.sh ; ant&quot; 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?&lt;/p&gt;</comment>
                    <comment id="28545" author="jasonjckn" created="Sun, 20 May 2012 11:55:09 -0500"  >&lt;p&gt;Yah that&apos;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). &lt;/p&gt;</comment>
                    <comment id="28759" author="jafingerhut" created="Fri, 8 Jun 2012 19:11:02 -0500"  >&lt;p&gt;With Stuart Halloway&apos;s commit to Clojure master on June 8, 2012 titled &quot;let reducers tests work under ant&quot;, 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.&lt;/p&gt;</comment>
                    <comment id="29130" author="jasonjckn" created="Tue, 14 Aug 2012 01:17:04 -0500"  >&lt;p&gt;I&apos;m on the contributors list. Is this patch still needed?&lt;br/&gt;
sorry for long long delay.&lt;/p&gt;</comment>
                    <comment id="29441" author="jasonjckn" created="Fri, 14 Sep 2012 14:37:35 -0500"  >&lt;p&gt;This patch should wait until &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-993&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-993&lt;/a&gt; is committed. I think there&apos;s a some shared code. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11204" name="0001-repeat-for-clojure.core.reducers.patch" size="4530" author="jasonjckn" created="Fri, 11 May 2012 15:07:18 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-995] sorted-set doesn&apos;t support IEditableCollection</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-995</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I think sorted-set (PersistentTreeSet) should implement the transient interface. It&apos;s a special-purpose set and should be usable just like every normal set.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15440">CLJ-995</key>
            <summary>sorted-set doesn&apos;t support IEditableCollection</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="the-kenny">Moritz Ulrich</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 May 2012 09:38:20 -0500</created>
                <updated>Mon, 4 Jun 2012 02:32:56 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28708" author="hircus" created="Mon, 4 Jun 2012 02:32:56 -0500"  >&lt;p&gt;Note that this would require PersistentTreeMap to implement IEditableCollection as well.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1081] REPL binding not working that works with with-bindings</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1081</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This works as expected:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java -jar clojure-1.4.0.jar -e &lt;span class=&quot;code-quote&quot;&gt;&quot;(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (require &apos;clojure.repl) (.setDynamic #&apos;clojure.repl/print-doc) (with-bindings {#&apos;clojure.repl/print-doc str} (eval &apos;(clojure.repl/doc println))))&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-quote&quot;&gt;&quot;{:ns #&amp;lt;Namespace clojure.core&amp;gt;, :name println, :arglists ([&amp;amp; more]), :added \&quot;&lt;/span&gt;1.0\&lt;span class=&quot;code-quote&quot;&gt;&quot;, :&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, :doc \&quot;&lt;/span&gt;Same as print followed by (newline)\&lt;span class=&quot;code-quote&quot;&gt;&quot;, :line 3325, :file \&quot;&lt;/span&gt;clojure/core.clj\&lt;span class=&quot;code-quote&quot;&gt;&quot;}&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But the same thing does not work in the REPL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java -jar clojure-1.4.0.jar -e &lt;span class=&quot;code-quote&quot;&gt;&quot;(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (require &apos;clojure.repl) (.setDynamic #&apos;clojure.repl/print-doc) (clojure.main/repl :init (fn [] {#&apos;clojure.repl/print-doc str}))))&quot;&lt;/span&gt;

Output &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; Output of {{(doc println)}}:&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;user=&amp;gt; (doc println)&lt;br/&gt;
-------------------------&lt;br/&gt;
clojure.core/println&lt;br/&gt;
(&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; more&amp;#93;&lt;/span&gt;)&lt;br/&gt;
  Same as print followed by (newline)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15730">CLJ-1081</key>
            <summary>REPL binding not working that works with with-bindings</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="sdevijver">Steven Devijver</reporter>
                        <labels>
                    </labels>
                <created>Sun, 30 Sep 2012 15:21:42 -0500</created>
                <updated>Mon, 1 Oct 2012 05:51:46 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29583" author="sdevijver" created="Mon, 1 Oct 2012 05:51:46 -0500"  >&lt;p&gt;Found a work-around:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java -jar clojure-1.4.0.jar -e &lt;span class=&quot;code-quote&quot;&gt;&quot;(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (require &apos;clojure.repl) (.setDynamic #&apos;clojure.repl/print-doc) (with-bindings {#&apos;clojure.repl/print-doc str} (clojure.main/repl)))))&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m still not sure whether the method above using :init should or should not work.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1077] thread-bound? returns true (implying set! should succeed) even for non-binding thread</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1077</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;thread-bound? returns true for a non-binding thread, this result (according to the docstring) implies that set! should succeed.  However, thread-bound? does not check that any binding that might exist was created by the current thread, and calling set! fails with an exception when it is called from a non-binding thread, even though thread-bound? returns true.&lt;/p&gt;

&lt;p&gt;thread-bound? should return false if there is a binding, and that binding was not established by the current thread.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15720">CLJ-1077</key>
            <summary>thread-bound? returns true (implying set! should succeed) even for non-binding thread</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="pjstadig">Paul Stadig</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 13:51:28 -0500</created>
                <updated>Mon, 1 Oct 2012 11:57:10 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29584" author="pjstadig" created="Mon, 1 Oct 2012 10:07:00 -0500"  >&lt;p&gt;I have attached a patch that changes clojure.lang.Var and clojure.core/thread-bound? to only return true if a Var is set!-able.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11535" name="thread-bound.diff" size="1261" author="pjstadig" created="Mon, 1 Oct 2012 10:07:00 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-992] `iterate` reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-992</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Added a reducer implementation mirroring clojure.core/iterate. &lt;/p&gt;</description>
                <environment></environment>
            <key id="15430">CLJ-992</key>
            <summary>`iterate` reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 May 2012 21:40:46 -0500</created>
                <updated>Fri, 12 Oct 2012 08:10:52 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28441" author="amalloy" created="Thu, 10 May 2012 21:50:25 -0500"  >&lt;p&gt;Should I have made this implement Seqable as well? It wasn&apos;t clear to me, because as far as I could see this was the only function in clojure.core.reducers that&apos;s generating a brand-new sequence rather than transforming an existing one.&lt;/p&gt;</comment>
                    <comment id="28442" author="amalloy" created="Thu, 10 May 2012 22:24:14 -0500"  >&lt;p&gt;Previous version neglected to include the seed value of the iteration in the reduce.&lt;/p&gt;</comment>
                    <comment id="28458" author="jasonjckn" created="Fri, 11 May 2012 11:23:05 -0500"  >&lt;p&gt;Currying iterate seems useless, albeit not harmful. &lt;/p&gt;

&lt;p&gt;While implementing repeat, I couldn&apos;t use currying. Because 1-arity is already reserved for infinite repeat (&lt;span class=&quot;error&quot;&gt;&amp;#91;n x&amp;#93;&lt;/span&gt; and &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;, not &lt;span class=&quot;error&quot;&gt;&amp;#91;n x&amp;#93;&lt;/span&gt; and &lt;span class=&quot;error&quot;&gt;&amp;#91;n&amp;#93;&lt;/span&gt; if currying)&lt;/p&gt;

&lt;p&gt;How about we just support currying for functions where last param is reducible?&lt;/p&gt;</comment>
                    <comment id="29226" author="amalloy" created="Sat, 18 Aug 2012 19:16:21 -0500"  >&lt;p&gt;This new patch replaces the previous patch. As requested, I am splitting up the large issue &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-993&quot; title=&quot;`range` reducer&quot;&gt;CLJ-993&lt;/a&gt; into smaller tickets.&lt;/p&gt;

&lt;p&gt;Does not depend on any of my other reducer patches, but there will probably be some minor merge conflicts unless it is merged after &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1045&quot; title=&quot;Generalize/refactor implementation of PersistentVector/coll-fold&quot;&gt;CLJ-1045&lt;/a&gt; and &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1046&quot; title=&quot;Drop-while as a reducer&quot;&gt;CLJ-1046&lt;/a&gt;, and before &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-993&quot; title=&quot;`range` reducer&quot;&gt;CLJ-993&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11192" name="0001-Add-reducers-iterate.patch" size="2029" author="amalloy" created="Thu, 10 May 2012 22:24:14 -0500" />
                    <attachment id="11446" name="iterate-reducer.patch" size="2209" author="amalloy" created="Sat, 18 Aug 2012 19:16:21 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-666] Add support for Big* numeric types to Reflector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-666</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This should work as expected, for example:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(Integer. 1N)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Probably for &lt;tt&gt;BigInt&lt;/tt&gt;, &lt;tt&gt;BigInteger&lt;/tt&gt;, and &lt;tt&gt;BigDecimal&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Method to look at is &lt;tt&gt;c.l.Reflector.paramArgTypeMatch&lt;/tt&gt;, per Rich in irc.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14267">CLJ-666</key>
            <summary>Add support for Big* numeric types to Reflector</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Oct 2010 11:20:19 -0500</created>
                <updated>Thu, 15 Nov 2012 20:07:39 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="26333" author="trptcolin" created="Wed, 30 Mar 2011 23:52:38 -0500"  >&lt;p&gt;Questions posed on the clojure-dev list around how this impacts bit-shift-left: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/2191cbf0048d8ca6&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/2191cbf0048d8ca6&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26334" author="ataggart" created="Thu, 31 Mar 2011 00:42:37 -0500"  >&lt;p&gt;Patch on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt; fixes this as well.&lt;/p&gt;</comment>
                    <comment id="26394" author="trptcolin" created="Wed, 27 Apr 2011 16:41:39 -0500"  >&lt;p&gt;This patch fails a test around bit-shifting a BigInt: `(bit-shift-left 1N 10000)`. The reason is that the patch changes the dispatch of (BigInt, Long) from (Object, Object) to (long, int). &lt;/p&gt;

&lt;p&gt;Clearly this can&apos;t be applied (unless another change makes it possible), but I&apos;m putting it up as a start of the conversation.&lt;/p&gt;</comment>
                    <comment id="26395" author="ataggart" created="Wed, 27 Apr 2011 17:26:04 -0500"  >&lt;p&gt;My comment from the mailing list:&lt;/p&gt;

&lt;p&gt;If the test breaks it likely means Numbers.shiftLeft(long,int) was &lt;br/&gt;
selected over Numbers.shiftLeft(Object,Object).  Given that 1N is an &lt;br/&gt;
Object (one that can exceed the size of a long), the method selection &lt;br/&gt;
is incorrect, thus the patch is broken.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;The suggestion of &quot;simply&quot; modifying paramArgTypeMatch is not sufficient since the mechanism for preferring one method over another lives in Compiler, and isn&apos;t smart enough to make these sorts of decisions.&lt;/p&gt;</comment>
                    <comment id="26397" author="redinger" created="Thu, 28 Apr 2011 09:21:09 -0500"  >&lt;p&gt;Considering moving this out of Release.next - soliciting comments from Chas.&lt;/p&gt;</comment>
                    <comment id="26398" author="cemerick" created="Thu, 28 Apr 2011 09:41:43 -0500"  >&lt;p&gt;I&apos;m afraid I don&apos;t have any particular insight into the issues involved at this point.  I ran into the problem originally noted a while back, and opened the ticket at Rich&apos;s suggestion.  I&apos;m sorry if the text of the ticket led anyone down unfruitful paths&#8230;&lt;/p&gt;</comment>
                    <comment id="26401" author="lvanderhart" created="Fri, 29 Apr 2011 10:01:24 -0500"  >&lt;p&gt;The issues relating to bitshift are moot since the decision was made that bit-shifts are only for 32/64 bit values. &lt;/p&gt;

&lt;p&gt;Still a valid issue, but de-prioritized as per Rich.&lt;/p&gt;</comment>
                    <comment id="28904" author="alexott" created="Mon, 25 Jun 2012 07:19:29 -0500"  >&lt;p&gt;Modified version of original patch&lt;/p&gt;</comment>
                    <comment id="28910" author="jafingerhut" created="Tue, 26 Jun 2012 13:38:06 -0500"  >&lt;p&gt;Alex, would you mind attaching it with a unique file name?  I know that JIRA lets us create multiple attachments with the same file name, and I know we can tell them apart by date and the account of the person who uploaded the attachment, but giving them the same name only seems to invite confusion.&lt;/p&gt;</comment>
                    <comment id="28915" author="alexott" created="Thu, 28 Jun 2012 13:00:29 -0500"  >&lt;p&gt;Renamed updated patch to unique name&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10200" name="0001-Add-Big-support-to-Reflector.patch" size="4834" author="trptcolin" created="Wed, 27 Apr 2011 16:41:39 -0500" />
                    <attachment id="11351" name="0001-Add-Big-support-to-Reflector-Updated.patch" size="4987" author="alexott" created="Thu, 28 Jun 2012 13:00:29 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-415] smarter assert (prints locals)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-415</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Here is an implementation you can paste into a repl. Feedback wanted:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn ^{:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;} local-bindings
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Produces a map of the names of local bindings to their values.&quot;&lt;/span&gt;
  [env]
  (let [symbols (map key env)]
    (zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols)))

(defmacro &lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;
  &quot;Evaluates expr and &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; an exception &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; it does not evaluate to
 logical &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;.&quot;
  {:added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;}
  [x]
  (when *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;*
    (let [bindings (local-bindings &amp;amp;env)]
      `(when-not ~x
         (let [sep# (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;line.separator&quot;&lt;/span&gt;)]
           (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (AssertionError. (apply str &lt;span class=&quot;code-quote&quot;&gt;&quot;Assert failed: &quot;&lt;/span&gt; (pr-str &apos;~x) sep#
                                          (map (fn [[k# v#]] (str &lt;span class=&quot;code-quote&quot;&gt;&quot;\t&quot;&lt;/span&gt; k# &lt;span class=&quot;code-quote&quot;&gt;&quot; : &quot;&lt;/span&gt; v# sep#)) ~bindings)))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13812">CLJ-415</key>
            <summary>smarter assert (prints locals)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jul 2010 17:45:00 -0500</created>
                <updated>Sun, 18 Nov 2012 01:06:07 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="24161" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/415&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/415&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24162" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;alexdmiller said: A simple example I tried for illustration:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (let [a 1 b 2] (&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt; (= a b)))
#&amp;lt;CompilerException java.lang.AssertionError: Assert failed: (= a b)
 a : 1
 b : 2&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="24163" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;fogus said: Of course it&apos;s weird if you do something like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(let [x 1 y 2 z 3 a 1 b 2 c 3] (&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt; (= x y)))
java.lang.AssertionError: Assert failed: (= x y)
 x : 1
 y : 2
 z : 3
 a : 1
 b : 2
 c : 3
 (NO_SOURCE_FILE:0)
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;

So maybe it could be slightly changed to:
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;(defmacro &lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Evaluates expr and &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; an exception &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; it does not evaluate to logical &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;.&quot;&lt;/span&gt;
  {:added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;}
  [x]
  (when *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;*
    (let [bindings (local-bindings &amp;amp;env)]
      `(when-not ~x
         (let [sep#  (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;line.separator&quot;&lt;/span&gt;)
               form# &apos;~x]
           (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (AssertionError. (apply str &lt;span class=&quot;code-quote&quot;&gt;&quot;Assert failed: &quot;&lt;/span&gt; (pr-str form#) sep#
                                          (map (fn [[k# v#]] 
                                                 (when (some #{k#} form#) 
                                                   (str &lt;span class=&quot;code-quote&quot;&gt;&quot;\t&quot;&lt;/span&gt; k# &lt;span class=&quot;code-quote&quot;&gt;&quot; : &quot;&lt;/span&gt; v# sep#))) 
                                               ~bindings)))))))))
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;

So that. now it&apos;s just:
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;(let [x 1 y 2 z 3 a 1 b 2 c 3] (&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt; (= x y)))
java.lang.AssertionError: Assert failed: (= x y)
 x : 1
 y : 2
 (NO_SOURCE_FILE:0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;:f&lt;/p&gt;</comment>
                    <comment id="24164" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;fogus said: Hmmm, but that fails entirely for: (let &lt;span class=&quot;error&quot;&gt;&amp;#91;x 1 y 2 z 3 a 1 b 2 c 3&amp;#93;&lt;/span&gt; (assert (= &lt;span class=&quot;error&quot;&gt;&amp;#91;x y&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;a c&amp;#93;&lt;/span&gt;))).  So maybe it&apos;s better just to print all of the locals unless you really want to get complicated.&lt;br/&gt;
:f&lt;/p&gt;</comment>
                    <comment id="24165" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;jawolfe said: See also some comments in:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_frm/thread/68d49cd7eb4a4899/9afc6be4d3f8ae27?lnk=gst&amp;amp;q=assert#9afc6be4d3f8ae27&quot;&gt;http://groups.google.com/group/clojure-dev/browse_frm/thread/68d49cd7eb4a4899/9afc6be4d3f8ae27?lnk=gst&amp;amp;q=assert#9afc6be4d3f8ae27&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Plus one more suggestion to add to the mix:  in addition to / instead of printing the locals, how about saving them somewhere.  For example, the var &lt;b&gt;assert-bindings&lt;/b&gt; could be bound to the map of locals.  This way you don&apos;t run afoul of infinite/very large sequences, and allow the user to do more detailed interrogation of the bad values (especially useful when some of the locals print opaquely).&lt;/p&gt;</comment>
                    <comment id="24166" author="importer" created="Tue, 24 Aug 2010 17:41:00 -0500"  >&lt;p&gt;stuart.sierra said: Another approach, which I wil willingly donate:&lt;br/&gt;
&lt;a href=&quot;http://github.com/stuartsierra/lazytest/blob/master/src/main/clojure/lazytest/expect.clj&quot;&gt;http://github.com/stuartsierra/lazytest/blob/master/src/main/clojure/lazytest/expect.clj&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26034" author="jweiss" created="Wed, 15 Dec 2010 13:33:52 -0600"  >&lt;p&gt;There&apos;s one more tweak to fogus&apos;s last comment, which I&apos;m actually using.  You need to flatten the quoted form before you can use &apos;some&apos; to check whether the local was used in the form:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defmacro &lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Evaluates expr and &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; an exception &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; it does not evaluate to logical &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;.&quot;&lt;/span&gt;
  {:added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;}
  [x]
  (when *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;*
    (let [bindings (local-bindings &amp;amp;env)]
      `(when-not ~x
         (let [sep#  (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;line.separator&quot;&lt;/span&gt;)
               form# &apos;~x]
           (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (AssertionError. (apply str &lt;span class=&quot;code-quote&quot;&gt;&quot;Assert failed: &quot;&lt;/span&gt; (pr-str form#) sep#
                                          (map (fn [[k# v#]] 
                                                 (when (some #{k#} (flatten form#)) 
                                                   (str &lt;span class=&quot;code-quote&quot;&gt;&quot;\t&quot;&lt;/span&gt; k# &lt;span class=&quot;code-quote&quot;&gt;&quot; : &quot;&lt;/span&gt; v# sep#))) 
                                               ~bindings)))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="26087" author="stu" created="Tue, 4 Jan 2011 20:31:17 -0600"  >&lt;p&gt;I am holding off on this until we have more solidity around &lt;a href=&quot;http://dev.clojure.org/display/design/Error+Handling&quot;&gt;http://dev.clojure.org/display/design/Error+Handling&lt;/a&gt;. (Considering, for instance, having &lt;b&gt;all&lt;/b&gt; exceptions thrown from Clojure provide access to locals.)&lt;/p&gt;

&lt;p&gt;When my pipe dream fades I will come back and screen this before the next release.&lt;/p&gt;</comment>
                    <comment id="26194" author="stu" created="Fri, 28 Jan 2011 13:14:13 -0600"  >&lt;p&gt;Why try to guess what someone wants to do with the locals (or any other context, for that matter) when you can specify a callback (see below). This would have been useful last week when I had an assertion that failed only on the CI box, where no debugger is available.&lt;/p&gt;

&lt;p&gt;Rich, at the risk of beating a dead horse, I still think this is a good idea. Debuggers are not always available, and this is an example of where a Lisp is intrinsically capable of providing better information than can be had in other environments. If you want a patch for the code below please mark waiting on me, otherwise please decline this ticket so I stop looking at it. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def ^:dynamic *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;-handler* nil)

(defn ^{:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;} local-bindings
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Produces a map of the names of local bindings to their values.&quot;&lt;/span&gt;
  [env]
  (let [symbols (map key env)]
    (zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols)))

(defmacro &lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;
  [x]
  (when *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;*
    (let [bindings (local-bindings &amp;amp;env)]
      `(when-not ~x
         (let [sep#  (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;line.separator&quot;&lt;/span&gt;)
               form# &apos;~x]
           (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; *&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;-handler*
             (*&lt;span class=&quot;code-keyword&quot;&gt;assert&lt;/span&gt;-handler* form# ~bindings)
             (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (AssertionError. (apply str &lt;span class=&quot;code-quote&quot;&gt;&quot;Assert failed: &quot;&lt;/span&gt; (pr-str form#) sep#
                                            (map (fn [[k# v#]] 
                                                   (when (some #{k#} (flatten form#)) 
                                                     (str &lt;span class=&quot;code-quote&quot;&gt;&quot;\t&quot;&lt;/span&gt; k# &lt;span class=&quot;code-quote&quot;&gt;&quot; : &quot;&lt;/span&gt; v# sep#))) 
                                                 ~bindings))))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="26461" author="jweiss" created="Fri, 27 May 2011 08:16:40 -0500"  >&lt;p&gt;A slight improvement I made in my own version of this code:  flatten does not affect set literals.  So if you do (assert (some #{x} &lt;span class=&quot;error&quot;&gt;&amp;#91;a b c d&amp;#93;&lt;/span&gt;))  the value of x will not be printed.  Here&apos;s a modified flatten that does the job:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;(defn symbols [sexp]
  &quot;Returns just the symbols from the expression, including those
   inside literals (sets, maps, lists, vectors).&quot;
  (distinct (filter symbol? (tree-seq coll? seq sexp))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="29961" author="jafingerhut" created="Sun, 18 Nov 2012 01:06:07 -0600"  >&lt;p&gt;Attaching git format patch clj-415-assert-prints-locals-v1.txt of Stuart Halloway&apos;s version of this idea.  I&apos;m not advocating it over the other variations, just getting a file attached to the JIRA ticket.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11684" name="clj-415-assert-prints-locals-v1.txt" size="1581" author="jafingerhut" created="Sun, 18 Nov 2012 01:06:07 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-993] `range` reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-993</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Rich mentioned in IRC today he&apos;d welcome a reducer implementation of clojure.core/range. Now that I&apos;ve figured out how to do iterate, I figure I&apos;ll knock out range as well by the end of the night. Just opening the issue early to announce my intentions to anyone else interested in doing it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15431">CLJ-993</key>
            <summary>`range` reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 May 2012 21:47:40 -0500</created>
                <updated>Sat, 18 Aug 2012 19:18:48 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28443" author="amalloy" created="Thu, 10 May 2012 22:45:49 -0500"  >&lt;p&gt;Implemented range. A separate commit is attached, making iterate and range also Seqable, since I&apos;m not sure if that&apos;s desired. Apply it or not, as you prefer.&lt;/p&gt;</comment>
                    <comment id="28457" author="jasonjckn" created="Fri, 11 May 2012 11:20:32 -0500"  >&lt;p&gt;Range should be foldable&lt;/p&gt;</comment>
                    <comment id="28462" author="amalloy" created="Fri, 11 May 2012 12:53:50 -0500"  >&lt;p&gt;Yep, so it should. Time for me to dig into the folding implementations!&lt;/p&gt;</comment>
                    <comment id="28464" author="amalloy" created="Fri, 11 May 2012 14:42:20 -0500"  >&lt;p&gt;Should I fold (har har) all of these commits into one? I don&apos;t know what is preferred on JIRA, and I also don&apos;t know whether range/iterate should be seqable or if I should just drop the second commit.&lt;/p&gt;</comment>
                    <comment id="28465" author="richhickey" created="Fri, 11 May 2012 15:21:42 -0500"  >&lt;p&gt;Yes, please merge these together, it&apos;s hard to see otherwise (I can barely read diffs as is &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. range and iterate shouldn&apos;t be novel in reducers, but just enhanced return values of core fns. The enhancement (e.g. protocol extensions) &lt;em&gt;can&lt;/em&gt; come by requiring reducers since it can&apos;t be leveraged without it. Also, I&apos;m not sure how I feel about an allocating protocol for &apos;splittable&apos; - I&apos;ve avoided it thus far.&lt;/p&gt;</comment>
                    <comment id="28466" author="amalloy" created="Fri, 11 May 2012 15:30:02 -0500"  >&lt;p&gt;So you want clojure.core/range to return some object (a Range), which implements Counted and Seqable (but isn&apos;t just a lazy-seq), and then inside of clojure.core.reducers I extend CollReduce and CollFold to that type? Okay, I can do that.&lt;/p&gt;

&lt;p&gt;I don&apos;t quite follow what you mean by an allocating protocol. I see your point that my fold-by-halves which takes a function in is analogous to a protocol with a single function, but it doesn&apos;t allocate anything more than foldvec already does - I just pulled that logic out so that the fork/join fiddly work doesn&apos;t need to be repeated in everything foldable. Do you have an alternative recommendation, or is it just something that makes you uneasy and you&apos;re still thinking about?&lt;/p&gt;</comment>
                    <comment id="28468" author="richhickey" created="Fri, 11 May 2012 15:52:39 -0500"  >&lt;p&gt;While vector-fold allocs subvecs, the halving-fn must return a new vector, for all implementations. It&apos;s ok, I don&apos;t think it&apos;s likely to dominate (since fj needs new closures anyway). Please proceed, but keep range and iterate in core. They are sources, not transformers, and only transformers (which must be different from their seq-based counterparts) must reside in reducers. Thanks!&lt;/p&gt;</comment>
                    <comment id="28470" author="stuart.sierra" created="Fri, 11 May 2012 17:01:30 -0500"  >&lt;p&gt;One big patch file is preferred, although that file may contain multiple commits if that makes the intent clearer.&lt;/p&gt;

&lt;p&gt;When adding a patch, update the description of the ticket to indicate which file is the most recent. Leave old patch files around for historical reference.&lt;/p&gt;</comment>
                    <comment id="28472" author="amalloy" created="Fri, 11 May 2012 21:00:47 -0500"  >&lt;p&gt;It&apos;s looking harder than I expected to move iterate and range into core.clj. My plan was to just have them implement Seqable, which is easy enough, but currently they are actually instances of ISeq, because they inherit from LazySeq. A bunch of code all over the place (eg, to print them in the repl) depends on them being ISeq, so I can&apos;t just ignore it. To implement all of these methods (around thirty) would take a large amount of code, which can&apos;t easily be shared between Iteration, Range, and any future reducible sources that are added to core.clj.&lt;/p&gt;

&lt;p&gt;I could write a macro like (defseq Range &lt;span class=&quot;error&quot;&gt;&amp;#91;start end step&amp;#93;&lt;/span&gt; Counted (count &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; ...) ...) which takes normal deftype args and also adds in implementations for ISeq, Collection, and so forth in terms of (.seq this), which will be a LazySeq. However, this seems like a somewhat awkward approach that I would be a little embarrassed to clutter up core.clj with. If anyone has a better alternative I will be pleased to hear it. In the mean time, I will go ahead with this macro implementation, in case it turns out to be the best choice.&lt;/p&gt;</comment>
                    <comment id="28473" author="amalloy" created="Fri, 11 May 2012 23:52:28 -0500"  >&lt;p&gt;&amp;#8211; This patch subsumes all previous patches to this issue and to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-992&quot; title=&quot;`iterate` reducer&quot;&gt;CLJ-992&lt;/a&gt; &amp;#8211;&lt;/p&gt;

&lt;p&gt;In order to create an object which is both a lazy sequence and a&lt;br/&gt;
reducible source, I needed to add a macro named defseq to core_deftype.&lt;br/&gt;
It is basically a reimplementation of clojure.lang.LazySeq as a clojure&lt;br/&gt;
macro, so that I can &quot;mix in&quot; lazy-sequence functions into a new class&lt;br/&gt;
with whatever methods are needed for reducing and folding.&lt;/p&gt;

&lt;p&gt;If we wanted, we could use this macro to implement lazy-seq in clojure instead of in java, but that&apos;s unrelated so I didn&apos;t do that in this patch.&lt;/p&gt;

&lt;p&gt;As noted in a previous comment, defseq may not be the right approach, but this works until something better is suggested.&lt;/p&gt;</comment>
                    <comment id="28474" author="amalloy" created="Fri, 11 May 2012 23:58:40 -0500"  >&lt;p&gt;I accidentally included an implementation of drop-while in this patch, which I was playing around with to make sure I understood how this all works. I guess I&apos;ll leave it in for the moment, since it works and is useful, but I can remove it, or move it to a new JIRA ticket, if it&apos;s not wanted at this time.&lt;/p&gt;</comment>
                    <comment id="28479" author="richhickey" created="Sat, 12 May 2012 10:52:52 -0500"  >&lt;p&gt;Ok, I think this patch is officially off the rails. There must be a better way. Let&apos;s start with: touching core/deftype and reimplementing lazy-seq as a macro are off the table. The return value of range doesn&apos;t have to &lt;em&gt;be&lt;/em&gt; a LazySeq, it has to be a lazy seq, .e.g. implement ISeq (7 methods, not 30) which it can do by farming out to its existing impl. It can also implement some new interface for use by the reducer logic. There is also still clojure.lang.Range still there, which is another approach. Please take an extremely conservative approach in these things.&lt;/p&gt;</comment>
                    <comment id="28480" author="amalloy" created="Sat, 12 May 2012 17:53:26 -0500"  >&lt;p&gt;Okay, thanks for the feedback - I&apos;m glad I went into that last patch knowing it was probably wrong &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. I thought I would need to implement the java collection interfaces that LazySeq does, eg java.util.List, in order to avoid breaking interop functions like (defn range-list &lt;span class=&quot;error&quot;&gt;&amp;#91;n&amp;#93;&lt;/span&gt; (ArrayList. (range n))). If it&apos;s sufficient to implement ISeq (and thus IPersistentCollection), then that&apos;s pretty manageable. &lt;/p&gt;

&lt;p&gt;It&apos;s still an unpleasant chunk of boilerplate for each new source, though; would you welcome a macro like defseq if I didn&apos;t put it in core_deftype? If so, it seems like it might as well implement the interop interfaces; if not, I can skip them and implement the 7 (isn&apos;t it more like 9?) methods in ISeq, IPersistentCollection, and Seqable for each new source type.&lt;/p&gt;

&lt;p&gt;Thanks for pointing out clojure.lang.Range to me - I didn&apos;t realize we had it there. Of course with implementation inheritance it would be easy to make Range, Iteration, etc inherit from LazySeq and just extend protocols from them. But that means moving functionality out of clojure and into java, which I didn&apos;t think we&apos;d want to do.&lt;/p&gt;

&lt;p&gt;I&apos;ll put together a patch that just implements ISeq by hand for both of these new types, and attach it probably later today.&lt;/p&gt;</comment>
                    <comment id="28481" author="amalloy" created="Sat, 12 May 2012 19:49:45 -0500"  >&lt;p&gt;So I&apos;ve written a patch that implements ISeq, but not the java Collections interfaces, and it mostly works but there are definitely assumptions in some parts of clojure.core and clojure.lang that assume seqs are Collections. The most obvious to me (ie, it shows up when running mvn test) is RT/toArray - it tests for Collection, but never for ISeq, implying that it&apos;s not willing to handle an ISeq that is not also a collection. Functions which rely on toArray (eg to-array and vec) now fail.&lt;/p&gt;

&lt;p&gt;This patch subsumes all previous patches on this issue, but is not suitable for application because it leaves some failing tests behind - it is intended only for intermediate feedback.&lt;/p&gt;</comment>
                    <comment id="28488" author="richhickey" created="Sun, 13 May 2012 08:50:39 -0500"  >&lt;p&gt;It would be a great help if, time permitting, you could please write up the issues, challenges and options you&apos;ve discovered somewhere on the dev wiki (even a simple table would be fantastic). I realize this has been a challenging task, and at this point perhaps we should opt for the more modest reducers/range and reducers/iterate and leave the two worlds separate. I&apos;d like at some point to unify range, as there are many extant ranges it would be nice to be able to fold, as we can extant vectors.&lt;/p&gt;</comment>
                    <comment id="28489" author="jasonjckn" created="Sun, 13 May 2012 09:24:04 -0500"  >&lt;p&gt;Should r/range return something Seqable and Counted?&lt;/p&gt;

&lt;p&gt;If so, I&apos;ll do the same for r/repeat.&lt;/p&gt;</comment>
                    <comment id="28496" author="amalloy" created="Sun, 13 May 2012 13:59:42 -0500"  >&lt;p&gt;I&apos;ve sketched out a description of the issues and options. I&apos;m not very familiar with the dev wiki and couldn&apos;t figure out where was the right place to put this. &quot;release.next&quot; seems to still be about 1.4 issues, and I don&apos;t know if it&apos;s &quot;appropriate&quot; to create a whole new category for this. It&apos;s available &lt;a href=&quot;https://gist.github.com/1586b2460329dde1c374&quot;&gt;as a gist&lt;/a&gt; until a better home can be found for it.&lt;/p&gt;</comment>
                    <comment id="28575" author="amalloy" created="Wed, 23 May 2012 19:54:24 -0500"  >&lt;p&gt;Here&apos;s a single patch summing up the state Rich suggested &quot;rolling back&quot; to: separate r/range and r/iterate functions. I haven&apos;t heard any feedback since doing the writeup Rich asked for, so am not making any further progress at the moment; if something other than this patch is desired just let me know.&lt;/p&gt;</comment>
                    <comment id="29141" author="richhickey" created="Tue, 14 Aug 2012 14:07:11 -0500"  >&lt;p&gt;I prefer not to see the use of extend like this for new types. Perhaps this code is too DRY? Also, it does a lot in one patch which makes it hard to parse and accept. This adds Range, switches impl of vector folds etc. Can it be broken up into separate tickets that do each step that builds on the previous, e.g. one ticket could be: capture vector fold impl for reuse by similar things.&lt;/p&gt;</comment>
                    <comment id="29225" author="amalloy" created="Sat, 18 Aug 2012 18:19:54 -0500"  >&lt;p&gt;Okay, I should be able to split it up over the weekend. I&apos;ll also see about converting fold-by-halves into a function that is used by Range/Vector, rather than a function that gets extended onto them.&lt;/p&gt;</comment>
                    <comment id="29227" author="amalloy" created="Sat, 18 Aug 2012 19:18:48 -0500"  >&lt;p&gt;As requested, I have split up the large patch on this issue into four smaller tickets. The other three are: &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1045&quot; title=&quot;Generalize/refactor implementation of PersistentVector/coll-fold&quot;&gt;CLJ-1045&lt;/a&gt;, &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1046&quot; title=&quot;Drop-while as a reducer&quot;&gt;CLJ-1046&lt;/a&gt;, and &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-992&quot; title=&quot;`iterate` reducer&quot;&gt;CLJ-992&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1045&quot; title=&quot;Generalize/refactor implementation of PersistentVector/coll-fold&quot;&gt;CLJ-1045&lt;/a&gt; contains the implementation of fold-by-halves, and as such this patch cannot be applied until &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1045&quot; title=&quot;Generalize/refactor implementation of PersistentVector/coll-fold&quot;&gt;CLJ-1045&lt;/a&gt; is accepted. This ticket does not depend on the other two, but there will be minor merge conflicts if this is merged before them.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11246" name="0001-CLJ-993-implement-range-and-iterate-as-reducers.patch" size="7633" author="amalloy" created="Wed, 23 May 2012 19:54:24 -0500" />
                    <attachment id="11206" name="0001-CLJ-993-implement-range-and-iterate-as-reducers.patch" size="15264" author="amalloy" created="Fri, 11 May 2012 23:52:28 -0500" />
                    <attachment id="11193" name="0001-CLJ-993-implement-range-as-a-reducer.patch" size="2941" author="amalloy" created="Thu, 10 May 2012 22:45:49 -0500" />
                    <attachment id="11194" name="0002-Make-iterate-and-range-Seqable.patch" size="1193" author="amalloy" created="Thu, 10 May 2012 22:45:49 -0500" />
                    <attachment id="11203" name="0003-Implement-fold-for-Range-objects.patch" size="6204" author="amalloy" created="Fri, 11 May 2012 14:40:36 -0500" />
                    <attachment id="11210" name="just-iseq.patch" size="11691" author="amalloy" created="Sat, 12 May 2012 19:49:45 -0500" />
                    <attachment id="11447" name="range-reducer.patch" size="3740" author="amalloy" created="Sat, 18 Aug 2012 19:18:48 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-939] Exceptions thrown in the top level ns form are reported without file or line number</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-939</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If there is an error in the `ns` form, an exception is thrown, which is not caught in `load`.&lt;/p&gt;

&lt;p&gt;For example, with an invalid :only clause;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(ns clj14.myns
  (:use
   [clojure.core :only seq]))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This generates a &lt;tt&gt;Don&apos;t know how to create ISeq from: clojure.lang.Symbol&lt;/tt&gt; exception, with source file or line number.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15245">CLJ-939</key>
            <summary>Exceptions thrown in the top level ns form are reported without file or line number</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Feb 2012 12:01:03 -0600</created>
                <updated>Sat, 15 Dec 2012 07:50:03 -0600</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27869" author="hugoduncan" created="Sat, 25 Feb 2012 08:26:57 -0600"  >&lt;p&gt;Corrected patch&lt;/p&gt;</comment>
                    <comment id="27923" author="jafingerhut" created="Fri, 9 Mar 2012 09:26:18 -0600"  >&lt;p&gt;Patch 0001-report-load-exception-with-file-and-line.diff fails build.  Patch 0002-report-load-exception-with-file-and-line.diff applies, builds, and tests cleanly as of March 9, 2012.  Hugo has signed a CA.&lt;/p&gt;</comment>
                    <comment id="29603" author="jafingerhut" created="Fri, 5 Oct 2012 08:13:24 -0500"  >&lt;p&gt;clj-939-report-load-exceptions-with-file-and-line-patch-v2.txt dated Oct 5 2012 is intended to be an update to Hugo Duncan&apos;s patch 0002-report-load-exceptions-with-file-and-line.diff dated Feb 25 2012.  Because of Brandon Bloom&apos;s recently commited patch adding column numbers in addition to line numbers, this is not simply updating some lines of context, but I think it is correct.  It would be good if Hugo could take a look at it and confirm.&lt;/p&gt;</comment>
                    <comment id="29924" author="stuart.sierra" created="Fri, 9 Nov 2012 09:38:21 -0600"  >&lt;p&gt;Screened.&lt;/p&gt;

&lt;p&gt;The error messages are better than what we had before. The line/column numbers are not particularly informative, probably because &lt;tt&gt;ns&lt;/tt&gt; is a macro.&lt;/p&gt;</comment>
                    <comment id="29935" author="richhickey" created="Tue, 13 Nov 2012 15:37:13 -0600"  >&lt;p&gt;This patch doesn&apos;t change the reporting on any other (e.g. nested) exceptions? It looks like it might.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10958" name="0001-report-load-exceptions-with-file-and-line.diff" size="908" author="hugoduncan" created="Fri, 24 Feb 2012 12:01:03 -0600" />
                    <attachment id="10968" name="0002-report-load-exceptions-with-file-and-line.diff" size="907" author="hugoduncan" created="Sat, 25 Feb 2012 08:26:57 -0600" />
                    <attachment id="11538" name="clj-939-report-load-exceptions-with-file-and-line-patch-v2.txt" size="934" author="jafingerhut" created="Fri, 5 Oct 2012 08:13:24 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-899] Accept and ignore colon between key and value in map literals</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-899</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Original title was &apos;treat colons as whitespace&apos; which isn&apos;t a problem description but a (flawed) implementation approach&lt;/p&gt;

&lt;p&gt;For JSON compatibility&lt;br/&gt;
known problems when no spaces - x:true and y:false&lt;/p&gt;</description>
                <environment></environment>
            <key id="15079">CLJ-899</key>
            <summary>Accept and ignore colon between key and value in map literals</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Dec 2011 08:10:10 -0600</created>
                <updated>Wed, 19 Dec 2012 07:55:59 -0600</updated>
                                                                            <due></due>
                    <votes>4</votes>
                        <watches>9</watches>
                        <comments>
                    <comment id="27488" author="tsdh" created="Fri, 23 Dec 2011 03:22:05 -0600"  >&lt;p&gt;Discussed here: &lt;a href=&quot;https://groups.google.com/d/msg/clojure/XvJUzaY1jec/l8xEwlFl8EUJ&quot;&gt;https://groups.google.com/d/msg/clojure/XvJUzaY1jec/l8xEwlFl8EUJ&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27536" author="hiredman" created="Wed, 11 Jan 2012 14:23:12 -0600"  >&lt;p&gt;please no&lt;/p&gt;</comment>
                    <comment id="27576" author="tavisrudd" created="Mon, 16 Jan 2012 12:17:31 -0600"  >&lt;p&gt;Alan Malloy raises a good point in the google group discussion (&lt;a href=&quot;https://groups.google.com/d/msg/clojure/XvJUzaY1jec/aVpWBicwGhsJ&quot;&gt;https://groups.google.com/d/msg/clojure/XvJUzaY1jec/aVpWBicwGhsJ&lt;/a&gt;) about accidental confusion between trailing (or floating) and leading colons:&lt;br/&gt;
&quot;It isn&apos;t even as simple as &quot;letting them&lt;br/&gt;
be whitespace&quot;, because presumably you want (read-string &quot;{a: b}&quot;) to&lt;br/&gt;
result in (hash-map &apos;a &apos;b), but (read-string &quot;{a :b}&quot;) to result in&lt;br/&gt;
(hash-map &apos;a :b).&quot;&lt;/p&gt;

&lt;p&gt;This issue could be avoided by only treating a colon as whitespace when followed by a comma. As easy cut-paste of json seems the be the key motivation here, the commas are going to be there anyway: valid {&quot;v&quot;:, 1234} vs syntax error {a-key: should-be-a-keyword}.&lt;/p&gt;</comment>
                    <comment id="27578" author="alexbaranosky" created="Mon, 16 Jan 2012 17:23:41 -0600"  >&lt;p&gt;This would be visually confusing imo. &lt;/p&gt;</comment>
                    <comment id="27581" author="laurentpetit" created="Tue, 17 Jan 2012 17:01:00 -0600"  >&lt;p&gt;Please, oh please, no.&lt;/p&gt;</comment>
                    <comment id="27587" author="tavisrudd" created="Wed, 18 Jan 2012 14:40:46 -0600"  >&lt;p&gt;Er, brain fart. I was typing faster than I was thinking and put the comma in the wrong place.  In my head I meant the form following the colon would have to have a comma after it. Thus, {&quot;a-json-key&quot;: 1234, ...} would be valid while {&quot;a-json-key&quot;: was-supposed-to-be-a-keyword &quot;another-json-key&quot; foo} would complain about the colon being an Invalid Token.  I don&apos;t see the need for it, however.&lt;/p&gt;
</comment>
                    <comment id="27879" author="solussd" created="Mon, 27 Feb 2012 10:55:26 -0600"  >&lt;p&gt;Clojure already has reader syntax for a map. If we support JSON, do we also support ruby map literals? Seems like this addition would only add confusion, imo, given colons are used in keywords and keywords are frequently used in maps - e.g., when de-serializing from XML, or even JSON. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="27880" author="dnolen" created="Mon, 27 Feb 2012 11:19:53 -0600"  >&lt;p&gt;Clojure is no longer a language hosted only on the JVM. Clojure is also hosted on the CLR, and JavaScript. In particular ClojureScript can&apos;t currently easily deal with JSON literals - an extremely common (though problematic) data format. By allowing colon whitespace in map literals - Clojure data structures can effectively become an extensible JSON superset - giving the succinctness of JSON and the expressiveness of XML.&lt;/p&gt;

&lt;p&gt;+1 from me.&lt;/p&gt;</comment>
                    <comment id="29937" author="timmc" created="Tue, 13 Nov 2012 19:27:43 -0600"  >&lt;p&gt;Clojure is only hosted on the JVM; ClojureScript is hosted on JS VMs. If this is useful for CLJS, it should just be a CLJS feature.&lt;/p&gt;</comment>
                    <comment id="30209" author="mikera" created="Mon, 10 Dec 2012 23:51:24 -0600"  >&lt;p&gt;-1 for this whole idea: that way madness lies....&lt;/p&gt;

&lt;p&gt;If we keep adding syntactical oddities like this then the language will become unmaintainably complex. It&apos;s the exact opposite of simple to have lots of special cases and ambiguities that you have to remember.&lt;/p&gt;

&lt;p&gt;If people want to use JSON that is fine, but then the best approach use a specific JSON parser/writer, not just paste it into Clojure source and expect it to work. &lt;/p&gt;</comment>
                    <comment id="30213" author="laczoka" created="Tue, 11 Dec 2012 04:54:16 -0600"  >&lt;p&gt;-1 for reasons mentioned by Allan Malloy and Mike Anderson&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1136] Type hinting for array classes does not work in binding forms</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1136</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Type hints don&apos;t work as expected in binding forms. &lt;/p&gt;

&lt;p&gt;The following form results in a reflection warning:&lt;/p&gt;

&lt;p&gt;    (let [^{:tag (Class/forName &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;Ljava.lang.Object;&amp;quot;)} a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (aget a 0))&lt;/p&gt;

&lt;p&gt;However, hinting does appear to work correctly on vars:&lt;/p&gt;

&lt;p&gt;    (def ^{:tag (Class/forName &quot;[Ljava.lang.Object;&quot;)} a (make-array Object 2))&lt;br/&gt;
    (aget a 0) ;; no reflection warning&lt;/p&gt;</description>
                <environment>replicated on OpenJDK 7u9 on Ubuntu 12.04, and Hotspot 1.6.0_37 on OSX Lion</environment>
            <key id="15911">CLJ-1136</key>
            <summary>Type hinting for array classes does not work in binding forms</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="lvanderhart">Luke VanderHart</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Thu, 20 Dec 2012 14:59:58 -0600</created>
                <updated>Fri, 21 Dec 2012 11:09:56 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30272" author="gshayban" created="Thu, 20 Dec 2012 22:51:22 -0600"  >&lt;p&gt;It&apos;s a little more insidious than type hinting: the compiler doesn&apos;t evaluate metadata in the binding vec.&lt;/p&gt;

&lt;p&gt;This doesn&apos;t throw the necessary exception...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:foo (Class/forName &amp;quot;not real&amp;quot;)} bar 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  bar)&lt;/p&gt;

&lt;p&gt;neither this...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{gyorgy ligeti} a 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  a)&lt;/p&gt;

&lt;p&gt;Gyorgy Ligeti never resolves.&lt;/p&gt;

&lt;p&gt;These two equivalent examples don&apos;t reflect: &lt;br/&gt;
(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^objects a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;a ^objects (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;
</comment>
                    <comment id="30275" author="gshayban" created="Fri, 21 Dec 2012 11:09:56 -0600"  >&lt;p&gt;On only the left-hand side of a local binding, metadata on a symbol is not analyzed or evaluated.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1108] Allow to specify an Executor instance to be used with future-call</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1108</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This adds an arity to future-call that expects a java.util.concurrent/ExecutorService instance to be used instead of clojure.lang.Agent/soloExecutor. &lt;/p&gt;</description>
                <environment></environment>
            <key id="15830">CLJ-1108</key>
            <summary>Allow to specify an Executor instance to be used with future-call</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="mpenet">Max Penet</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Nov 2012 06:32:18 -0600</created>
                <updated>Thu, 27 Dec 2012 02:25:43 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30328" author="jafingerhut" created="Wed, 26 Dec 2012 16:50:58 -0600"  >&lt;p&gt;Rich Hickey committed a change on Dec 21, 2012 to the future-call function that made the patch bac37b91230d8e4ab3a1e6042a6e8c4b7e9cbf53.patch dated Nov 18 2012 no longer apply cleanly.&lt;/p&gt;

&lt;p&gt;clj-1108-enhance-future-call-patch-v2.txt dated Dec 26 2012 is identical to that earlier patch, except it has been updated to apply cleanly to the latest master.&lt;/p&gt;

&lt;p&gt;It would be best if Max Penet, author of the earlier patch, could verify I&apos;ve merged his patch to the latest Clojure master correctly.&lt;/p&gt;</comment>
                    <comment id="30330" author="mpenet" created="Thu, 27 Dec 2012 02:25:43 -0600"  >&lt;p&gt;It&apos;s verified, it applies correctly to the latest master 00978c76edfe4796bd6ebff3a82182e235211ed0 .&lt;/p&gt;

&lt;p&gt;Thanks Andy. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11685" name="bac37b91230d8e4ab3a1e6042a6e8c4b7e9cbf53.patch" size="3316" author="mpenet" created="Sun, 18 Nov 2012 06:32:18 -0600" />
                    <attachment id="11779" name="clj-1108-enhance-future-call-patch-v2.txt" size="2953" author="jafingerhut" created="Wed, 26 Dec 2012 16:50:58 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1142] Incorrect divide-by-zero error with floating point numbers</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1142</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The unary call for clojure.core// treats a dividend of 0.0 differently than the binary call, likely due to inlining.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(/ 0.0) ;; java.lang.ArithmeticException: Divide by zero
(/ 1 0.0) ;;= Infinity
(/ 1 (identity 0.0)) ;; java.lang.ArithmeticException: Divide by zero&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15953">CLJ-1142</key>
            <summary>Incorrect divide-by-zero error with floating point numbers</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="timmc">Tim McCormack</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Jan 2013 16:00:00 -0600</created>
                <updated>Tue, 8 Jan 2013 23:22:50 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30413" author="timmc" created="Tue, 8 Jan 2013 23:22:50 -0600"  >&lt;p&gt;The relevant code seems to be this in clojure.lang.Numbers/divide:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(yops.isZero((&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;)y))
  &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArithmeticException(&lt;span class=&quot;code-quote&quot;&gt;&quot;Divide by zero&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Making Numbers/divide be more restrictive than double arithmetic seems like a bug; explicitly throwing an ArithmeticException instead of letting the JVM figure it just seems like more work than necessary.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-840] Add a way to access the current test var in :each fixtures for clojure.test</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-840</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When looking at (log) output from tests written with clojure.test, I would like to be able to identify the output associated with each test. A mechanism to expose the current test var within an :each fixture would enable this.&lt;/p&gt;

&lt;p&gt;One mechanism might be to bind a &lt;b&gt;test-var&lt;/b&gt; var with the current test var before calling the each-fixture-fn in clojure.test/test-all-vars.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14636">CLJ-840</key>
            <summary>Add a way to access the current test var in :each fixtures for clojure.test</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Sep 2011 11:20:56 -0500</created>
                <updated>Fri, 18 Jan 2013 09:47:53 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26912" author="stuart.sierra" created="Fri, 7 Oct 2011 16:33:31 -0500"  >&lt;p&gt;Or just pass the Var directly into the fixture. Vars are invokable.&lt;/p&gt;</comment>
                    <comment id="26913" author="hugoduncan" created="Fri, 7 Oct 2011 16:45:05 -0500"  >&lt;p&gt;I don&apos;t think that works, since the the function passed to the fixture is not the test var, but a function calling &lt;tt&gt;test-var&lt;/tt&gt; on the test var.&lt;/p&gt;</comment>
                    <comment id="27082" author="hugoduncan" created="Fri, 21 Oct 2011 22:34:24 -0500"  >&lt;p&gt;Patch to add &lt;b&gt;test-var&lt;/b&gt;&lt;/p&gt;</comment>
                    <comment id="27090" author="stuart.sierra" created="Tue, 25 Oct 2011 18:04:52 -0500"  >&lt;p&gt;&lt;tt&gt;&amp;#42;testing-vars&amp;#42;&lt;/tt&gt; already has this information, but it&apos;s not visible to the fixture functions because it gets bound inside &lt;tt&gt;test-var&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Perhaps the &lt;tt&gt;:each&lt;/tt&gt; fixture functions should be called in &lt;tt&gt;test-var&lt;/tt&gt; rather than in test-all-vars. (The namespace of a Var is available in its metadata.) But then we have to call &lt;tt&gt;join-fixtures&lt;/tt&gt; inside &lt;tt&gt;test-var&lt;/tt&gt; every time.&lt;/p&gt;</comment>
                    <comment id="27092" author="stuart.sierra" created="Tue, 25 Oct 2011 18:26:51 -0500"  >&lt;p&gt;Try this patch: clj840-2.diff.&lt;/p&gt;

&lt;p&gt;This makes &lt;tt&gt;&amp;#42;testing-vars&amp;#42;&lt;/tt&gt; visible to &lt;tt&gt;:each&lt;/tt&gt; fixture functions, which seems intuitively more correct.&lt;/p&gt;

&lt;p&gt;BUT it slightly changes the behavior of &lt;tt&gt;test-var&lt;/tt&gt;, which I&apos;m less happy about.&lt;/p&gt;</comment>
                    <comment id="27094" author="hugoduncan" created="Tue, 25 Oct 2011 20:07:27 -0500"  >&lt;p&gt;Might it make sense to provide a function on top of &lt;tt&gt;&lt;b&gt;testing-vars&lt;/b&gt;&lt;/tt&gt; to return the current test-var?&lt;/p&gt;</comment>
                    <comment id="27177" author="stuart.sierra" created="Fri, 28 Oct 2011 09:14:58 -0500"  >&lt;p&gt;No, that function is &lt;tt&gt;first&lt;/tt&gt;&lt;/p&gt;</comment>
                    <comment id="27178" author="hugoduncan" created="Fri, 28 Oct 2011 11:31:05 -0500"  >&lt;p&gt;I agree with having the dynamic vars as part of the extension interface, but would have thought that having a function for use when writing tests would have been cleaner. Just my 2c.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10495" name="add-test-var.diff" size="2970" author="hugoduncan" created="Fri, 21 Oct 2011 22:34:24 -0500" />
                    <attachment id="10497" name="clj840-2.diff" size="2366" author="stuart.sierra" created="Tue, 25 Oct 2011 18:26:51 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-825] Protocol implementation inconsistencies </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-825</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There seems to be some inconsistencies when implementing protocols that have multi arity functions depending on how the protocol is implemented. I have attached a clj file illustrating this. The short version is that multi arity must be defined as such w/ defrecord:&lt;/p&gt;

&lt;p&gt;(defrecord Zomg []&lt;br/&gt;
  SomeProto&lt;br/&gt;
  (hello &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt; 1)&lt;br/&gt;
  (hello &lt;span class=&quot;error&quot;&gt;&amp;#91;_ _&amp;#93;&lt;/span&gt; 1))&lt;/p&gt;

&lt;p&gt;And as such with extend-type&lt;/p&gt;

&lt;p&gt;(extend-type Object&lt;br/&gt;
  SomeProto&lt;br/&gt;
  (hello&lt;br/&gt;
    (&lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt; 1)&lt;br/&gt;
    (&lt;span class=&quot;error&quot;&gt;&amp;#91;_ _&amp;#93;&lt;/span&gt; 1)))&lt;/p&gt;

&lt;p&gt;I have only tested defrecord &amp;amp; extend-type. I am unsure how it works with deftype and extend-protocol.&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="14570">CLJ-825</key>
            <summary>Protocol implementation inconsistencies </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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="carllerche">Carl Lerche</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Aug 2011 12:35:38 -0500</created>
                <updated>Mon, 8 Aug 2011 12:35:38 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                                <attachments>
                    <attachment id="10310" name="scribbles.clj" size="816" author="carllerche" created="Mon, 8 Aug 2011 12:35:38 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1045] Generalize/refactor implementation of PersistentVector/coll-fold</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1045</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Vector currently contains a specialized implementation of the folding algorithm &quot;split the collection in half until the pieces are small enough&quot;. The attached commit lifts out the general strategy so that it can be reused by other collection types amenable to splitting.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-993&quot; title=&quot;`range` reducer&quot;&gt;CLJ-993&lt;/a&gt; depends on this patch, as it uses the new fold-by-halves function.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15635">CLJ-1045</key>
            <summary>Generalize/refactor implementation of PersistentVector/coll-fold</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Aug 2012 19:06:24 -0500</created>
                <updated>Fri, 25 Jan 2013 14:29:31 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30481" author="jafingerhut" created="Fri, 25 Jan 2013 14:29:31 -0600"  >&lt;p&gt;clj-1045-fold-by-halves-patch-v2.txt dated Jan 25 2013 is identical to fold-by-halves.patch dated Aug 18 2012, except it updates one line of context changed by a recent commit to Clojure master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11817" name="clj-1045-fold-by-halves-patch-v2.txt" size="2748" author="jafingerhut" created="Fri, 25 Jan 2013 14:29:31 -0600" />
                    <attachment id="11444" name="fold-by-halves.patch" size="2745" author="amalloy" created="Sat, 18 Aug 2012 19:06:24 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-978] bean unable to handle non-public classes</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-978</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Take the following Java as an example:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; IFoo {
  &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; getBar();
}

class FooImpl {
  &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; getBar() { &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;; }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As presently implemented, &lt;tt&gt;(bean my-foo)&lt;/tt&gt; tries to invoke the following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(. #&amp;lt;Method &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; java.lang.&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; FooImpl.getBar&amp;gt; (invoke my-foo nil))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, as &lt;tt&gt;FooImpl&lt;/tt&gt; is not public, this fails:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java.lang.IllegalAccessException: &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; clojure.core$bean$fn__1827$fn__1828 can not access a member of class FooImpl with modifiers &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;&quot;&lt;/span&gt;
 at sun.reflect.Reflection.ensureMemberAccess (Reflection.java:65)
    java.lang.reflect.Method.invoke (Method.java:588)
    clojure.core$bean$fn__1827$fn__1828.invoke (core_proxy.clj:382)
    clojure.core$bean$v__1832.invoke (core_proxy.clj:388)
    clojure.core$bean$fn__1838$thisfn__1839$fn__1840.invoke (core_proxy.clj:406)
    clojure.lang.LazySeq.sval (LazySeq.java:42)
    clojure.lang.LazySeq.seq (LazySeq.java:60)
    clojure.lang.RT.seq (RT.java:473)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, the same thing succeeds if we call &lt;tt&gt;#&amp;lt;Method public java.lang.String Foo.getBar&amp;gt;&lt;/tt&gt; rather than &lt;tt&gt;#&amp;lt;Method public java.lang.String FooImpl.getBar&amp;gt;&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15387">CLJ-978</key>
            <summary>bean unable to handle non-public classes</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="charles-dyfis-net">Charles Duffy</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2012 21:58:06 -0500</created>
                <updated>Thu, 29 Nov 2012 10:01:49 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28348" author="charles-dyfis-net" created="Mon, 30 Apr 2012 22:40:26 -0500"  >&lt;p&gt;Fix inaccurate documentation string&lt;/p&gt;</comment>
                    <comment id="28349" author="charles-dyfis-net" created="Tue, 1 May 2012 09:41:06 -0500"  >&lt;p&gt;Apache Commons Beanutils has their own implementation of this, at &lt;a href=&quot;http://www.docjar.com/html/api/org/apache/commons/beanutils/MethodUtils.java.html#771&quot;&gt;http://www.docjar.com/html/api/org/apache/commons/beanutils/MethodUtils.java.html#771&lt;/a&gt; &amp;#8211; notably, it tries to reflect a method with the given signature and catches the exception on failure, rather than iterating through the whole list. This may be a better approach &amp;#8211; I&apos;m unfamiliar with how the cost of exception handling compares with that of reflecting on the full method list of a class.&lt;/p&gt;</comment>
                    <comment id="28350" author="charles-dyfis-net" created="Tue, 1 May 2012 10:11:45 -0500"  >&lt;p&gt;Prior version of patch were missing new test suite files. Corrected.&lt;/p&gt;</comment>
                    <comment id="28383" author="jafingerhut" created="Fri, 4 May 2012 02:48:37 -0500"  >&lt;p&gt;Thanks for the patches, Charles.  Could you please create a patch in the desired format and attach that, and then remove the obsolete patches?  Instructions for creating a patch are under the heading &quot;Development&quot; at this page: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instructions for removing patches are under the heading &quot;Removing patches&quot; on that same page.&lt;/p&gt;</comment>
                    <comment id="28400" author="charles-dyfis-net" created="Sun, 6 May 2012 14:59:15 -0500"  >&lt;p&gt;Added a patch created per documented process.&lt;/p&gt;</comment>
                    <comment id="29597" author="gtrak" created="Thu, 4 Oct 2012 18:44:40 -0500"  >&lt;p&gt;I found in my code that it&apos;s possible to get a NPE if there is no read-method, for instance on the &lt;a href=&quot;http://docs.cascading.org/cascading/2.0/javadoc/cascading/flow/hadoop/HadoopFlow.html&quot;&gt;http://docs.cascading.org/cascading/2.0/javadoc/cascading/flow/hadoop/HadoopFlow.html&lt;/a&gt; object which has a setCascade method but no getter.  I fixed this in our code by inlining the is-zero-args check into the public-method definition and and-ing the whole thing with &apos;method&apos; like the original &apos;bean&apos; code, like so:&lt;/p&gt;

&lt;p&gt;public-method (and method (zero? (alength (. method (getParameterTypes))))&lt;br/&gt;
                  (or (and (java.lang.reflect.Modifier/isPublic (. c (getModifiers)))&lt;br/&gt;
                                                           method)&lt;br/&gt;
                                                      (public-version-of-method method)))&lt;/p&gt;</comment>
                    <comment id="30087" author="richhickey" created="Thu, 29 Nov 2012 10:01:49 -0600"  >&lt;p&gt;Charles, I think we should follow Apache BeanUtils on this. Exceptions not thrown are cheap. Ordinarily, exception for control flow are bad, but this is forced by bad design of reflection API.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11173" name="clojure--bean-support-for-private-implementation-classes-v3.diff" size="4976" author="charles-dyfis-net" created="Sun, 6 May 2012 14:59:15 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1079] Don&apos;t squash explicit :line and :column metadata in the MetaReader</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1079</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I have been experimenting with using &lt;a href=&quot;https://github.com/lynaghk/cljx&quot;&gt;cljx&lt;/a&gt; to produce Clojure and ClojureScript source from a single file.  This has gone well so far, with the exception that, due to the way the source transformation works, all of the linebreaks and other formatting is gone from the output.  There is an option to include the original &lt;tt&gt;:line&lt;/tt&gt; metadata in the output though, like so:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;;;This file autogenerated from 
;;
;;  src/cljx/com/foo/hosty.cljx
;;
^{:line 1} (ns com.foo.hosty)
^{:line 3} (defn ^{:clj &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;} system-hash [x] ^{:line 5} (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/identityHashCode x))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(Hopefully, such hackery won&apos;t be necessary in the future with &lt;a href=&quot;https://github.com/cgrand/sjacket&quot;&gt;sjacket&lt;/a&gt; or something like it...)&lt;/p&gt;

&lt;p&gt;Unfortunately, when read in using a &lt;tt&gt;LineNumberingPushbackReader&lt;/tt&gt;, code like this has its &lt;tt&gt;:line&lt;/tt&gt; metadata squashed by the line numbers coming from that.  A REPL-friendly example would be:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (meta (read (clojure.lang.LineNumberingPushbackReader.
                 (java.io.StringReader. &lt;span class=&quot;code-quote&quot;&gt;&quot;^{:line 66} ()&quot;&lt;/span&gt;))))
{:line 1}
=&amp;gt; (meta (read (java.io.PushbackReader.
                 (java.io.StringReader. &lt;span class=&quot;code-quote&quot;&gt;&quot;^{:line 66} ()&quot;&lt;/span&gt;))))
{:line 66}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The latter seems more correct to me (and is equivalent to &lt;tt&gt;read-string&lt;/tt&gt;).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15727">CLJ-1079</key>
            <summary>Don&apos;t squash explicit :line and :column metadata in the MetaReader</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Sat, 29 Sep 2012 17:12:45 -0500</created>
                <updated>Thu, 7 Feb 2013 12:35:21 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29578" author="cemerick" created="Sat, 29 Sep 2012 19:07:42 -0500"  >&lt;p&gt;{{&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1097&quot; title=&quot;node-seq for clojure.zip&quot;&gt;CLJ-1097&lt;/a&gt;.diff}} contains a fix for this issue, as well as a separate commit that eliminates a series of casts in order to improve readability in the area.&lt;/p&gt;</comment>
                    <comment id="29604" author="jafingerhut" created="Fri, 5 Oct 2012 08:23:47 -0500"  >&lt;p&gt;Chas, your patch doesn&apos;t apply cleanly to latest Clojure master as of Oct 5 2012.  I&apos;m not sure, but I think some recent commits to Clojure on Oct 4 2012 caused that.  I also take it as evidence of your awesomeness that you can write patches for tickets that haven&apos;t been filed yet &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="29605" author="cemerick" created="Fri, 5 Oct 2012 09:24:05 -0500"  >&lt;p&gt;&quot;patches for tickets that haven&apos;t been filed yet?&quot;&lt;/p&gt;

&lt;p&gt;Anyway, tweaking up this patch is a small price to pay for having column meta.  New {{&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1097&quot; title=&quot;node-seq for clojure.zip&quot;&gt;CLJ-1097&lt;/a&gt;.diff}} patch attached, applies clean on master as of now.  Otherwise same contents as in the original patch, except:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;the same dynamic is also applied to &lt;tt&gt;:column&lt;/tt&gt; metadata, now that it&apos;s available&lt;/li&gt;
	&lt;li&gt;the changes have been rebased into a single commit (including the elimination of the casts in &lt;tt&gt;MetaReader&lt;/tt&gt;, which were becoming so numerous that the code was less readable than most&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="29606" author="bronsa" created="Fri, 5 Oct 2012 09:39:21 -0500"  >&lt;p&gt;&quot;patches for tickets that haven&apos;t been filed yet?&quot;&lt;/p&gt;

&lt;p&gt;He was referring to the fact that you uploaded &quot;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1097&quot; title=&quot;node-seq for clojure.zip&quot;&gt;CLJ-1097&lt;/a&gt;.diff&quot; while the ticket is #1079 &lt;/p&gt;</comment>
                    <comment id="29607" author="cemerick" created="Fri, 5 Oct 2012 09:42:14 -0500"  >&lt;p&gt;Oh, hah! Twice now, even! One more data point recommending my having slight dyslexia or somesuch. :-P&lt;/p&gt;

&lt;p&gt;I&apos;ve replaced the attached patch with one that is named properly to avoid any later confusion.&lt;/p&gt;</comment>
                    <comment id="29612" author="cemerick" created="Sun, 7 Oct 2012 15:57:29 -0500"  >&lt;p&gt;Refreshed patch to apply cleanly to master after the recent &lt;a href=&quot;https://github.com/clojure/clojure/commit/65b5f73a9be30669116fcddb6ced9e60680532e5&quot;&gt;off by one patch for &lt;tt&gt;:column&lt;/tt&gt; metadata&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="29699" author="stu" created="Fri, 19 Oct 2012 15:12:42 -0500"  >&lt;p&gt;This feels backwards to me. If a special purpose tool wants to convey information via metadata, why does it use names that collide with those used by LispReader?&lt;/p&gt;</comment>
                    <comment id="29716" author="cemerick" created="Fri, 19 Oct 2012 19:36:17 -0500"  >&lt;p&gt;The information being conveyed is the same &lt;tt&gt;:line&lt;/tt&gt; and &lt;tt&gt;:column&lt;/tt&gt; metadata conveyed by &lt;tt&gt;LispReader&lt;/tt&gt; &#8212;&#160;in fact, that&apos;s where it comes from in the first place.&lt;/p&gt;

&lt;p&gt;Kibit (and cljx) is essentially an out-of-band source transformation tool.  Given an input like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(ns com.foo.hosty)

(defn ^:clj system-hash
  [x]
 (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/identityHashCode x))

(defn ^:cljs system-hash
  [x]
  (goog/getUid x))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&#8230;it produces two files, a &lt;tt&gt;.clj&lt;/tt&gt; for Clojure, and a &lt;tt&gt;.cljs&lt;/tt&gt; for ClojureScript.  (The first code listing in the ticket description is the former.)&lt;/p&gt;

&lt;p&gt;However, because there&apos;s no way to transform Clojure code/data without losing formatting, anything that depends on line/column numbers (stack traces, stepping debuggers) is significantly degraded.  If &lt;tt&gt;LispReader&lt;/tt&gt; were to defer to &lt;tt&gt;:line&lt;/tt&gt; and &lt;tt&gt;:column&lt;/tt&gt; metadata already available on the loaded forms (there when the two generated files are spit out with &lt;tt&gt;&amp;#42;print-meta&amp;#42;&lt;/tt&gt; on), this would not be the case.&lt;/p&gt;</comment>
                    <comment id="30562" author="jafingerhut" created="Thu, 7 Feb 2013 08:47:49 -0600"  >&lt;p&gt;clj-1079-patch-v2.txt dated Feb 7 2013 is identical to Chas&apos;s &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1079&quot; title=&quot;Don&amp;#39;t squash explicit :line and :column metadata in the MetaReader&quot;&gt;CLJ-1079&lt;/a&gt;.diff dated Oct 7 2012, except it applies cleanly to latest master.  I believe the only difference is that some white space in the context lines is updated.&lt;/p&gt;</comment>
                    <comment id="30566" author="jafingerhut" created="Thu, 7 Feb 2013 12:35:08 -0600"  >&lt;p&gt;Sorry for the noise.  I&apos;ve removed clj-1079-patch-v2.txt mentioned in the previous comment, because I learned that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1079&quot; title=&quot;Don&amp;#39;t squash explicit :line and :column metadata in the MetaReader&quot;&gt;CLJ-1079&lt;/a&gt;.diff dated Oct 7 2012 applies cleanly to latest master and passes all tests if you use this command to apply it.&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1079&quot; title=&quot;Don&amp;#39;t squash explicit :line and :column metadata in the MetaReader&quot;&gt;CLJ-1079&lt;/a&gt;.diff&lt;/p&gt;

&lt;p&gt;I will update the JIRA workflow page instructions for applying patches to mention this, too, because there are multiple patches that fail without --ignore-whitespace, but apply cleanly with that option.  That will eliminate the need to update patches merely for whitespace changes.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11542" name="CLJ-1079.diff" size="4665" author="cemerick" created="Sun, 7 Oct 2012 15:57:29 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-859] Built in dynamic vars don&apos;t have :dynamic metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-859</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;m sure &apos;built in&apos; is probably not the right term here, but I&apos;m not sure what these are called.&lt;/p&gt;

&lt;p&gt;I ran into this issue earlier today while fixing a bug in clojail. Built in vars, particularly ones listed here without a source link: &lt;a href=&quot;http://clojure.github.com/clojure/clojure.core-api.html&quot;&gt;http://clojure.github.com/clojure/clojure.core-api.html&lt;/a&gt;, do not have :dynamic metadata despite being dynamic. This includes &amp;#42;in&amp;#42;, &amp;#42;out&amp;#42;, and &amp;#42;err&amp;#42; among others. Here are some examples:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (meta #&apos;*err*)
{:ns #&amp;lt;Namespace clojure.core&amp;gt;, :name *err*, :added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;, :doc &lt;span class=&quot;code-quote&quot;&gt;&quot;A java.io.Writer object representing standard error &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; print operations.\n\n  Defaults to &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/err, wrapped in a PrintWriter&quot;&lt;/span&gt;}
user=&amp;gt; (meta #&apos;*in*)
{:ns #&amp;lt;Namespace clojure.core&amp;gt;, :name *in*, :added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;, :doc &lt;span class=&quot;code-quote&quot;&gt;&quot;A java.io.Reader object representing standard input &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; read operations.\n\n  Defaults to &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/in, wrapped in a LineNumberingPushbackReader&quot;&lt;/span&gt;}
user=&amp;gt; (meta #&apos;*out*)
{:ns #&amp;lt;Namespace clojure.core&amp;gt;, :name *out*, :added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;, :doc &lt;span class=&quot;code-quote&quot;&gt;&quot;A java.io.Writer object representing standard output &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; print operations.\n\n  Defaults to &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/out, wrapped in an OutputStreamWriter&quot;&lt;/span&gt;, :tag java.io.Writer}
user=&amp;gt; (meta #&apos;*ns*)
{:ns #&amp;lt;Namespace clojure.core&amp;gt;, :name *ns*, :added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt;, :doc &lt;span class=&quot;code-quote&quot;&gt;&quot;A clojure.lang.Namespace object representing the current namespace.&quot;&lt;/span&gt;, :tag clojure.lang.Namespace}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14710">CLJ-859</key>
            <summary>Built in dynamic vars don&apos;t have :dynamic metadata</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="anthonysimpson">Anthony Simpson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Oct 2011 04:39:09 -0500</created>
                <updated>Fri, 24 Feb 2012 12:41:31 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27072" author="bsmith.occs@gmail.com" created="Wed, 19 Oct 2011 12:03:11 -0500"  >&lt;p&gt;This recent discussion on the users list seems relevant: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/d5efd00c699f73a7&quot;&gt;Should intern obey :dynamic?&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It seems to boil down to this the information that a Var is dynamic (or not) is duplicated. Once as metadata with the key &lt;tt&gt;:dynamic&lt;/tt&gt;, and once as a boolean field on the Var class which implements Clojure&apos;s variables. This boolean can be obtained by calling the method &lt;tt&gt;isDynamic()&lt;/tt&gt; on the Var.&lt;/p&gt;

&lt;p&gt;The confusion arises because apparently &lt;tt&gt;:dynamic&lt;/tt&gt; and &lt;tt&gt;.isDynamic&lt;/tt&gt; can get out of sync with each other. &lt;tt&gt;.isDynamic&lt;/tt&gt; is the source of truth in this case.&lt;/p&gt;</comment>
                    <comment id="27073" author="bsmith.occs@gmail.com" created="Wed, 19 Oct 2011 12:18:22 -0500"  >&lt;p&gt;&lt;tt&gt;Compiler$Parser.parse(...)&lt;/tt&gt; finds the &lt;tt&gt;:dynamic&lt;/tt&gt; entry left in the metadata of the symbol by &lt;tt&gt;LispReader&lt;/tt&gt; and passes this on when creating a new &lt;tt&gt;DefExpr&lt;/tt&gt;, which in turn, generates the code that will call &lt;tt&gt;setDynamic(...)&lt;/tt&gt; on the var when it is created at runtime.&lt;/p&gt;

&lt;p&gt;As far as I can tell, the &lt;tt&gt;:dynamic&lt;/tt&gt; entry is irrelevant once that has occurred. It seems to be implemented only as a way to communicate (by way of the reader) with the compiler. Once the compiler&apos;s gotten the message, it isn&apos;t needed anymore. Keeping it around seems to just cause confusion.&lt;/p&gt;

&lt;p&gt;Dynamic vars created by the Java layer of Clojure core don&apos;t use the &lt;tt&gt;:dynamic&lt;/tt&gt; mechanism, they just &lt;tt&gt;setDynamic()&lt;/tt&gt; directly. That&apos;s why they don&apos;t have &lt;tt&gt;:dynamic&lt;/tt&gt; in their meta-data map. &lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Perhaps the compiler should elide &lt;tt&gt;:dynamic&lt;/tt&gt; from the metadata map available at runtime, since it has served its purpose.&lt;/li&gt;
	&lt;li&gt;Perhaps Clojure should supply the function &lt;tt&gt;dynamic?&lt;/tt&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;(defn dynamic? [^clojure.lang.Var v] (.isDynamic v))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Or, perhaps one might consider, for 1.4, replacing &lt;tt&gt;:dynamic&lt;/tt&gt; altogether and just enforcing the established naming convention: &lt;tt&gt;&amp;#42;earmuffs&amp;#42;&lt;/tt&gt; are dynamic, &lt;tt&gt;everything-else&lt;/tt&gt; isn&apos;t. (The compile warns about violations of this convention in 1.3.)&lt;/p&gt;</comment>
                    <comment id="27839" author="jafingerhut" created="Fri, 24 Feb 2012 11:39:08 -0600"  >&lt;p&gt;I recently noticed several lines like this one in core.clj.  Depending upon how many symbols are like this, perhaps this method could be used to add :dynamic metadata to symbols in core, along with a unit test to verify that all symbols in core have :dynamic if and only if .isDynamic returns true?&lt;/p&gt;</comment>
                    <comment id="27841" author="jafingerhut" created="Fri, 24 Feb 2012 12:41:31 -0600"  >&lt;p&gt;Ugh.  In my previous comment, by &quot;several lines like this one&quot; I meant to paste the following as an example:&lt;/p&gt;

&lt;p&gt;(alter-meta! #&apos;&lt;b&gt;agent&lt;/b&gt; assoc :added &quot;1.0&quot;)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1100] Reader literals cannot contain periods</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1100</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The LispReader tries to read a record instead of a literal if the tag contains periods:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1171&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1171&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which effectively means that reader tags cannot contain periods.&lt;br/&gt;
The EDN spec is unclear on this: &lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;edn supports extensibility through a simple mechanism. # followed immediately by a symbol starting with an alphabetic character indicates that that symbol is a tag.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;(issue opened: &lt;a href=&quot;https://github.com/edn-format/edn/issues/39&quot;&gt;https://github.com/edn-format/edn/issues/39&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;If periods are allowed, then the LispReader should first check to see if the tag is in &lt;tt&gt;&amp;#42;data-readers&amp;#42;&lt;/tt&gt; and only then if not try to initialize a Java class.&lt;/p&gt;

&lt;p&gt;I&apos;m happy to write the patch if this behavior is what is desired.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15812">CLJ-1100</key>
            <summary>Reader literals cannot contain periods</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="lynaghk">Kevin Lynagh</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Fri, 2 Nov 2012 23:57:22 -0500</created>
                <updated>Thu, 14 Feb 2013 15:04:53 -0600</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29904" author="steveminer@gmail.com" created="Tue, 6 Nov 2012 09:41:44 -0600"  >&lt;p&gt;The suggested patch (clj-1100-reader-literal-periods.patch) will break reading records when &amp;#42;default-data-reader-fn* is set.  Try adding a test like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(deftest tags-containing-periods-with-&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;
      ;; we need a predefined record &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; test so we (mis)use clojure.reflect.Field &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; convenience
      (let [v &lt;span class=&quot;code-quote&quot;&gt;&quot;#clojure.reflect.Field{:name \&quot;&lt;/span&gt;fake\&lt;span class=&quot;code-quote&quot;&gt;&quot; :type :fake :declaring-class \&quot;&lt;/span&gt;Fake\&lt;span class=&quot;code-quote&quot;&gt;&quot; :flags nil}&quot;&lt;/span&gt;]
        (binding [*&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-data-reader-fn* nil]
          (is (= (read-string v) #clojure.reflect.Field{:name &lt;span class=&quot;code-quote&quot;&gt;&quot;fake&quot;&lt;/span&gt; :type :fake :declaring-class &lt;span class=&quot;code-quote&quot;&gt;&quot;Fake&quot;&lt;/span&gt; :flags nil})))
        (binding [*&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-data-reader-fn* (fn [tag val] (assoc val :meaning 42))]
          (is (= (read-string v) #clojure.reflect.Field{:name &lt;span class=&quot;code-quote&quot;&gt;&quot;fake&quot;&lt;/span&gt; :type :fake :declaring-class &lt;span class=&quot;code-quote&quot;&gt;&quot;Fake&quot;&lt;/span&gt; :flags nil})))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="30085" author="richhickey" created="Thu, 29 Nov 2012 09:36:46 -0600"  >&lt;p&gt;The problem assessment is ok, but the resolution approach may not be. What happens should be based not upon what is in data-readers but whether or not the name names a class.&lt;/p&gt;

&lt;p&gt;Is the intent here to allow readers to circumvent records? I&apos;m not in favor of that.&lt;/p&gt;</comment>
                    <comment id="30098" author="steveminer@gmail.com" created="Thu, 29 Nov 2012 16:01:00 -0600"  >&lt;p&gt;New patch following Rich&apos;s comments.  The decision to read a record is now based on the symbol containing periods and not having a namespace.  Otherwise, it is considered a data reader tag.  User&lt;br/&gt;
defined tags are required to be qualified but they may now have periods in the name.  Tests added to show that&lt;br/&gt;
data readers cannot override record classes.  Note: Clojure-defined data reader tags may be unqualified, but they should not contain periods in order to avoid confusion with record classes.&lt;/p&gt;</comment>
                    <comment id="30100" author="steveminer@gmail.com" created="Thu, 29 Nov 2012 16:17:32 -0600"  >&lt;p&gt;I deleted my old patch and some comments referring to it to avoid confusion.&lt;/p&gt;

&lt;p&gt;In Clojure 1.5 beta 1, # followed by a qualified symbol with a period in the name is considered a record and causes an exception for the missing record class.  With the patch, only non-qualified symbols containing periods are considered records.  That allows user-defined qualified symbols with periods in their names to be used as data reader tags.&lt;/p&gt;</comment>
                    <comment id="30564" author="jafingerhut" created="Thu, 7 Feb 2013 09:05:09 -0600"  >&lt;p&gt;clj-1100-periods-in-data-reader-tags-patch-v2.txt dated Feb 7 2013 is identical to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012, except it applies cleanly to latest master.  The only change appears to be in some white space in the context lines.&lt;/p&gt;</comment>
                    <comment id="30567" author="jafingerhut" created="Thu, 7 Feb 2013 12:53:25 -0600"  >&lt;p&gt;I&apos;ve removed clj-1100-periods-in-data-reader-tags-patch-v2.txt mentioned in the previous comment, because I learned that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012 applies cleanly to latest master and passes all tests if you use this command to apply it.&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch&lt;/p&gt;

&lt;p&gt;I&apos;ve already updated the JIRA workflow and screening patches wiki pages to mention this --ignore-whitespace option.&lt;/p&gt;</comment>
                    <comment id="30585" author="jafingerhut" created="Wed, 13 Feb 2013 11:31:03 -0600"  >&lt;p&gt;Both of the current patches, &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch dated Nov 29 2012, and clj-1100-reader-literal-periods.patch dated Nov 6 2012, fail to apply cleanly to latest master (1.5.0-RC15) as of today, although they did last week.  Given all of the changes around read / read-string and edn recently, they should probably be evaluated by their authors to see how they should be updated.&lt;/p&gt;</comment>
                    <comment id="30600" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:23:26 -0600"  >&lt;p&gt;I deleted my patch: &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1100&quot; title=&quot;Reader literals cannot contain periods&quot;&gt;CLJ-1100&lt;/a&gt;-periods-in-data-reader-tags.patch.  clj-1100-reader-literal-periods.patch is clearly wrong, but the original author or an administrator has to delete that.&lt;/p&gt;</comment>
                    <comment id="30602" author="lynaghk" created="Thu, 14 Feb 2013 13:28:04 -0600"  >&lt;p&gt;I cannot figure out how to remove my attachment (clj-1100-reader-literal-periods.patch) in JIRA.&lt;/p&gt;</comment>
                    <comment id="30603" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 13:43:45 -0600"  >&lt;p&gt;Downarrow (popup) menu to the right of the &quot;Attachments&quot; section.  Choose &quot;manager attachments&quot;.&lt;/p&gt;</comment>
                    <comment id="30604" author="lynaghk" created="Thu, 14 Feb 2013 14:02:50 -0600"  >&lt;p&gt;Great, thanks Steve. Are you going to take another pass at this issue, or should I give it a go?&lt;/p&gt;</comment>
                    <comment id="30605" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 15:04:53 -0600"  >&lt;p&gt;Kevin, I&apos;m not planning to work on this right now as 1.5 is pretty much done.  It might be worthwhile discussing the issue a bit on the dev mailing list before working on a patch, but that&apos;s up to you.  I think my approach was correct, although now changes would have to be applied to both LispReader and EdnReader.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-366] Multiplatform command-line clojure launcher</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-366</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure needs a lower barrier of entry, long java commands scare people away! We need a script that conveniently launches a clojure repl or executes clojure files, much like the ruby/python/perl/other-favorite-interpreted-language behavior.&lt;/p&gt;

&lt;p&gt;NOTES:&lt;/p&gt;

&lt;p&gt;From Russ Olson (regarding Dejure/Dejour):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;I just fixed a bunch of bugs in the script, so make sure you get the latest from download from: &lt;a href=&quot;http://github.com/russolsen/dejour&quot;&gt;http://github.com/russolsen/dejour&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;After looking at jruby, scala, and groovy, it seems that the only way to do this right on windows is to write a C or C++ program and have a .exe.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="13763">CLJ-366</key>
            <summary>Multiplatform command-line clojure launcher</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 May 2010 08:06:00 -0500</created>
                <updated>Fri, 10 Dec 2010 10:13:46 -0600</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="23968" author="importer" created="Tue, 24 Aug 2010 08:21:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/366&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/366&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23969" author="importer" created="Tue, 24 Aug 2010 08:21:00 -0500"  >&lt;p&gt;stu said: Updating tickets (#370, #366, #374)&lt;/p&gt;</comment>
                    <comment id="26022" author="aaron" created="Fri, 10 Dec 2010 10:13:46 -0600"  >&lt;p&gt;Design page is at &lt;a href=&quot;http://dev.clojure.org/display/design/CLJ+Launcher&quot;&gt;http://dev.clojure.org/display/design/CLJ+Launcher&lt;/a&gt; and should be the basis for all future discussion&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-949] let undeclared exceptions continue unchecked</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-949</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The recent modifications regarding checked exceptions have eliminated the need for several try/catch blocks. This commit removes the blocks that no longer serve a purpose.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15269">CLJ-949</key>
            <summary>let undeclared exceptions continue unchecked</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="netguy204">Brian Taylor</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Mar 2012 19:22:15 -0600</created>
                <updated>Fri, 1 Mar 2013 09:37:59 -0600</updated>
                                    <version>Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27920" author="jafingerhut" created="Fri, 9 Mar 2012 09:06:22 -0600"  >&lt;p&gt;Patch 0001-let-undeclared-exceptions-continue-unchecked.patch applies cleanly to latest master as of March 9, 2012, and build and test without errors or warnings.  One author, Brian Taylor, has signed CA.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10982" name="0001-let-undeclared-exceptions-continue-unchecked.patch" size="8137" author="netguy204" created="Wed, 7 Mar 2012 19:22:15 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-705] Make sorted maps and sets implement j.u.SortedMap and SortedSet interfaces</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-705</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description></description>
                <environment></environment>
            <key id="14314">CLJ-705</key>
            <summary>Make sorted maps and sets implement j.u.SortedMap and SortedSet interfaces</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="richhickey">Rich Hickey</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jan 2011 12:53:42 -0600</created>
                <updated>Sat, 2 Jun 2012 14:29:11 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28684" author="jafingerhut" created="Sat, 2 Jun 2012 14:29:11 -0500"  >&lt;p&gt;This might be a duplicate of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-248&quot; title=&quot;Add support for subsets and submaps to sorted Sets/Maps&quot;&gt;CLJ-248&lt;/a&gt;.  See that one before working on this one, at least.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1076] pprint tests fail on Windows, expecting \n</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1076</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;New pprint tests were committed recently, but they fail on Windows because the tests check for \n, while pprint seems to output \r\n.  A log with the test failures is attached.&lt;/p&gt;

&lt;p&gt;The first failing commit is &lt;a href=&quot;https://github.com/clojure/clojure/commit/4ca0f7ea17888ba7ed56d2fde0bc2d6397e8e1c0&quot;&gt;https://github.com/clojure/clojure/commit/4ca0f7ea17888ba7ed56d2fde0bc2d6397e8e1c0&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Windows 7</environment>
            <key id="15719">CLJ-1076</key>
            <summary>pprint tests fail on Windows, expecting \n</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ivan">Ivan Kozik</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 02:34:19 -0500</created>
                <updated>Sat, 2 Mar 2013 14:51:46 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29575" author="jafingerhut" created="Sat, 29 Sep 2012 14:27:55 -0500"  >&lt;p&gt;Patch clj-1076-fix-tests-on-windows-patch-v1.txt dated Sep 29 2012 when applied to the particular commit that Ivan mentions causes the tests to pass when I run &quot;ant&quot; on a Windows 7 machine for me, and it continues to pass all tests on Mac OS X 10.6.8, too.&lt;/p&gt;

&lt;p&gt;I may be doing something wrong, but when I try to run &quot;ant&quot; to build and test on Windows 7 with latest Clojure master, with or without this patch, it fails right at the beginning of the tests because it can&apos;t find clojure.test.generative.  I&apos;m probably doing something wrong somewhere.  Ivan, would you be able to test this patch on Windows with the latest Clojure master to see if all tests pass for you now?&lt;/p&gt;</comment>
                    <comment id="29576" author="ivan" created="Sat, 29 Sep 2012 14:59:02 -0500"  >&lt;p&gt;All tests pass on Windows 7 here with the patch.&lt;/p&gt;

&lt;p&gt;Ant can&apos;t find my test.generative either because it isn&apos;t in my &quot;${maven.test.classpath}&quot;.  I put it in CLASSPATH and modified my build.xml like this:&lt;br/&gt;
&lt;br/&gt;
     &amp;lt;java classname=&quot;clojure.main&quot; failonerror=&quot;false&quot; fork=&quot;true&quot;&amp;gt;&lt;br/&gt;
       &amp;lt;classpath&amp;gt;&lt;br/&gt;
+        &amp;lt;pathelement path=&quot;${java.class.path}&quot;/&amp;gt;&lt;br/&gt;
         &amp;lt;pathelement path=&quot;${maven.test.classpath}&quot;/&amp;gt;&lt;/p&gt;</comment>
                    <comment id="30205" author="jafingerhut" created="Mon, 10 Dec 2012 13:33:33 -0600"  >&lt;p&gt;Just as a rough idea of how often people are hitting this issue, &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1123&quot; title=&quot;UNIX/Windows line endings - clojure.pprint tests cause failure in Windows build&quot;&gt;&lt;del&gt;CLJ-1123&lt;/del&gt;&lt;/a&gt; was opened on Dec 9 2012 and then closed when the ticket creator realized it was a duplicate of this one.&lt;/p&gt;</comment>
                    <comment id="30455" author="mikera" created="Fri, 18 Jan 2013 19:44:14 -0600"  >&lt;p&gt;Hi there is this likely to get fixed soon?&lt;/p&gt;

&lt;p&gt;I&apos;d like to help contribute some more patches to Clojure but it&apos;s tricky to do when I can&apos;t get the build to work &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="30456" author="jafingerhut" created="Fri, 18 Jan 2013 20:39:22 -0600"  >&lt;p&gt;I do not know if or when this patch will be committed to Clojure.&lt;/p&gt;

&lt;p&gt;I can tell you that you can apply the patch to your own local copy of the Clojure source code, and then develop new Clojure patches based upon that version.  The patch that fixes this problem only affects one test file, so it is unlikely to conflict with any changes you develop and submit.&lt;/p&gt;</comment>
                    <comment id="30467" author="mikera" created="Mon, 21 Jan 2013 06:36:19 -0600"  >&lt;p&gt;I can confirm this patch works fine for me on Windows with Maven/Eclipse&lt;/p&gt;

&lt;p&gt;Suggest this patch gets pushed through approval and applied ASAP? It&apos;s a pretty obvious fix that is breaking the build....&lt;/p&gt;</comment>
                    <comment id="30680" author="stu" created="Fri, 1 Mar 2013 12:44:25 -0600"  >&lt;p&gt;This patch is sloppy &amp;#8211; it makes unnecessary whitespace changes in several places.&lt;/p&gt;

&lt;p&gt;Would it be better to make the tests trailing whitespace agnostic?  Otherwise this feels like poking and prodding until the build box is happy.&lt;/p&gt;</comment>
                    <comment id="30686" author="jafingerhut" created="Sat, 2 Mar 2013 14:50:31 -0600"  >&lt;p&gt;Patch clj-1076-fix-tests-on-windows-patch-v2.txt dated Mar 2, 2013 fixes pprint tests on Windows in a different way: Removing all occurrences of carriage return (\r) characters in the output of pprint before comparing it to the expected string.&lt;/p&gt;

&lt;p&gt;I tried simply doing str/trim-newline to remove newlines and carriage returns at the end of the string, but that does not make the tests pass.  They still fail due to carriage returns in the middle of the string.&lt;/p&gt;</comment>
                    <comment id="30687" author="jafingerhut" created="Sat, 2 Mar 2013 14:51:46 -0600"  >&lt;p&gt;Presumptuously changing Approval from Incomplete back to None, since there is a new patch attached that should address the reason it was marked Incomplete.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11531" name="clj-1076-fix-tests-on-windows-patch-v1.txt" size="3039" author="jafingerhut" created="Sat, 29 Sep 2012 14:27:55 -0500" />
                    <attachment id="11886" name="clj-1076-fix-tests-on-windows-patch-v2.txt" size="1711" author="jafingerhut" created="Sat, 2 Mar 2013 14:50:31 -0600" />
                    <attachment id="11523" name="pprint_test_failures_01b4cb7156.txt" size="25618" author="ivan" created="Wed, 26 Sep 2012 02:34:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1180] defprotocol doesn&apos;t resolve tag classnames</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1180</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;defprotocol doesn&apos;t resolve tag classnames, this results in exceptions being thrown when the declared protocol uses as a tag an imported class that is not imported in the namespace that uses it.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (import &apos;clojure.lang.ISeq)&lt;br/&gt;
clojure.lang.ISeq&lt;br/&gt;
user=&amp;gt; (defprotocol p (^ISeq f &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt;))&lt;br/&gt;
p&lt;br/&gt;
user=&amp;gt; (ns x)&lt;br/&gt;
nil&lt;br/&gt;
x=&amp;gt; (defn x &lt;span class=&quot;error&quot;&gt;&amp;#91;y&amp;#93;&lt;/span&gt; (let &lt;span class=&quot;error&quot;&gt;&amp;#91;z (user/f y)&amp;#93;&lt;/span&gt; (inc z)))&lt;br/&gt;
CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: ISeq, compiling:(NO_SOURCE_PATH:4:33) &lt;/p&gt;</description>
                <environment></environment>
            <key id="16071">CLJ-1180</key>
            <summary>defprotocol doesn&apos;t resolve tag classnames</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Sun, 10 Mar 2013 14:15:31 -0500</created>
                <updated>Sun, 10 Mar 2013 17:56:10 -0500</updated>
                                    <version>Release 1.5</version>
                <version>Release 1.6</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11905" name="001-CLJ-1180.patch" size="3417" author="bronsa" created="Sun, 10 Mar 2013 15:41:44 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1181] clojure.pprint/code-dispatch breaks on certain types of anonymous functions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1181</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&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;(with-out-str 
  (with-pprint-dispatch code-dispatch 
                        (pp/pprint (read-string &quot;(fn* [x] x)&quot;))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;breaks because the format string here: &lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/pprint/dispatch.clj#L378&quot;&gt;https://github.com/clojure/clojure/blob/master/src/clj/clojure/pprint/dispatch.clj#L378&lt;/a&gt; expects a sequence. In the case of (fn* &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x) it is passed a symbol.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16074">CLJ-1181</key>
            <summary>clojure.pprint/code-dispatch breaks on certain types of anonymous functions</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="devn">Devin Walters</reporter>
                        <labels>
                    </labels>
                <created>Sun, 10 Mar 2013 16:40:11 -0500</created>
                <updated>Mon, 18 Mar 2013 17:40:31 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30795" author="hypirion" created="Mon, 18 Mar 2013 17:40:31 -0500"  >&lt;p&gt;I think the main &quot;issue&quot; here resides within the undocumented functionality of fn*. (fn* &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x) is a semantically working function, but (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x) expands into (fn* (&lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x)). Anonymous function literals expand into (fn* &lt;span class=&quot;error&quot;&gt;&amp;#91;gensyms&amp;#93;&lt;/span&gt; (...)), and as such, it also accepts expressions like (fn* &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x). Should pprint pretty print expressions which has used fn* directly, or should it &quot;just&quot; ignore it?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-865] Macroexpansion discards &amp;form metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-865</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As discussed in &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/2690cb6ca0e8beb8&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/2690cb6ca0e8beb8&lt;/a&gt; there is a &quot;surprise factor&quot; when type-hinting an expression that represents a macro, such as with (.length ^String (doto (identity &quot;x&quot;) prn)). Here the doto macro discards the metadata on &amp;amp;form, causing a reflective lookup. This has the effect that while expressions representing function calls can be type-hinted, expressions representing macros in general cannot. The doto macro could be rewritten to respect its &amp;amp;form metadata, but doing this for every macro in existence would be tedious and error-prone. Instead, I propose a change to the compiler, to cause macroexpansion to hang onto the metadata automatically.&lt;/p&gt;

&lt;p&gt;The first patch attached adds a test for the behavior I propose: this test fails. After applying the second patch, the test passes.&lt;/p&gt;

&lt;p&gt;There are a couple points that merit further consideration before accepting my patch:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I&apos;m not sure I actually got the Java code formatted correctly. My editor is not well-configured to get the clojure/core style right automatically.&lt;/li&gt;
	&lt;li&gt;My solution is to take the &amp;amp;form metadata, drop :line/:file keys, and then merge with the returned metadata, with &amp;amp;form taking precedence. I&apos;m not sure whether this is the right approach in all cases, even though it works for :tag metadata.&lt;/li&gt;
	&lt;li&gt;I achieved this with a change to the compiler, which makes it fairly heavy-weight. It should be possible to instead adjust defmacro if changes to the compiler are not desirable. However, I believe this would involve substantially more work and be harder to test (for example, multiple arities complicate things). It seems nicer to treat the macroexpansion as a black box and then make metadata tweaks to the result, rather than modifying their actual defmacro code.&lt;/li&gt;
	&lt;li&gt;If a macro expands to something that is not an IObj, such as an Integer, then my patch silently discards the caller&apos;s metadata. Would it be better to throw an exception?&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14901">CLJ-865</key>
            <summary>Macroexpansion discards &amp;form metadata</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                        <label>Compiler</label>
                    </labels>
                <created>Wed, 26 Oct 2011 15:19:11 -0500</created>
                <updated>Wed, 6 Jun 2012 17:29:38 -0500</updated>
                                                                            <due></due>
                    <votes>7</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="27176" author="amalloy" created="Fri, 28 Oct 2011 01:12:50 -0500"  >&lt;p&gt;So I went ahead and did the work of making this change in clojure.core/defmacro instead of clojure.lang.Compiler/macroexpand1. It was even worse than I expected: I didn&apos;t realize we don&apos;t yet have syntax-quote or apply at this stage in bootstrapping, so writing a non-trivial macroexpansion requires a huge amount of (list `foo (list `bar &apos;local-name)) and so forth.&lt;/p&gt;

&lt;p&gt;I&apos;m sure the version I wrote is not optimal, but it seemed simpler to piggyback on defn, and then use alter-var-root to shim the metadata management in, than it would have been to expand to the correct thing in the first place.&lt;/p&gt;

&lt;p&gt;Anyway, attached patch #3 could be applied instead of #2 to resolve the issue in clojure.core instead of clojure.lang. The tests added in patch #1 pass either way.&lt;/p&gt;</comment>
                    <comment id="27286" author="amalloy" created="Sun, 13 Nov 2011 20:29:06 -0600"  >&lt;p&gt;I realized I can do this with a named private function instead of an anonymous function, reducing the amount of mess defmacro itself has to generate. Patch 4 is, I think, strictly better than Patch 3, if a Clojure implementation is preferred to one in Java.&lt;/p&gt;</comment>
                    <comment id="27331" author="chouser@n01se.net" created="Sun, 20 Nov 2011 22:43:45 -0600"  >&lt;p&gt;I prefer patch 0002 in Java over either 0003 or 0004. Patch 0002 keeps the knowledge of how to invoke macro fns (specifically the extra &amp;amp;form and &amp;amp;env args) in one place, macroexpand1 rather than duplicating that knowledge in core.clj as well. Note patch 0001 is just tests.&lt;/p&gt;

&lt;p&gt;The proposed default macroexpansion behavior is more useful than what we currently have, but there are two details I&apos;d like to think about a bit more:&lt;/p&gt;

&lt;p&gt;1) In exchange for a more useful default, macro writers lose the ability to consume their &amp;amp;form metadata and have control over the resulting form metadata without the &amp;amp;form metadata overridding it. That is, macros are no longer in complete control of their output form.&lt;/p&gt;

&lt;p&gt;2) Rule (1) above has hardcoded exceptions for :line and :file, where &amp;amp;form metadata is unable to override the results returned by the macro.&lt;/p&gt;</comment>
                    <comment id="28676" author="amalloy" created="Fri, 1 Jun 2012 14:04:02 -0500"  >&lt;p&gt;This patch incorporates all previous patches to this issue.&lt;/p&gt;

&lt;p&gt;On the clj-dev mailing list, Andy Fingerhut suggested a new metadata key for allowing the macro author to specify &quot;I&apos;ve looked at their &amp;amp;form metadata, and this form is exactly what I want to expand to, please don&apos;t change the metadata any further.&quot; I&apos;ve implemented this, and I think it addresses Chouser&apos;s concern about needing a way to &quot;break out&quot; of the improved-default behavior.&lt;/p&gt;

&lt;p&gt;One open question is, is :explicit-meta the right key to use? I spent some time tracking down a bug caused by my forgetting the keyword and using :explicit-metadata in my test; perhaps something more difficult to get confused by is available.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10590" name="0001-Add-test-for-macroexpansion-metadata-preservation.patch" size="1258" author="amalloy" created="Wed, 26 Oct 2011 15:19:11 -0500" />
                    <attachment id="10591" name="0002-Preserve-form-metadata-on-macroexpanded-forms.patch" size="1571" author="amalloy" created="Wed, 26 Oct 2011 15:19:11 -0500" />
                    <attachment id="10592" name="0003-Make-defmacro-preserve-form-metadata.patch" size="3898" author="amalloy" created="Fri, 28 Oct 2011 01:12:50 -0500" />
                    <attachment id="10703" name="0004-Another-stab-at-implementing-this.patch" size="3397" author="amalloy" created="Sun, 13 Nov 2011 20:29:06 -0600" />
                    <attachment id="11281" name="updated.patch" size="3824" author="amalloy" created="Fri, 1 Jun 2012 14:04:02 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-700] contains? broken for TransientMaps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-700</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;&lt;tt&gt;(contains? (transient {:x &quot;fine&quot;}) :x)&lt;/tt&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;false&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;also&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(contains? (transient (hash-map :x &quot;fine&quot;)) :x)&lt;/tt&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;false&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
            <key id="14309">CLJ-700</key>
            <summary>contains? broken for TransientMaps</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bendlas">Herwig Hochleitner</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Jan 2011 19:58:16 -0600</created>
                <updated>Tue, 28 Aug 2012 17:48:49 -0500</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="26078" author="bendlas" created="Sat, 1 Jan 2011 20:01:14 -0600"  >&lt;p&gt;the same is also true for TransientVectors&lt;/p&gt;

&lt;p&gt;{{(contains? (transient &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;) 0)}}&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;false&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    <comment id="26079" author="bendlas" created="Sat, 1 Jan 2011 20:25:17 -0600"  >&lt;p&gt;As expected, TransientSets have the same issue; plus an additional, probably related one.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(:x (transient #{:x}))&lt;/tt&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;nil&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;tt&gt;(get (transient #{:x}) :x)&lt;/tt&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;nil&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    <comment id="26104" author="aredington" created="Fri, 7 Jan 2011 14:07:04 -0600"  >&lt;p&gt;This is caused by expectations in clojure.lang.RT regarding the type of collections for some methods, e.g. contains() and getFrom(). Checking for contains looks to see if the instance passed in is Associative (a subinterface of PersistentCollection), or IPersistentSet.&lt;/p&gt;

&lt;p&gt;This patch refactors several of the Clojure interfaces so that logic abstract from the issue of immutability is pulled out to a general interface (e.g. ISet, IAssociative), but preserves the contract specified (e.g. Associatives only return Associatives when calling assoc()).&lt;/p&gt;

&lt;p&gt;With more general interfaces in place the contains() and getFrom() methods were then altered to conditionally use the general interfaces which are agnostic of persistence vs. transience. Includes tests in transients.clj to verify the changes fix this problem.&lt;/p&gt;</comment>
                    <comment id="26188" author="stu" created="Fri, 28 Jan 2011 10:35:08 -0600"  >&lt;p&gt;Rich: Patch doesn&apos;t currently apply, but I would like to get your take on approach here. In particular:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;this represents working back from the defect to rethinking abstractions (good!). Does it go far enough?&lt;/li&gt;
	&lt;li&gt;what are good names for the interfaces introduced here?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26331" author="aredington" created="Fri, 25 Mar 2011 07:44:22 -0500"  >&lt;p&gt;Rebased the patch off the latest pull of master as of 3/25/2011, it should apply cleanly now.&lt;/p&gt;</comment>
                    <comment id="27756" author="stuart.sierra" created="Fri, 17 Feb 2012 14:59:11 -0600"  >&lt;p&gt;Latest patch does not apply as of f5bcf647&lt;/p&gt;</comment>
                    <comment id="27761" author="jafingerhut" created="Fri, 17 Feb 2012 17:59:52 -0600"  >&lt;p&gt;clj-700-patch2.txt does patch cleanly to latest Clojure head as of a few mins ago.  No changes to patch except in context around changed lines.&lt;/p&gt;</comment>
                    <comment id="27908" author="jafingerhut" created="Wed, 7 Mar 2012 03:23:01 -0600"  >&lt;p&gt;Sigh.  Git patches applied via &apos;git am&apos; are fragile beasts indeed.  Look at them the wrong way and they fail to apply.&lt;/p&gt;

&lt;p&gt;clj-700-patch3.txt applies cleanly to latest master as of Mar 7, 2012, but &lt;b&gt;not&lt;/b&gt; if you use this command:&lt;/p&gt;

&lt;p&gt;git am -s &amp;lt; clj-700-patch3.txt&lt;/p&gt;

&lt;p&gt;I am pretty sure this is because of DOS CR/LF line endings in the file src/jvm/clojure/lang/Associative.java.  The patch does apply cleanly if you use this command:&lt;/p&gt;

&lt;p&gt;git am --keep-cr -s &amp;lt; clj-700-patch3.txt&lt;/p&gt;</comment>
                    <comment id="27998" author="jafingerhut" created="Fri, 23 Mar 2012 18:34:38 -0500"  >&lt;p&gt;This ticket was changed to Incomplete and waiting on Rich when Stuart Halloway asked for feedback on the approach on 28/Jan/2011.  Stuart Sierra changed it to not waiting on Rich on 17/Feb/2012 when he noted the patch didn&apos;t apply cleanly.  Latest patch clj-700-patch3.txt does apply cleanly, but doesn&apos;t change the approach used since the time Stuart Halloway&apos;s concern was raised.  Should it be marked as waiting on Rich again?  Something else?&lt;/p&gt;</comment>
                    <comment id="28749" author="stu" created="Fri, 8 Jun 2012 12:44:42 -0500"  >&lt;p&gt;Patch 4 incorporates patch 3, and brings it up to date on hashing (i.e. uses hasheq).&lt;/p&gt;</comment>
                    <comment id="28751" author="jafingerhut" created="Fri, 8 Jun 2012 12:52:44 -0500"  >&lt;p&gt;Removed clj-700-patch3.txt in favor of Stuart Halloway&apos;s improved clj-700-patch4.txt dated June 8, 2012.&lt;/p&gt;</comment>
                    <comment id="28863" author="jafingerhut" created="Mon, 18 Jun 2012 15:06:14 -0500"  >&lt;p&gt;clj-700-patch5.txt dated June 18, 2012 is the same as Stuart Halloway&apos;s clj-700-patch4.txt, except for context lines that have changed in Clojure master since Stuart&apos;s patch was created.  clj-700-patch4.txt no longer applies cleanly.&lt;/p&gt;</comment>
                    <comment id="29229" author="jafingerhut" created="Sun, 19 Aug 2012 04:47:42 -0500"  >&lt;p&gt;Adding clj-700-patch6.txt, which is identical to Stuart Halloway&apos;s clj-700-patch4.txt, except that it applies cleanly to latest master as of Aug 19, 2012.  Note that as described above, you must use the --keep-cr option to &apos;git am&apos; when applying this patch for it to succeed.  Removing clj-700-patch5.txt, since it no longer applies cleanly.&lt;/p&gt;</comment>
                    <comment id="29264" author="stuart.sierra" created="Fri, 24 Aug 2012 13:08:28 -0500"  >&lt;p&gt;Patch fails as of commit 1c8eb16a14ce5daefef1df68d2f6b1f143003140&lt;/p&gt;</comment>
                    <comment id="29266" author="jafingerhut" created="Fri, 24 Aug 2012 13:53:51 -0500"  >&lt;p&gt;Which patch did you try, and what command did you use?  I tried applying clj-700-patch6.txt to the same commit, using the following command, and it applied, albeit with the warning messages shown:&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s &amp;lt; clj-700-patch6.txt&lt;br/&gt;
Applying: Refactor of some of the clojure .java code to fix &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-700&quot; title=&quot;contains? broken for TransientMaps&quot;&gt;CLJ-700&lt;/a&gt;.&lt;br/&gt;
/Users/jafinger/clj/latest-clj/clojure/.git/rebase-apply/patch:29: trailing whitespace.&lt;br/&gt;
public interface Associative extends IPersistentCollection, IAssociative{&lt;br/&gt;
warning: 1 line adds whitespace errors.&lt;br/&gt;
Applying: more &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-700&quot; title=&quot;contains? broken for TransientMaps&quot;&gt;CLJ-700&lt;/a&gt;: refresh to use hasheq&lt;/p&gt;

&lt;p&gt;Note the --keep-cr option, which is necessary for this patch to succeed.  It is recommended in the &quot;Screening Tickets&quot; section of the JIRA workflow wiki page here: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29282" author="jafingerhut" created="Tue, 28 Aug 2012 17:48:49 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete back to None, since the latest patch does apply cleanly if the --keep-cr option is used.  It was in Screened state recently, but I&apos;m not so presumptuous as to change it to Screened &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10071" name="0001-Refactor-of-some-of-the-clojure-.java-code-to-fix-CL.patch" size="9822" author="aredington" created="Fri, 7 Jan 2011 14:07:04 -0600" />
                    <attachment id="10165" name="clj-700.diff" size="9774" author="aredington" created="Fri, 25 Mar 2011 16:18:05 -0500" />
                    <attachment id="11301" name="clj-700-patch4.txt" size="11217" author="stu" created="Fri, 8 Jun 2012 12:44:41 -0500" />
                    <attachment id="11449" name="clj-700-patch6.txt" size="10928" author="jafingerhut" created="Sun, 19 Aug 2012 04:47:42 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1197] Allow fold to parallelize over lazy sequences</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1197</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This patch implements &lt;tt&gt;foldable-seq&lt;/tt&gt;, which allows fold to parallelize over a lazy sequence. See this conversation on the Clojure mailing list:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/#!msg/clojure/8RKCjF00ukQ/b5mmmOB5Uh4J&quot;&gt;https://groups.google.com/forum/#!msg/clojure/8RKCjF00ukQ/b5mmmOB5Uh4J&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The patch is code only, sadly. No tests because I&apos;ve not been able to find any existing tests for &lt;tt&gt;fold&lt;/tt&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/plQ16L1_FC0/CIyMVIgSZkkJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/plQ16L1_FC0/CIyMVIgSZkkJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, I have tested it in a separate project successfully.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16137">CLJ-1197</key>
            <summary>Allow fold to parallelize over lazy sequences</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="paulbutcher">Paul Butcher</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Apr 2013 10:34:09 -0500</created>
                <updated>Wed, 10 Apr 2013 10:34:09 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11951" name="foldable-seq.diff" size="1774" author="paulbutcher" created="Wed, 10 Apr 2013 10:34:09 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1036] Util/hasheq should be hashing a BigInteger to the same values as Long, and BigInt</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1036</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The doc string for &lt;tt&gt;hash&lt;/tt&gt; states that it defines a hash code function that is consistent with &lt;tt&gt;=&lt;/tt&gt;, but for java.math.BigInteger &lt;tt&gt;hash&lt;/tt&gt; is not consistent with &lt;tt&gt;=&lt;/tt&gt;.&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;user=&amp;gt; (apply = [(Long. -1) -1N (biginteger -1)])
true
user=&amp;gt; (map hash [(Long. -1) -1N (biginteger -1)])
(0 0 -1)
user=&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It is possible to have a PHM with two key/value pairs where the keys are equal, and the hash codes are different:&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;user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (biginteger -1) :oops! -1N :one)
{-1N :one, -1 :oops!}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The expected behavior is the same as PersistentArrayMap, which does not have this issue, because it does not hash its keys:&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;user=&amp;gt; (assoc clojure.lang.PersistentArrayMap/EMPTY (biginteger -1) :oops! -1N :one)
{-1 :one}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This same misbehavior also occurs for Doubles and Floats:&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;thalia.core=&amp;gt; (apply = [(Float. 1e9) (Double. 1e9)])
true
thalia.core=&amp;gt; (map hash [(Float. 1e9) (Double. 1e9)])
(1315859240 1104006501)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That leads to the same difference in array-map and hash-map behavior as above for BigInteger and BigInt.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15610">CLJ-1036</key>
            <summary>Util/hasheq should be hashing a BigInteger to the same values as Long, and BigInt</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="pjstadig">Paul Stadig</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Aug 2012 08:41:17 -0500</created>
                <updated>Fri, 12 Apr 2013 08:48:23 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29076" author="pjstadig" created="Thu, 2 Aug 2012 09:55:54 -0500"  >&lt;p&gt;Also, the biginteger function has metadata saying that it has been added since 1.0, but it was actually added in 1.3.  The bigint function has metadata saying that it has been added since 1.3, but it has been added since 1.0.&lt;/p&gt;

&lt;p&gt;I think during the work to implement BigInt someone renamed the existing bigint function (which used to return a BigInteger) to biginteger, and the metadata got carried with it, then a new bigint function was added with :since 1.3 metadata even though that function name has existed since 1.0.&lt;/p&gt;</comment>
                    <comment id="29533" author="jafingerhut" created="Wed, 26 Sep 2012 11:59:08 -0500"  >&lt;p&gt;clj-1036-hasheq-for-biginteger-patch-v1.txt dated Sep 26 2012 makes BigInteger&apos;s return equal hash values for values considered equal by =.&lt;/p&gt;

&lt;p&gt;It does the same for Float and Double types, which before returned different hash values for values considered equal by =&lt;/p&gt;

&lt;p&gt;I went ahead and changed the :added metadata on bigint and biginteger, although I can see that without my change, the person who did that may have meant for the :added to go with the behavior of the function, not with the name.  Paul&apos;s suggested change that I have in the patch is for the :added metadata to go with the name, not the function behavior.  It is easy to remove that part of the patch if that change is not desired.&lt;/p&gt;</comment>
                    <comment id="29934" author="richhickey" created="Tue, 13 Nov 2012 15:29:12 -0600"  >&lt;p&gt;You can&apos;t just consider only the lower long of bigints. Also, what&apos;s the rationale for the float stuff?&lt;/p&gt;</comment>
                    <comment id="29938" author="jafingerhut" created="Tue, 13 Nov 2012 21:44:14 -0600"  >&lt;p&gt;clj-1036-hasheq-for-biginteger-patch-v2.txt dated Nov 13 2012 is identical to clj-1036-hasheq-for-biginteger-patch-v1.txt except that it addresses Rich&apos;s comment that for BigInt&apos;s and BigInteger values that don&apos;t fit in a long, their entire value must be hashed.&lt;/p&gt;

&lt;p&gt;The rationale for the changes to hasheq for Float and Double types is the same as the rationale for the change for BigInteger: without that change, Float and Double types that are = can have different hasheq values.&lt;/p&gt;</comment>
                    <comment id="29939" author="pjstadig" created="Wed, 14 Nov 2012 05:18:58 -0600"  >&lt;p&gt;Although you are correct that Double and Float are &lt;tt&gt;=&lt;/tt&gt;, but have different hashes:&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;user=&amp;gt; (apply = [(Double. -1.0) (Float. -1.0)])
true
user=&amp;gt; (map hash [(Double. -1.0) (Float. -1.0)])
(-1074790400 -1082130432)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I could not get the same errant behavior out of PHM:&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;user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (Float. -1.0) :oops! (Double. -1.0) :one)
{-1.0 :one}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I haven&apos;t taken the time to investigate exactly what is happening here, but either way I think this ticket is very specifically about BigInteger and the Float/Double issue could be explored in another ticket.&lt;/p&gt;</comment>
                    <comment id="29943" author="jafingerhut" created="Wed, 14 Nov 2012 10:08:59 -0600"  >&lt;p&gt;I can open another ticket for the Float/Double issue if that is what people would prefer.&lt;/p&gt;

&lt;p&gt;I think what is happening in the test case you give, Paul, is that the hash values for (Float. -1.0) and (Double. -1.0) happen to be the same in their least significant 20 bits, and PHM isn&apos;t using the upper bits where the hash values differ.&lt;/p&gt;

&lt;p&gt;Clojure 1.5.0-beta without patch:&lt;br/&gt;
user=&amp;gt; (map #(format &quot;%x&quot; %) (map hash &lt;span class=&quot;error&quot;&gt;&amp;#91;(Float. -1.0) (Double. -1.0)&amp;#93;&lt;/span&gt;))&lt;br/&gt;
(&quot;bf800000&quot; &quot;bff00000&quot;)&lt;/p&gt;

&lt;p&gt;There are other Float/Double values where this lucky accident doesn&apos;t happen, e.g.&lt;/p&gt;

&lt;p&gt;Clojure 1.5.0-beta1 without patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (= (Float. 1e9) (Double. 1e9))&lt;br/&gt;
true&lt;br/&gt;
user=&amp;gt; (map hash &lt;span class=&quot;error&quot;&gt;&amp;#91;(Float. 1e9) (Double. 1e9)&amp;#93;&lt;/span&gt;)&lt;br/&gt;
(1315859240 1104006501)&lt;br/&gt;
user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (Float. 1e9) :oops! (Double. 1e9) :one)&lt;/p&gt;
{1.0E9 :one, 1.0E9 :oops!}

&lt;p&gt;With 1.5.0-beta1 plus patch clj-1036-hasheq-for-biginteger-patch-v2.txt:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (= (Float. 1e9) (Double. 1e9))&lt;br/&gt;
true&lt;br/&gt;
user=&amp;gt; (map hash &lt;span class=&quot;error&quot;&gt;&amp;#91;(Float. 1e9) (Double. 1e9)&amp;#93;&lt;/span&gt;)&lt;br/&gt;
(1315859240 1315859240)&lt;br/&gt;
user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (Float. 1e9) :oops! (Double. 1e9) :one)&lt;/p&gt;
{1.0E9 :one}</comment>
                    <comment id="30341" author="jafingerhut" created="Tue, 1 Jan 2013 11:30:41 -0600"  >&lt;p&gt;Presumptuously changing status from Not Approved to Vetted, since patch clj-1036-hasheq-for-biginteger-patch-v2.txt should address the reasons that Rich marked the previous patch as Not Approved.  Changing it to Vetted on the assumption that if Stuart Halloway marked the previous patch as Screened, the ticket itself is good enough to be Vetted.&lt;/p&gt;</comment>
                    <comment id="30939" author="richhickey" created="Fri, 12 Apr 2013 08:48:23 -0500"  >&lt;p&gt;Patches and tickets need to be better than this. Talks about BigInteger, changes hash for doubles. Lists problem but not approach, need to trawl through comments and code to see what&apos;s going on, etc.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11674" name="clj-1036-hasheq-for-biginteger-patch-v2.txt" size="3639" author="jafingerhut" created="Tue, 13 Nov 2012 21:44:14 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1157] Classes generated by gen-class aren&apos;t loadable from remote codebase for mis-implementation of static-initializer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1157</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When a client program uses a remote service which uses RMI, and the service returns a object which created with gen-class with clojure as the return value, the return value is not loadable at client side.&lt;/p&gt;

&lt;p&gt;At client side, a following exeption will be thrown.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.ExceptionInInitializerError
        at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
        at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1723)
        at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:69)
        at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:247)
        at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:245)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:244)
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:600)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:324)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
        at $Proxy0.getResult(Unknown Source)
        at client.SampleClient$_main.doInvoke(SampleClient.clj:12)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.applyToHelper(AFn.java:159)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at client.SampleClient.main(Unknown Source)
 Caused by: java.io.FileNotFoundException: Could not locate remoteserver/SampleInterfaceImpl__init.class or remoteserver/SampleInterfaceImpl.clj on classpath: 
        at clojure.lang.RT.load(RT.java:434)
        at clojure.lang.RT.load(RT.java:402)
        at clojure.core$load$fn__5039.invoke(core.clj:5520)
        at clojure.core$load.doInvoke(core.clj:5519)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:415)
        at remoteserver.SampleInterfaceImpl.&amp;lt;clinit&amp;gt;(Unknown Source)
        ... 23 more&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;HOWTOREPRODUCTTHISISSUE&quot;&gt;&lt;/a&gt;HOW TO REPRODUCT THIS ISSUE&lt;/h2&gt;

&lt;p&gt;If you want to see this issue at your computer, clone my example project from my github.&lt;/p&gt;

&lt;p&gt;git clone git://github.com/tyano/clojure_genclass_fix.git&lt;/p&gt;

&lt;p&gt;and build them (You must have installed Leiningen 2):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;cd clojure_genclass_fix
sh build.sh&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;start rmiregistry:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;rmiregistry &amp;amp;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;start remoteserver:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;cd remoteserver
sh start.sh&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You will see a message &quot;Server ready. &quot; or &quot;Server ready. (rebind)&quot;.&lt;/p&gt;

&lt;p&gt;At last, start client program:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;cd ../client
sh start.sh&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Without my patch, you will see a same Exception described above. But with clojure with my patch, you will see a right response message: &quot;response = this is sample.&quot;&lt;/p&gt;


&lt;h2&gt;&lt;a name=&quot;THEREASON&quot;&gt;&lt;/a&gt;THE REASON        &lt;/h2&gt;

&lt;p&gt;The reason of this problem is in bytecodes generated by gen-class. A gen-classed class (in this case, SampleInterfaceImpl.class) uses a static-initializer for loading SampleInterfaceImpl__init.class (which load other classes which implements functions in the class). The static-initializer is like bellow: (the following code is decompiled with JD - &lt;a href=&quot;http://java.decompiler.free.fr/?q=jdgui&quot;&gt;http://java.decompiler.free.fr/?q=jdgui&lt;/a&gt; )&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt;
  {
    RT.&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;(&lt;span class=&quot;code-quote&quot;&gt;&quot;clojure.core&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;load&quot;&lt;/span&gt;).invoke(&lt;span class=&quot;code-quote&quot;&gt;&quot;/remoteserver/SampleInterfaceImpl&quot;&lt;/span&gt;);
  }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Very simple code. it seems non-problematic. But RT.load changes the classloader for loading __init.class in the processing! RT.load in default uses a context-classloader for loading classes. But all classes depending on a gen-classed class must be loaded a same classloader with a main gen-classed class. In this case, RT.load must use a remote URLClassLoader which load a main class.&lt;/p&gt;

&lt;p&gt;So, gen-class must be create bytecodes that is same with the following java code.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt;
  {
    Var.pushThreadBindings(RT.map(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;[] { &lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.LOADER, SampleInterfaceImpl.class.getClassLoader() }));
    &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
        RT.&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;(&lt;span class=&quot;code-quote&quot;&gt;&quot;clojure.core&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;load&quot;&lt;/span&gt;).invoke(&lt;span class=&quot;code-quote&quot;&gt;&quot;/remoteserver/SampleInterfaceImpl&quot;&lt;/span&gt;);
    }
    &lt;span class=&quot;code-keyword&quot;&gt;finally&lt;/span&gt; 
    {
        Var.popThreadBindings();
    }
  }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With this code, RT.load will uses a same classloader which load SampleInterfaceImpl.class.&lt;br/&gt;
My patch for gen-class will create bytecodes equal to the above example.&lt;/p&gt;

&lt;p&gt;You can use an attached patch &apos;20130204_fix_classloader.diff&apos;, or pull &apos;fix_classloader&apos; branch from my github repositry ( git@github.com:tyano/clojure.git ).&lt;/p&gt;</description>
                <environment>Tested on Mac OS X 10.8 and Oracle JVM 1.7.0 update 13.</environment>
            <key id="15988">CLJ-1157</key>
            <summary>Classes generated by gen-class aren&apos;t loadable from remote codebase for mis-implementation of static-initializer</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tyano">Tsutomu Yano</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Feb 2013 01:06:21 -0600</created>
                <updated>Fri, 12 Apr 2013 09:19:05 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30675" author="stu" created="Fri, 1 Mar 2013 10:20:27 -0600"  >&lt;p&gt;This sounds reasonable, but anything touching classloaders must be considered very carefully.&lt;/p&gt;</comment>
                    <comment id="30679" author="stu" created="Fri, 1 Mar 2013 12:12:09 -0600"  >&lt;p&gt;It seems overly complex to have the patch do so much code generation.  Why not implement a method that does this job, and have the generated code call that?&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                    <attachment id="11832" name="20130204_fix_classloader.diff" size="4563" author="tyano" created="Mon, 4 Feb 2013 01:06:21 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1154] Compile.java closes out preventing java from reporting exceptions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1154</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I was trying to compile a project that has some native dependencies.  I am using clojure-maven-plugin version 1.3.13 with Maven 2.0.  I forgot to set java.library.path properly so that the native library could be found, and only got an error of&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;[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Clojure failed.
[INFO] ------------------------------------------------------------------------
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I traced this down to Compile.java, where it is flushing and closing &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;out&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; in the finally block.  The JVM uses out to write out a stack trace for any uncaught exceptions.  When out is closed it is unable to write out the stack trace for the UnsatisfiedLinkError that was being thrown.  This made it very difficult to debug what was happening.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15983">CLJ-1154</key>
            <summary>Compile.java closes out preventing java from reporting exceptions</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="revans2">Robert (Bobby) Evans</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Jan 2013 13:04:08 -0600</created>
                <updated>Fri, 12 Apr 2013 09:31:03 -0500</updated>
                                    <version>Release 1.4</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30677" author="stu" created="Fri, 1 Mar 2013 10:45:51 -0600"  >&lt;p&gt;I have encountered this problem as well.  Did not verify the explanation, but sounds reasonable.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-701] Compiler loses &apos;loop&apos;s return type in some cases</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-701</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(set! *warn-on-reflection* &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
(fn [] (loop [b 0] (recur (loop [a 1] a))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Generates the following warnings:&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;recur arg for primitive local: b is not matching primitive, had: Object, needed: long
Auto-boxing loop arg: b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is interesting for several reasons.  For one, if the arg to &lt;tt&gt;recur&lt;/tt&gt; is a &lt;tt&gt;let&lt;/tt&gt; form, there is no warning:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(fn [] (loop [b 0] (recur (let [a 1] a))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also, the compiler appears to understand the return type of &lt;tt&gt;loop&lt;/tt&gt; forms just fine:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(use &apos;[clojure.contrib.repl-utils :only [expression-info]])
(expression-info &apos;(loop [a 1] a))
;=&amp;gt; {:class &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;, :primitive? &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem can of course be worked around using an explicit cast on the &lt;tt&gt;loop&lt;/tt&gt; form:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(fn [] (loop [b 0] (recur (&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; (loop [a 1] a)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Reported by leafw in IRC: &lt;a href=&quot;http://clojure-log.n01se.net/date/2011-01-03.html#10:31&quot;&gt;http://clojure-log.n01se.net/date/2011-01-03.html#10:31&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Clojure commit 9052ca1854b7b6202dba21fe2a45183a4534c501, version 1.3.0-master-SNAPSHOT</environment>
            <key id="14310">CLJ-701</key>
            <summary>Compiler loses &apos;loop&apos;s return type in some cases</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chouser@n01se.net">Chouser</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jan 2011 10:56:07 -0600</created>
                <updated>Fri, 12 Apr 2013 09:42:00 -0500</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26081" author="a_strange_guy" created="Mon, 3 Jan 2011 16:36:27 -0600"  >&lt;p&gt;The problem is that a &apos;loop form gets converted into an anonymous fn that gets called immediately, when the loop is in a expression context (eg. its return value is needed, but not as the return value of a method/fn).&lt;/p&gt;

&lt;p&gt;so&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;(fn [] (loop [b 0] (recur (loop [a 1] a))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;gets converted into&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;(fn [] (loop [b 0] (recur ((fn [] (loop [a 1] a))))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;see the code in the compiler:&lt;br/&gt;
&lt;a href=&quot;http://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L5572&quot;&gt;http://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L5572&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;this conversion already bites you if you have mutable fields in a deftype and want to &apos;set! them in a loop&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-274&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-274&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30009" author="cgrand" created="Fri, 23 Nov 2012 02:28:14 -0600"  >&lt;p&gt;loops in expression context are lifted into fns because else Hotspot doesn&apos;t optimize them.&lt;br/&gt;
This causes several problems:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;type inference doesn&apos;t propagate outside of the loop&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;the return value is never a primitive&lt;/li&gt;
	&lt;li&gt;mutable fields are inaccessible&lt;/li&gt;
	&lt;li&gt;surprise allocation of one closure objects each time the loop is entered.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Adressing all those problems isn&apos;t easy. &lt;br/&gt;
One can compute the type of the loop and emit a type hint but it works only with reference types. To make it works with primitive, primitie fns aren&apos;t enough since they return only long/double: you have to add explicit casts.&lt;br/&gt;
So solving the first two points can be done in a rather lccal way.&lt;br/&gt;
The two other points require more impacting changes, the goal would be to emit a method rather than a fn. So it means at the very least changing ObjExpr and adding a new subclassof  ObjMethod.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; beware of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1111&quot; title=&quot;Loops returning primtives are boxed even in return position&quot;&gt;&lt;del&gt;CLJ-1111&lt;/del&gt;&lt;/a&gt; when testing. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1171] Compiler macro for clojure.core/instance? disregards lexical shadows on class names</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1171</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;h1&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h1&gt;
&lt;p&gt;The compiler tries to emit jvm native &lt;b&gt;instanceof&lt;/b&gt; expressions for direct &lt;b&gt;clojure.core/instance?&lt;/b&gt; calls.&lt;br/&gt;
For that, it tries to resolve its first argument as a class name. However, it disregards lexical bindings when doing that.&lt;br/&gt;
This is incongruent to the default implementation in core.clj&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;Data&quot;&gt;&lt;/a&gt;Data&lt;/h1&gt;

&lt;h2&gt;&lt;a name=&quot;Testcase&quot;&gt;&lt;/a&gt;Test case&lt;/h2&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (let [&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;] (instance? &lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;abc&quot;&lt;/span&gt;))
&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
;; expected &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; as in
user=&amp;gt; (let [&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;] (apply instance? [&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;abc&quot;&lt;/span&gt;]))
&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;Culpritmethod&quot;&gt;&lt;/a&gt;Culprit method&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/blob/4ccb10edbe66eae81336a4c0972050d9759b0bf7/src/jvm/clojure/lang/Compiler.java#L3578&quot;&gt;https://github.com/clojure/clojure/blob/4ccb10edbe66eae81336a4c0972050d9759b0bf7/src/jvm/clojure/lang/Compiler.java#L3578&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;ListDiscussion&quot;&gt;&lt;/a&gt;List Discussion&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://groups.google.com/d/topic/clojure/mf25OlFRpa8/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/mf25OlFRpa8/discussion&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;Tangent&quot;&gt;&lt;/a&gt;Tangent&lt;/h1&gt;
&lt;p&gt;This was discovered because the same compiler macro also omits the arity check implicit in the default definition. This could also conveniently be fixed when touching that method:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (instance? &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;)
&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
;; expected
user=&amp;gt; (apply instance? [&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;])
ArityException Wrong number of args (1) passed to: core$instance-QMARK-  clojure.lang.AFn.throwArity (AFn.java:437)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;EDIT&lt;/b&gt; elaborated on ticket title and description; added tangent&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
            <key id="16030">CLJ-1171</key>
            <summary>Compiler macro for clojure.core/instance? disregards lexical shadows on class names</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bendlas">Herwig Hochleitner</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Feb 2013 13:21:16 -0600</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30668" author="bendlas" created="Wed, 27 Feb 2013 20:11:30 -0600"  >&lt;p&gt;Attached patches test and fix issue + tangent&lt;/p&gt;</comment>
                    <comment id="30698" author="bendlas" created="Mon, 4 Mar 2013 15:51:36 -0600"  >&lt;p&gt;Note: Patch 0003 just adds the arity check, hence is optional, but if it&apos;s omitted from the patchset, the corresponding test from patch 0001 will fail.&lt;/p&gt;</comment>
                    <comment id="30843" author="stu" created="Fri, 29 Mar 2013 07:31:45 -0500"  >&lt;p&gt;Summarizing the decisions in these patches:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;instance?&lt;/tt&gt; and &lt;tt&gt;apply instance?&lt;/tt&gt; should be consistent&lt;/li&gt;
	&lt;li&gt;they should check arity  (matching &lt;tt&gt;apply instance?&lt;/tt&gt; existing behavior)&lt;/li&gt;
	&lt;li&gt;they should allow lexical shadowing of the class argument (matching &lt;tt&gt;apply instance?&lt;/tt&gt; existing behavior)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It is possible (although unlikely) that existing code relies on the current eccentric behavior of &lt;tt&gt;instance?&lt;/tt&gt;.  I think it would be fair to categorize programs relying on this behavior as buggy, but that is easy for me to say. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11877" name="0001-CLJ-1171-Tests-for-clojure.core-instance-compiler-ma.patch" size="919" author="bendlas" created="Wed, 27 Feb 2013 20:11:30 -0600" />
                    <attachment id="11878" name="0002-CLJ-1171-Obey-lexical-scope-for-class-argument-in-in.patch" size="1248" author="bendlas" created="Wed, 27 Feb 2013 20:11:30 -0600" />
                    <attachment id="11879" name="0003-CLJ-1171-Check-arity-in-instance-compiler-macro.patch" size="970" author="bendlas" created="Wed, 27 Feb 2013 20:11:30 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1058] StackOverflowError on exception in reducef for PersistentHashMap fold</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1058</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If reducef throws an exception, the PHM fold code can descend into an infinite loop, causing a stack overflow which masks the problem. This situation is commented &quot;aargh&quot; in PersistentHashMap.java line 444 (as of 412a51d).&lt;/p&gt;

&lt;p&gt;To reproduce:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user&amp;gt; (require &apos;[clojure.core.reducers :as r])
nil
user&amp;gt; (r/fold (fn ([]) ([ret k v] (+ 3 &lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;) ret)) (into {} (map (juxt identity identity) (range 10000))))
;; boom&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This results in a stack like: &lt;a href=&quot;https://raw.github.com/gist/3bab917287a7fd635a84/f38bfe3e270556e467f3fc02062af7ea10781390/gistfile1.txt&quot;&gt;https://raw.github.com/gist/3bab917287a7fd635a84/f38bfe3e270556e467f3fc02062af7ea10781390/gistfile1.txt&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Clojure 1.5.0-alpha4, Sun Java 1.6.0_35, with [org.codehaus.jsr166-mirror/jsr166y &amp;quot;1.7.0&amp;quot;]</environment>
            <key id="15668">CLJ-1058</key>
            <summary>StackOverflowError on exception in reducef for PersistentHashMap fold</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                    </labels>
                <created>Sun, 2 Sep 2012 17:20:02 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30124" author="halgari" created="Fri, 30 Nov 2012 15:40:59 -0600"  >&lt;p&gt;Verified as a bug. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-420] Some compiler exceptions erroneously using REPL line numbers.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-420</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Certain kinds of errors in loaded source files are coming back tagged with the correct source file, but what seems to be the REPL line number.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure/browse_frm/thread/beb36e7228eabd69/a7ef16dcc45834bc?hl=en#a7ef16dcc45834bc&quot;&gt;http://groups.google.com/group/clojure/browse_frm/thread/beb36e7228eabd69/a7ef16dcc45834bc?hl=en#a7ef16dcc45834bc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;jawolfe@&lt;span class=&quot;error&quot;&gt;&amp;#91;~/Projects/testproj&amp;#93;&lt;/span&gt;: cat &amp;gt; src/test.clj&lt;/p&gt;

&lt;p&gt;bla&lt;br/&gt;
jawolfe@&lt;span class=&quot;error&quot;&gt;&amp;#91;~/Projects/testproj&amp;#93;&lt;/span&gt;: cat &amp;gt; src/test2.clj&lt;/p&gt;

&lt;p&gt;(bla)&lt;br/&gt;
jawolfe@&lt;span class=&quot;error&quot;&gt;&amp;#91;~/Projects/testproj&amp;#93;&lt;/span&gt;: lein repl&lt;br/&gt;
user=&amp;gt; (require &apos;test)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test.clj:1)&lt;br/&gt;
user=&amp;gt; (require &apos;test)a&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test.clj:2)&lt;br/&gt;
user=&amp;gt; (require &apos;test)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test.clj:3)&lt;br/&gt;
user=&amp;gt; (require &apos;test2)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test2.clj:2)&lt;br/&gt;
user=&amp;gt; (require &apos;test2)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test2.clj:2)&lt;br/&gt;
user=&amp;gt; (require &apos;test2)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test2.clj:2)&lt;br/&gt;
user=&amp;gt; (require &apos;test)&lt;br/&gt;
java.lang.Exception: Unable to resolve symbol: bla in this context&lt;br/&gt;
(test.clj:7)&lt;br/&gt;
user=&amp;gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13817">CLJ-420</key>
            <summary>Some compiler exceptions erroneously using REPL line numbers.</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="aredington">Alexander Redington</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 Aug 2010 04:46:00 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="24177" author="importer" created="Tue, 28 Sep 2010 21:59:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/420&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/420&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24178" author="importer" created="Tue, 28 Sep 2010 21:59:00 -0500"  >&lt;p&gt;stu said: Updating tickets (#427, #426, #421, #420, #397)&lt;/p&gt;</comment>
                    <comment id="24179" author="importer" created="Tue, 28 Sep 2010 21:59:00 -0500"  >&lt;p&gt;stu said: Updating tickets (#429, #437, #397, #420)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-850] Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-850</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;See the following examples:&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;user=&amp;gt; (defn f1 ^String [^String s] s)
#&apos;user/f1
user=&amp;gt; (f1 &quot;foo&quot;)
&quot;foo&quot;
user=&amp;gt; (defn f2 ^long [^String s ^long i] i)
#&apos;user/f2
user=&amp;gt; (f2 &quot;foo&quot; 1)
1
user=&amp;gt; (defn f3 ^String [^String s ^long i] s)                                       
#&apos;user/f3
user=&amp;gt; (f3 &quot;foo&quot; 1)
AbstractMethodError user$f3.invokePrim(Ljava/lang/Object;J)Ljava/lang/Object;  user/eval8 (NO_SOURCE_FILE:6)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14677">CLJ-850</key>
            <summary>Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Oct 2011 15:10:53 -0500</created>
                <updated>Fri, 12 Apr 2013 09:52:25 -0500</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="26989" author="bsmith.occs@gmail.com" created="Sat, 15 Oct 2011 11:54:52 -0500"  >&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;-test.patch added.&lt;/p&gt;</comment>
                    <comment id="27001" author="bsmith.occs@gmail.com" created="Sun, 16 Oct 2011 07:32:43 -0500"  >&lt;p&gt;&lt;del&gt;When the compiler tries to generates the call to the correct overload of invokePrim, it&apos;s failing to take the return type into account. I should be calling &lt;tt&gt;invokePrim(Ljava/lang/Object;J)J;&lt;/tt&gt;.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;XXX this is where I got myself confused. The &lt;tt&gt;invokePrim&lt;/tt&gt; overload it&apos;s trying to invoke is the &lt;b&gt;correct&lt;/b&gt; one. But, that apparently is no the one that&apos;s being generated. Sorry for the noise.&lt;/p&gt;</comment>
                    <comment id="27002" author="bsmith.occs@gmail.com" created="Sun, 16 Oct 2011 10:17:49 -0500"  >&lt;p&gt;&lt;del&gt;Here&apos;s what I think I&apos;m seeing:&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;&lt;tt&gt;HostExpr.Parse.parse()&lt;/tt&gt; loses track of the return type, in the final else branch where method calls are handled.  This is because &lt;tt&gt;tagOf(form)&lt;/tt&gt;, where form is something like: &lt;tt&gt;(. foo invokePrim 1)&lt;/tt&gt; returns nil. (The form itself doesn&apos;t have a &lt;tt&gt;:tag&lt;/tt&gt;, but I believe &lt;tt&gt;foo&lt;/tt&gt; does, though that&apos;s the name of the appropriate &lt;tt&gt;invokePrim&lt;/tt&gt; interface (i.e. &lt;tt&gt;IFn$OLL&lt;/tt&gt;).&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;&lt;tt&gt;new InstanceMethodExpr(...)&lt;/tt&gt; then gets constructed with &lt;tt&gt;tag==null&lt;/tt&gt;, at which point we&apos;ve already lost sine InstanceMethodExpr can&apos;t correctly consider overloading on the result type if it doesn&apos;t know what it is.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;It&apos;s not yet clear to me how I can get InstanceMethodExpr to consider the return type, if it knew it...&lt;/del&gt;&lt;/p&gt;





</comment>
                    <comment id="27015" author="bsmith.occs@gmail.com" created="Tue, 18 Oct 2011 00:29:22 -0500"  >
&lt;p&gt;There are two things going on here. I&apos;m not sure which is the error.&lt;/p&gt;

&lt;p&gt;It looks like the return type of the generated invokePrim method is too specific. It&apos;s generated as returning String, though the IFn$LO interface specifies returning Object.&lt;/p&gt;

&lt;p&gt;The caller attempts to call invokePrim returning Object, which is what the interface IFn$LO specifies, but this doesn&apos;t work because methodSL doesn&apos;t actually implement that method. Instead it implements an overload returning String.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;methodSL.invokePrim is declared as &lt;tt&gt;(long)-&amp;gt;String&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;methodSL.invoke does invokeinterface with the correct return type WRT methodSL, but the wrong return type WRT the IFn$LO interface.&lt;/li&gt;
	&lt;li&gt;callSL.invoke does invokeinterface with the wrong return type WRT methodSL, but the correct return type WRT IFn$LO. (This is the failure we observe in the clj-850 unit test.)&lt;/li&gt;
&lt;/ol&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;(defn methodSL  ^String [^long i] (str i))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;&amp;lt;&amp;lt;1&amp;gt;&amp;gt; public final java.lang.String invokePrim(long);  &amp;lt;&amp;lt;1&amp;gt;&amp;gt;
      Code:
       0:   getstatic   #25; 
            //Field const__0:Lclojure/lang/Var;
       3:   invokevirtual   #34; 
            //Method clojure/lang/Var.getRawRoot:()Ljava/lang/Object;
       6:   checkcast   #36; 
            //class clojure/lang/IFn
       9:   lload_1
       10:  invokestatic    #42; 
            //Method clojure/lang/Numbers.num:(J)Ljava/lang/Number;
       13:  invokeinterface #46,  2; 
            //InterfaceMethod clojure/lang/IFn.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
       18:  checkcast   #48; 
            //class java/lang/String
       21:  areturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;      public java.lang.Object invoke(java.lang.Object);
      Code:
       0:   aload_0
       1:   aload_1
       2:   checkcast   #54; 
            //class java/lang/Number
       5:   invokestatic    #58; 
            //Method clojure/lang/RT.longCast:(Ljava/lang/Object;)J
&amp;lt;&amp;lt;2&amp;gt;&amp;gt;  8:   invokeinterface #60,  3; 
            //InterfaceMethod clojure/lang/IFn$LO.invokePrim:(J)Ljava/lang/String;
       13:  areturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;(defn callSL ^String [] (methodSL 42))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;    public java.lang.Object invoke();
      Code:
       0:   getstatic   #25; 
            //Field const__0:Lclojure/lang/Var;
       3:   invokevirtual   #43; 
            //Method clojure/lang/Var.getRawRoot:()Ljava/lang/Object;
       6:   checkcast   #45; 
            //class clojure/lang/IFn$LO
       9:   ldc2_w  #26; 
            //long 42l
&amp;lt;&amp;lt;3&amp;gt;&amp;gt;  12:  invokeinterface #49,  3; 
            //InterfaceMethod clojure/lang/IFn$LO.invokePrim:(J)Ljava/lang/Object;
       17:  areturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="27016" author="bsmith.occs@gmail.com" created="Tue, 18 Oct 2011 01:40:59 -0500"  >&lt;p&gt;Given &lt;tt&gt;P&lt;/tt&gt; is some primitive type, &lt;tt&gt;O&lt;/tt&gt; is type Object, and &lt;tt&gt;R&lt;/tt&gt; some subclass of Object: &lt;/p&gt;

&lt;p&gt;When Clojure generates a &lt;tt&gt;R invokePrim(P x)&lt;/tt&gt;, it also generates a &lt;tt&gt;Object invoke(Object x)&lt;/tt&gt;, which delegates to &lt;tt&gt;R invokePrim(P x)&lt;/tt&gt;. &lt;/p&gt;

&lt;p&gt;&lt;tt&gt;R invokePrim(P x)&lt;/tt&gt; &lt;em&gt;overloads&lt;/em&gt;, but does not &lt;em&gt;override&lt;/em&gt; the method of the corresponding &lt;tt&gt;Fn$PO&lt;/tt&gt; interface. &lt;/p&gt;

&lt;p&gt;If Clojure were to generate an additional &lt;tt&gt;O invokePrim(P x)&lt;/tt&gt; which delegates to &lt;tt&gt;R invokePrim(P x)&lt;/tt&gt;, it would satisfy the requirements of the &lt;tt&gt;Fn$PO&lt;/tt&gt; interface, and should fix this issue.&lt;/p&gt;</comment>
                    <comment id="27018" author="bsmith.occs@gmail.com" created="Tue, 18 Oct 2011 14:54:41 -0500"  >&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;.patch fixes the issue.&lt;/p&gt;

&lt;p&gt;I consider this patch to be pretty hackish and hope that there&apos;s a cleaner way of addressing &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;. This is the first time I&apos;ve tried to understand (much less change) the Clojure compiler, so don&apos;t expect genius.&lt;/p&gt;</comment>
                    <comment id="27020" author="bsmith.occs@gmail.com" created="Wed, 19 Oct 2011 05:06:03 -0500"  >&lt;p&gt;The patch lies slightly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Clojure needs to generate an additional &lt;tt&gt;O invokePrim(P x)&lt;/tt&gt; method to&lt;br/&gt;
satisfy the interface. This also delegates to &lt;tt&gt;R invokePrim(P x)&lt;/tt&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It turns out that what I&apos;m actually doing is generating a &lt;tt&gt;R invokePrim(P x)&lt;/tt&gt; which is a copy of &lt;tt&gt;O invokePrim(P x)&lt;/tt&gt;, instead of delgating to &lt;tt&gt;O invokePrim(P x)&lt;/tt&gt;. This works, but the resulting class file would be smaller if the patch actually did what it says it does.&lt;/p&gt;</comment>
                    <comment id="27882" author="jafingerhut" created="Tue, 28 Feb 2012 00:49:32 -0600"  >&lt;p&gt;clj-850-type-hinted-fn-abstractmethoderror-patch2.txt is identical to Ben&apos;s two patches combined into one, with the small modification that the new tests are added to metadata.clj instead of creating a new test file.  The patch applies cleanly to latest master as of Feb 27, 2012.  One of the new tests does fail without the change to the compiler, and succeeds with it.  I can&apos;t vouch for the correctness of the change myself, not knowing enough about the compiler internals to judge.&lt;/p&gt;</comment>
                    <comment id="27999" author="jafingerhut" created="Fri, 23 Mar 2012 19:50:25 -0500"  >&lt;p&gt;Same comments as made on Feb 27, 2012, except the patch clj-850-type-hinted-fn-abstractmethoderror-patch3.txt applies cleanly to latest master as of Mar 23, 2012.  Updated because previous patch (now removed) no longer applied cleanly.  git patches often fail to apply if context lines near changes are modified.&lt;/p&gt;</comment>
                    <comment id="28135" author="richhickey" created="Fri, 13 Apr 2012 09:35:51 -0500"  >&lt;p&gt;We don&apos;t support sigs taking prims and returning anything other than prim or Object. Overloading on return value only is a bad idea (and forbidden in Java). The return type of the generated method should be Object, and the String return hint should be used only as a hint.&lt;/p&gt;</comment>
                    <comment id="29887" author="jafingerhut" created="Thu, 1 Nov 2012 19:22:38 -0500"  >&lt;p&gt;clj-850-type-hinted-fn-abstractmethoderror-patch4.txt dated Nov 1 2012 is same as Ben Smith-Mannschott&apos;s &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;.patch and &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;-test.patch, except it has been combined into one patch and does not create a new test source file.&lt;/p&gt;</comment>
                    <comment id="30196" author="mikera" created="Sun, 9 Dec 2012 15:42:29 -0600"  >&lt;p&gt;+10 for solving this issue: it keeps biting me in 1.4 and wouuld love to see in 1.5&lt;/p&gt;

&lt;p&gt;I&apos;m not familiar with the Clojure compiler internals, but looking at the approach, shouldn&apos;t we produce a primitive method with a different name (since Java doesn&apos;t support overloading on return types as Rich correctly points out). Also I think there should be 4 methods:&lt;/p&gt;

&lt;p&gt;    R invokePrimExact(P x) - the actual method, used when compiler can infer&lt;br/&gt;
    R invokePrimExact(O x) - delegates, used when compiler can&apos;t infer type of x&lt;br/&gt;
    Object invokePrim(P x) - primitive method, conforms to IFn$PO interface, delegates&lt;br/&gt;
    Object invoke(Object x) - general method, delegates&lt;/p&gt;

&lt;p&gt;I think this solves all the important cases?&lt;/p&gt;</comment>
                    <comment id="30266" author="richhickey" created="Wed, 19 Dec 2012 08:03:40 -0600"  >&lt;p&gt;Still no patch incorporating my feedback, afaict. Pushing to next release.&lt;/p&gt;</comment>
                    <comment id="30269" author="gshayban" created="Wed, 19 Dec 2012 15:41:42 -0600"  >&lt;p&gt;Does this new patch address the issue and concerns?  (This incorporates Ben&apos;s tests from the previous patch, wasn&apos;t sure how to attribute him on that hunk)  &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;-conform-to-invokePrim.diff&lt;/p&gt;</comment>
                    <comment id="30287" author="jafingerhut" created="Fri, 21 Dec 2012 22:53:27 -0600"  >&lt;p&gt;Presumptuously changing state from Incomplete back to Vetted after Ghadi Shayban added the patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-850&quot; title=&quot;Hinting the arg vector of a primitive-taking fn with a non-primitive type results in AbstractMethodError when invoked&quot;&gt;CLJ-850&lt;/a&gt;-conform-to-invokePrim.diff dated Dec 19 2012 after the status was changed to Incomplete.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11769" name="CLJ-850-conform-to-invokePrim.diff" size="2336" author="gshayban" created="Wed, 19 Dec 2012 15:41:42 -0600" />
                    <attachment id="10411" name="CLJ-850.patch" size="2531" author="bsmith.occs@gmail.com" created="Tue, 18 Oct 2011 14:54:41 -0500" />
                    <attachment id="10400" name="CLJ-850-test.patch" size="2482" author="bsmith.occs@gmail.com" created="Sat, 15 Oct 2011 11:54:52 -0500" />
                    <attachment id="11656" name="clj-850-type-hinted-fn-abstractmethoderror-patch4.txt" size="3769" author="jafingerhut" created="Thu, 1 Nov 2012 19:22:38 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-944] (.containsKey {:one 1} :one) throws Exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-944</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Patch clj944-plus-tests does three things:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;includes the previous &quot;0002&quot; patch which has the compiler emit map types consistent with the reader&lt;/li&gt;
	&lt;li&gt;adds tests&lt;/li&gt;
	&lt;li&gt;removes tests that were broken all along and now symptomatic&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hi guys, I am getting the following exception:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(.containsKey {:one 1} :one)
;=&amp;gt; ClassCastException clojure.lang.PersistentArrayMap cannot be &lt;span class=&quot;code-keyword&quot;&gt;cast&lt;/span&gt; to clojure.lang.PersistentHashMap&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The map is a clojure.lang.PersistentArrayMap, which obviously has a containsKey method (&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentArrayMap.java#L95&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentArrayMap.java#L95&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Casting it works fine though:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(.containsKey ^clojure.lang.PersistentArrayMap {:one 1} :one)
;=&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The mailing list suggest that the compiler injects an incorrect cast to clojure.lang.PersistentHashMap. In this case it should probably be cast to a clojure.lang.Associative, the highest common interface having the .containsKey method.&lt;/p&gt;

&lt;p&gt;The problem is not present in Clojure 1.2.1.&lt;/p&gt;</description>
                <environment>Clojure 1.3 om Mac OS 10.7, Clojure 1.5.0 alpha1 on Linux x86_64 (OpenJDK 1.7.0 b147)</environment>
            <key id="15259">CLJ-944</key>
            <summary>(.containsKey {:one 1} :one) throws Exception</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stoyle">Alf Kristian St&#248;yle</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Mar 2012 02:45:09 -0600</created>
                <updated>Sat, 13 Apr 2013 12:06:35 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="29873" author="bronsa" created="Tue, 30 Oct 2012 17:02:10 -0500"  >&lt;p&gt;The attached patch fixes the issue, by emitting IPersistentMap instead of Persistent{Hash|Array}Map as class type for maps literals&lt;/p&gt;</comment>
                    <comment id="29885" author="bronsa" created="Thu, 1 Nov 2012 15:48:45 -0500"  >&lt;p&gt;I uploaded another patch fixing the same problem in a different way.&lt;br/&gt;
While 0001-Fix-for-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-944&quot; title=&quot;(.containsKey {:one 1} :one) throws Exception&quot;&gt;CLJ-944&lt;/a&gt;.patch makes clojure.lang.Complier.ConstantExpr#getJavaClass return clojure.lang.IPersistentMap for both clojure.lang.PersistentHashMap and clojure.lang.PersistentArrayMap, 0002-Fix-for-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-944&quot; title=&quot;(.containsKey {:one 1} :one) throws Exception&quot;&gt;CLJ-944&lt;/a&gt;.patch makes clojure.lang.Compiler.MapExpr#parse return a PersistentArrayMap if the length is &amp;lt;= HASHTABLE_THRESHOLD, instead of always returning a PersistentHashMap.&lt;/p&gt;

&lt;p&gt;This approach is more consistent, making the type of the compiler&apos;s internal representation of a map literal equal to the one of the reader.&lt;/p&gt;

&lt;p&gt;Note that this second approach while being more consistent, breaks some tests that assume some operations on maps (specifically `seq` and `print`) to be order dependent, and written with the hash-map return order implementation in mind.&lt;/p&gt;

&lt;p&gt;That should not be the case and if the second patch is preferred over the first one, I&apos;ll gladly fix those tests.&lt;/p&gt;</comment>
                    <comment id="30678" author="stu" created="Fri, 1 Mar 2013 12:09:44 -0600"  >&lt;p&gt;Approach #2, relying on consistent choice of concrete map class by size throughout, feels quite fragile.&lt;/p&gt;

&lt;p&gt;Approach #1 seems to abuse the method name getJavaClass(), now having it return &quot;get the base type I would need for cast&quot;.&lt;/p&gt;

&lt;p&gt;Maybe there needs to be a different thing entirely?&lt;/p&gt;</comment>
                    <comment id="30684" author="bronsa" created="Fri, 1 Mar 2013 14:17:09 -0600"  >&lt;p&gt;Patch #2 should get merged (IMHO) regardless of the fragility of its approach to fixing this ticket&apos;s bug, since it fixes another bug:&lt;/p&gt;

&lt;p&gt;prior to the patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (class {:a 1})&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;br/&gt;
user=&amp;gt; (def a {:a 1})&lt;br/&gt;
#&apos;user/a&lt;br/&gt;
user=&amp;gt; (class a)&lt;br/&gt;
clojure.lang.PersistentHashMap&lt;/p&gt;

&lt;p&gt;after the patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (class {:a 1})&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;br/&gt;
user=&amp;gt; (def a {:a 1})&lt;br/&gt;
#&apos;user/a&lt;br/&gt;
user=&amp;gt; (class a)&lt;br/&gt;
clojure.lang.PersistentArrayMap&lt;/p&gt;

&lt;p&gt;This should also lead to some &lt;b&gt;minor&lt;/b&gt; performance enhancement since prior to this moment, every map def&apos;ed would be a HashMap instead of an ArrayMap&lt;/p&gt;

&lt;p&gt;So, I think patch #2 should be applied if not for this ticket&apos;s bug, at least for the reason stated above.&lt;br/&gt;
If somebody has any proposal for making this patch more solid regarding this ticket&apos;s bug, any help is welcome&lt;/p&gt;</comment>
                    <comment id="30949" author="richhickey" created="Sat, 13 Apr 2013 09:41:58 -0500"  >&lt;p&gt;This should not have passed screening. There are two issues, should be separate. I have no idea what has been screened nor what will be applied should it be approved. There&apos;s contention in the discussion but no resolution.&lt;/p&gt;</comment>
                    <comment id="30950" author="bronsa" created="Sat, 13 Apr 2013 12:06:35 -0500"  >&lt;p&gt;I don&apos;t think that there are two issues here.&lt;br/&gt;
The issue is only one: the compiler doesn&apos;t emit maps in a way consistent with what the reader returns and with how the compiler itself uses maps.&lt;br/&gt;
The symptoms are two: some interop calls fail, and def&apos;ed vars with a literal map as value never use a PersistentArrayMap.&lt;/p&gt;

&lt;p&gt;The underlying cause of those two symtoms is fixed by the patch 002 that i submitted (incorporated in Stu&apos;s clj944-plus-tests patch.&lt;/p&gt;

&lt;p&gt;Stuart said that this approach feels fragile but the bug is caused by the fact that everywhere else clojure returns a PersistentArrayMap when the element count is &amp;lt;= than the PersistentHashMap threshold, and when emitting maps, it doesn&apos;t.&lt;/p&gt;

&lt;p&gt;Making clojure emit maps consistently with how clojure does internally everywhere else looks to me like the only solution, and I don&apos;t really see how making clojure consistent is a fragile approach.&lt;/p&gt;

&lt;p&gt;But again, if somebody can suggest a better solution to this problem, I&apos;ll gladly submit another patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11644" name="0001-Fix-for-CLJ-944.patch" size="879" author="bronsa" created="Tue, 30 Oct 2012 17:02:10 -0500" />
                    <attachment id="11655" name="0002-Fix-for-CLJ-944.patch" size="1094" author="bronsa" created="Thu, 1 Nov 2012 15:48:45 -0500" />
                    <attachment id="11955" name="clj944-plus-tests.patch" size="4827" author="stu" created="Fri, 12 Apr 2013 15:57:36 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1118] inconsistent numeric comparison semantics between BigDecimal and other Numerics</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1118</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user&amp;gt; &lt;b&gt;clojure-version&lt;/b&gt;&lt;br/&gt;
{:major 1, :minor 5, :incremental 0, :qualifier &quot;beta1&quot;}&lt;br/&gt;
user&amp;gt; (== 2.0 2.0M)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2 2.0M)&lt;br/&gt;
false                  &amp;lt;-- this one is not like the others&lt;br/&gt;
user&amp;gt; (== 2 2.0)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2N 2.0)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2 (double 2.0M))&lt;br/&gt;
true&lt;/p&gt;


&lt;p&gt;It&apos;s not clear if this is a bug or an enhancement request, Should BigDecimal&apos;s be special in comparason to their smaller equivalents?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15867">CLJ-1118</key>
            <summary>inconsistent numeric comparison semantics between BigDecimal and other Numerics</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="arthurulfeldt">Arthur Ulfeldt</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Nov 2012 13:36:57 -0600</created>
                <updated>Thu, 25 Apr 2013 19:58:50 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30113" author="arthurulfeldt" created="Fri, 30 Nov 2012 13:51:10 -0600"  >&lt;p&gt;I understand that the definition of equality between bigDecimals is dependent on both value and scale as in this case:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (== 0.000000M 0.0M)&lt;br/&gt;
false&lt;/p&gt;

&lt;p&gt;I just want to make sure the decission to propagate that semantic across types is intentional. If this is on purpose than this is not a bug.&lt;/p&gt;</comment>
                    <comment id="30114" author="arthurulfeldt" created="Fri, 30 Nov 2012 14:03:16 -0600"  >&lt;p&gt;this could be fixed by calling stripTrailingZeros on bigDecimals before comparing them to Longs or BigInts.  &lt;/p&gt;

&lt;p&gt;(== 2 (double (. 2.0M stripTrailingZeros)))&lt;br/&gt;
true&lt;/p&gt;

&lt;p&gt;Edited by Andy Fingerhut: Unfortunately that fails for BigDecimal values equal to 0, unless they happen to have a scale that matches what you are comparing it to.&lt;/p&gt;

&lt;p&gt;I think a more complete solution is to use BigDecimal&apos;s compareTo method, e.g.:&lt;/p&gt;

&lt;p&gt;(zero? (.compareTo 2.0M (bigdec 2)))&lt;br/&gt;
true&lt;/p&gt;</comment>
                    <comment id="30166" author="halgari" created="Mon, 3 Dec 2012 11:31:33 -0600"  >&lt;p&gt;It seems we need some more eyes on this issue, can you bring this up on clojure-dev and see what they think?&lt;/p&gt;</comment>
                    <comment id="30959" author="jafingerhut" created="Sun, 14 Apr 2013 04:03:23 -0500"  >&lt;p&gt;Patch clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v1.txt dated Apr 14 2013 changes equiv for BigDecimals so that instead of using BigDecimal.equals(), it uses BigDecimal.compareTo() and checks the return value is equal to 0.&lt;/p&gt;

&lt;p&gt;The Java docs for these methods explicitly state that BigDecimal.equals() will treat values that are otherwise equal numerically, but differ in scale, as not equal.&lt;/p&gt;

&lt;p&gt;They also say that BigDecimal.compareTo() will return 0 for such BigDecimals.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure if this is the preferred behavior for Clojure, but if it is, this patch should do it.&lt;/p&gt;</comment>
                    <comment id="30961" author="jafingerhut" created="Mon, 15 Apr 2013 00:18:55 -0500"  >&lt;p&gt;clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v2.txt dated Apr 14 2013 is same as clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v1.txt described in previous comment, except it also has some new tests included.&lt;/p&gt;</comment>
                    <comment id="30963" author="jafingerhut" created="Mon, 15 Apr 2013 21:07:44 -0500"  >&lt;p&gt;clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v3.txt dated Apr 15 2013 is the same as the the previous patch clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v2.txt, except for the following:&lt;/p&gt;

&lt;p&gt;By changing == behavior for BigDecimal by modifying the BigDecimalOps.equiv() method, that also changes the behavior of = when comparing BigDecimal values to other numbers.  hash should be consistent with =, so now hash should return same value for all numerically equal BigDecimal values.  This patch should achieve that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11960" name="clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v3.txt" size="4136" author="jafingerhut" created="Mon, 15 Apr 2013 21:07:44 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-827] unsigned-bit-shift-right</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-827</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Add a clojure equivalent of &amp;gt;&amp;gt;&amp;gt;.&lt;/p&gt;

&lt;p&gt;A simple version of this is implemented here (&lt;a href=&quot;https://github.com/joegallo/clojure/tree/unsigned-bit-shift-right&quot;&gt;https://github.com/joegallo/clojure/tree/unsigned-bit-shift-right&lt;/a&gt;), and just follows the example set by shift-right.&lt;/p&gt;

&lt;p&gt;The downside of this implementation is that it treats all integer types as longs, and shifts them accordingly, which yields different results than you would get in java.  A previous version of this did not have the same problem, when BitOps was its own thing.  I&apos;m not sure if this limitation is acceptable and appropriate, or needs to be worked around (my inclination is the latter).&lt;/p&gt;</description>
                <environment></environment>
            <key id="14572">CLJ-827</key>
            <summary>unsigned-bit-shift-right</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="joegallo">Joe Gallo</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Aug 2011 11:42:09 -0500</created>
                <updated>Fri, 12 Apr 2013 09:52:24 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>12</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="27276" author="joegallo" created="Fri, 11 Nov 2011 12:58:31 -0600"  >&lt;p&gt;I just realized (with the asssistance of Paul Stadig) that just doing only longs is probably sufficient, as you can get the integer version if you really want it: &lt;/p&gt;

&lt;p&gt;&amp;gt; (int (bit-and Integer/MAX_VALUE (unsigned-bit-shift-right -5 1)))&lt;br/&gt;
2147483645 &lt;/p&gt;

&lt;p&gt;Of course, that&apos;s less efficient than just doing it directly with java, but it&apos;s enough that I think my concern from the previous comment is addressed.&lt;/p&gt;
</comment>
                    <comment id="27579" author="timmc" created="Mon, 16 Jan 2012 18:01:02 -0600"  >&lt;p&gt;I have attached &quot;0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-827&quot; title=&quot;unsigned-bit-shift-right&quot;&gt;CLJ-827&lt;/a&gt;-Add-bit-shift-right-logical.patch&quot;, which implements a logical bit-shift-right using the same JVM bytecode as &amp;gt;&amp;gt;&amp;gt;.&lt;/p&gt;

&lt;p&gt;The patch mimics the implementations of &amp;lt;&amp;lt; and &amp;gt;&amp;gt;.&lt;/p&gt;</comment>
                    <comment id="30534" author="stu" created="Sat, 2 Feb 2013 17:09:24 -0600"  >&lt;p&gt;For context, this feature appears to be needed for Clojure-in-Clojure data structures: &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/iAwH7CLSFzE/6wzDH4RS1YQJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/iAwH7CLSFzE/6wzDH4RS1YQJ&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30570" author="michalmarczyk" created="Fri, 8 Feb 2013 05:31:06 -0600"  >&lt;p&gt;Just wanted to note that I&apos;ve introduced this operation to ClojureScript when implementing PersistentHashMap. The name over there is bit-shift-right-zero-fill. Would it be alright for Clojure to use that name? Failing that, ClojureScript would probably have to change to match.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10694" name="0001-add-unsigned-bit-shift-right.patch" size="2301" author="joegallo" created="Fri, 11 Nov 2011 13:03:06 -0600" />
                    <attachment id="10776" name="0001-CLJ-827-Add-bit-shift-right-logical.patch" size="3261" author="timmc" created="Mon, 16 Jan 2012 18:01:02 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1208] Namespace is not loaded on defrecord class init</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1208</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As a user of Clojure interop from Java, I want defrecords (and deftypes?) to load their namespaces upon class initialization so that I can simply construct and use AOT&apos;d record classes without manually requiring their namespaces first.&lt;/p&gt;

&lt;p&gt;Calling the defrecord&apos;s constructor may or may not result in &quot;Attempting to call unbound fn&quot; exceptions, depending on what code has already been run.&lt;/p&gt;

&lt;p&gt;This issue has been raised several times over the years, but I could not find an existing ticket for it:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/4CtSVWcD15A/shpMuyjMpxsJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/4CtSVWcD15A/shpMuyjMpxsJ&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://groups.google.com/d/msg/clojure/3DekTQZfDTk/wlssZL7EQWEJ&quot;&gt;https://groups.google.com/d/msg/clojure/3DekTQZfDTk/wlssZL7EQWEJ&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://groups.google.com/d/msg/clojure/K4gfjrLe8GA/OnB5g4SU0l8J&quot;&gt;https://groups.google.com/d/msg/clojure/K4gfjrLe8GA/OnB5g4SU0l8J&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="16176">CLJ-1208</key>
            <summary>Namespace is not loaded on defrecord class init</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="timmc">Tim McCormack</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 May 2013 17:21:54 -0500</created>
                <updated>Fri, 3 May 2013 17:21:54 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1202] protocol fns with dashes may get compiled into property access when used higher order</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1202</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (defprotocol Foo (-foo [x]))
Foo
user=&amp;gt; (deftype Bar [] Foo (-foo [_] :baz))
user.Bar
user=&amp;gt; (map -foo [(Bar.)])
IllegalArgumentException No matching field found: foo &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; class user.Bar  
clojure.lang.Reflector.getInstanceField (Reflector.java:271)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I would have expected to see (:baz). The full stack is:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;IllegalArgumentException No matching field found: foo &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; class user.Bar
	clojure.lang.Reflector.getInstanceField (Reflector.java:271)
	clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:300)
	user/eval79/fn--80/G--71--82 (NO_SOURCE_FILE:11)
	user/eval79/fn--80/G--70--85 (NO_SOURCE_FILE:11)
	clojure.core/map/fn--4207 (core.clj:2485)
	clojure.lang.LazySeq.sval (LazySeq.java:42)
	clojure.lang.LazySeq.seq (LazySeq.java:60)
	clojure.lang.RT.seq (RT.java:484)
	clojure.core/seq (core.clj:133)
	clojure.core/print-sequential (core_print.clj:46)
	clojure.core/fn--5406 (core_print.clj:143)
	clojure.lang.MultiFn.invoke (MultiFn.java:231)
nil&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I suspect this is somehow related to the property access changes to make Clojure/ClojureScript compatible. I was in fact prepping core.logic for a unified code base and was adopting the ClojureScript protocol naming convention when I encountered this issue.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-872&quot; title=&quot;Add support for property lookup&quot;&gt;&lt;del&gt;CLJ-872&lt;/del&gt;&lt;/a&gt; added dash property support to Clojure.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16147">CLJ-1202</key>
            <summary>protocol fns with dashes may get compiled into property access when used higher order</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="dnolen">David Nolen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Apr 2013 20:48:27 -0500</created>
                <updated>Fri, 10 May 2013 15:19:29 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="30970" author="amalloy" created="Thu, 18 Apr 2013 19:18:35 -0500"  >&lt;p&gt;Attached patch fixes the issue, and adds regression test for it.&lt;/p&gt;</comment>
                    <comment id="31080" author="cldwalker" created="Fri, 10 May 2013 15:19:29 -0500"  >&lt;p&gt;Verified patch works&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11962" name="CLJ-1202.patch" size="1759" author="amalloy" created="Thu, 18 Apr 2013 19:18:35 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1207] Importing a class that does not exist fails to report the name of the class that did not exist</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1207</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Pop quiz: What Java class is missing from the classpath?&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;java.lang.NoClassDefFoundError: Could not initialize class com.annadaletech.nexus.util.logging__init
 at java.lang.Class.forName0 (Class.java:-2)
    java.lang.Class.forName (Class.java:264)
    clojure.lang.RT.loadClassForName (RT.java:2098)
    clojure.lang.RT.load (RT.java:430)
    clojure.lang.RT.load (RT.java:411)
    clojure.core$load$fn__5018.invoke (core.clj:5530)
    clojure.core$load.doInvoke (core.clj:5529)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$load_one.invoke (core.clj:5336)
    clojure.core$load_lib$fn__4967.invoke (core.clj:5375)
    clojure.core$load_lib.doInvoke (core.clj:5374)
    clojure.lang.RestFn.applyTo (RestFn.java:142)
    clojure.core$apply.invoke (core.clj:619)
    clojure.core$load_libs.doInvoke (core.clj:5413)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:619)
    clojure.core$require.doInvoke (core.clj:5496)
    clojure.lang.RestFn.invoke (RestFn.java:512)
    novate.console.app$eval1736$loading__4910__auto____1737.invoke (app.clj:1)
    novate.console.app$eval1736.invoke (app.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6619)
    clojure.lang.Compiler.eval (Compiler.java:6608)
    clojure.lang.Compiler.load (Compiler.java:7064)
    user$eval1732.invoke (NO_SOURCE_FILE:1)
    clojure.lang.Compiler.eval (Compiler.java:6619)
    clojure.lang.Compiler.eval (Compiler.java:6582)
    clojure.core$eval.invoke (core.clj:2852)
    clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259)
    clojure.main$repl$read_eval_print__6588.invoke (main.clj:259)
    clojure.main$repl$fn__6597.invoke (main.clj:277)
    clojure.main$repl.doInvoke (main.clj:277)
    clojure.lang.RestFn.invoke (RestFn.java:1096)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__584.invoke (interruptible_eval.clj:56)
    clojure.lang.AFn.applyToHelper (AFn.java:159)
    clojure.lang.AFn.applyTo (AFn.java:151)
    clojure.core$apply.invoke (core.clj:617)
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1788)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:41)
    clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__625$fn__628.invoke (interruptible_eval.clj:171)
    clojure.core$comp$fn__4154.invoke (core.clj:2330)
    clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__618.invoke (interruptible_eval.clj:138)
    clojure.lang.AFn.run (AFn.java:24)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
    java.lang.Thread.run (Thread.java:722)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you guess &quot;com.annadaletech.nexus.util.logging__init&quot; you are wrong!&lt;/p&gt;

&lt;p&gt;Wait, I&apos;ll give you a hint:&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;(ns com.annadaletech.nexus.util.logging
  (:use [clojure.string :only [trim-newline]]
        [clojure.pprint :only [code-dispatch pprint with-pprint-dispatch *print-right-margin*]])
  (:import [java.io StringWriter]
           [org.slf4j MDC MarkerFactory Marker LoggerFactory]
           [java.util.concurrent.locks ReentrantLock]))

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Oh, sorry, did that not help?&lt;/p&gt;

&lt;p&gt;The correct answer is &quot;org.slf4j.MDC&quot;.  &lt;/p&gt;

&lt;p&gt;Having that information in the stack trace would have saved me nearly an hour. I think it is worth the effort to get that reported correctly.&lt;/p&gt;</description>
                <environment>1.5.1, OS X</environment>
            <key id="16172">CLJ-1207</key>
            <summary>Importing a class that does not exist fails to report the name of the class that did not exist</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>feedback</label>
                    </labels>
                <created>Mon, 29 Apr 2013 17:36:32 -0500</created>
                <updated>Fri, 10 May 2013 16:51:24 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31079" author="cldwalker" created="Fri, 10 May 2013 13:56:45 -0500"  >&lt;p&gt;When I try this on a fresh project, I get this error:&lt;br/&gt;
&quot;ClassNotFoundException org.slf4j.MDC&lt;br/&gt;
        java.net.URLClassLoader$1.run (URLClassLoader.java:202)&lt;br/&gt;
        java.security.AccessController.doPrivileged (AccessController.java:-2)&quot;&lt;/p&gt;

&lt;p&gt;Howard, could you give us a project.clj or better yet a github repository that recreates this issue?&lt;/p&gt;</comment>
                    <comment id="31082" author="hlewisship" created="Fri, 10 May 2013 16:51:24 -0500"  >&lt;p&gt;I&apos;ll see what I can do. Probably be next week. Thanks for looking at this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                        <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>hlewisship</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1125] Clojure can leak memory when used in a servlet container</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1125</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When used within a servlet container&lt;br/&gt;
(Jetty/Tomcat/JBossAS/Immutant/etc), the thread locals Var.dvals (used&lt;br/&gt;
to store dynamic bindings) and LockingTransaction.transaction (used to&lt;br/&gt;
store the currently active transaction(s)) prevent all of the classes&lt;br/&gt;
loaded by an application&apos;s clojure runtime from being garbage collected, &lt;br/&gt;
resulting in a memory leak.&lt;/p&gt;

&lt;p&gt;The issue comes from threads living beyond the lifetime of a&lt;br/&gt;
deployment - servlet containers use thread pools that are shared&lt;br/&gt;
across all applications within the container. Currently, the dvals and&lt;br/&gt;
transaction thread locals are not discarded when they are no longer&lt;br/&gt;
needed, causing their contents to retain a hard reference to their&lt;br/&gt;
classloaders, which, in turn, causes all of the classes loaded under&lt;br/&gt;
the application&apos;s classloader to be retained until the thread exits&lt;br/&gt;
(which is generally at JVM shutdown).&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a patch that does the following:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Var.dvals is now removed when the thread bindings are popped&lt;/li&gt;
	&lt;li&gt;Var.dvals no longer has an initialValue, so checking to see if it is&lt;br/&gt;
  set will no longer set it to an empty Frame&lt;/li&gt;
	&lt;li&gt;The outer transaction in LockingTransaction.transaction now removes&lt;br/&gt;
  the thread local when it is finished&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There is still the opportunity for memory leaks if agents or futures &lt;br/&gt;
are used, and the executors used for them are not shutdown when the&lt;br/&gt;
app is undeployed. That&apos;s a solvable problem, but should probably be&lt;br/&gt;
solved by the containers themselves (and/or the war generation tools) &lt;br/&gt;
instead of in clojure itself.&lt;/p&gt;

&lt;p&gt;This patch has a small performance impact: its use of a try/finally &lt;br/&gt;
around running transactions to remove the outer transaction adds &lt;br/&gt;
4-6 microseconds to each transaction call on my hardware.&lt;/p&gt;

&lt;p&gt;Providing an automated test for this patch is difficult - I&apos;ve tested&lt;br/&gt;
it locally with repeated deployments to a container while monitoring&lt;br/&gt;
GC and permgen. All of clojure&apos;s tests pass with it applied.&lt;/p&gt;

&lt;p&gt;The above is a condensation of:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/3CXDe8_9G58/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/3CXDe8_9G58/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m happy to provide whatever feedback/work is needed to get this&lt;br/&gt;
applied.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15882">CLJ-1125</key>
            <summary>Clojure can leak memory when used in a servlet container</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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tcrawley">Toby Crawley</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Dec 2012 15:01:15 -0600</created>
                <updated>Mon, 13 May 2013 19:30:16 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>8</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="31088" author="trptcolin" created="Mon, 13 May 2013 19:30:16 -0500"  >&lt;p&gt;This patch works great for me to avoid OOM/PermGen crashes from classloaders being retained &lt;span class=&quot;error&quot;&gt;&amp;#91;mine is a non-servlet use case&amp;#93;&lt;/span&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11756" name="threadlocal-removal-tcrawley-2012-12-11.diff" size="3685" author="tcrawley" created="Tue, 11 Dec 2012 15:01:15 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-322] Enhance AOT compilation process to emit classfiles only for explicitly-specified namespaces</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-322</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This was &lt;a href=&quot;https://www.assembla.com/spaces/clojure-contrib/tickets/23&quot;&gt;originally/erroneously reported&lt;/a&gt; by Howard Lewis Ship in the clojure-contrib assembla:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;My build file specifies the namespaces to AOT compile but &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; I include another namespace
(even from a JAR dependency) that is not AOT compiled, the other namespace will be compiled as well.

In my &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt;, I was using clojure-contrib&apos;s clojure.contrib.str-utils2 namespace, and I got a bunch of
clojure/contrib/str_utils2 classes in my output directory.

I think that the AOT compiler should NOT precompile any namespaces that are transitively reached,
only namespaces in the set specified by the command line are appropriate.

As currently coded, you will frequently find unwanted third-party dependencies in your output JARs;
further, &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; multiple parties depend on the same JARs, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; could cause bloating and duplication in the
eventual runtime classpath.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Having the option of shipping either all AOT-compiled classfiles or mixed source/AOT depending upon one&apos;s distribution requirements would make that phase of work with a clojure codebase significantly easier and less error-prone.  The only question in my mind is what the default should be.  We&apos;re all used to the current behaviour, but I&apos;d guess that any nontrivial project where the form of the distributable matters (i.e. the source/AOT mix), providing as much control as possible by default makes the most sense.  Given the tooling that most people are using, it&apos;s trivial (and common practice, IIUC) to provide a comprehensive list of namespaces one wishes to compile, so making that the default shouldn&apos;t be a hurdle to anyone.  If an escape hatch is desired, a --transitive switch to clojure.lang.Compile could be added.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13719">CLJ-322</key>
            <summary>Enhance AOT compilation process to emit classfiles only for explicitly-specified namespaces</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Apr 2010 00:20:00 -0500</created>
                <updated>Fri, 12 Apr 2013 09:52:24 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>12</votes>
                        <watches>11</watches>
                        <comments>
                    <comment id="23775" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/322&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/322&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
aot-transitivity-option-compat-322.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aI7Eu-HeGr35ImeJe5cbLA/download/aI7Eu-HeGr35ImeJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aI7Eu-HeGr35ImeJe5cbLA/download/aI7Eu-HeGr35ImeJe5cbLA&lt;/a&gt;&lt;br/&gt;
aot-transitivity-option-322.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aIWFiWHeGr35ImeJe5cbLA/download/aIWFiWHeGr35ImeJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aIWFiWHeGr35ImeJe5cbLA/download/aIWFiWHeGr35ImeJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23776" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;hlship said: I&apos;d like to reinforce this.  I&apos;ve been doing research on Clojure build tools for an upcoming talk and all of them (Maven, Leiningen, Gradle) have the same problem: the AOT compile extends from the desired namespaces (such as one containing a :gen-class)  to every reached namespace.  This is going to cause a real ugliness when application A uses libraries B and C that both depend on library D (such as clojure-contrib) and B and C are thus both bloated with duplicate, unwanted AOT compiled  classes from the library D.&lt;/p&gt;</comment>
                    <comment id="23777" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: This behaviour is an implementation detail of Clojure&apos;s AOT compilation process, and is orthogonal to any particular build tooling.&lt;/p&gt;

&lt;p&gt;I am working on a patch that would provide a mechanism for such tooling to disable this default behaviour.&lt;/p&gt;</comment>
                    <comment id="23778" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: A first cut of a change to address this issue is here (&lt;b&gt;caution, work in progress!&lt;/b&gt;):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/cemerick/clojure/commit/6f14e0790c0d283a7e44056adf1bb3f36bb16e0e&quot;&gt;http://github.com/cemerick/clojure/commit/6f14e0790c0d283a7e44056adf1bb3f36bb16e0e&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes available a new recognized system property, &lt;tt&gt;clojure.compiler.transitive&lt;/tt&gt;, which defaults to &lt;tt&gt;true&lt;/tt&gt;.  When set/bound to false (i.e. &lt;tt&gt;-Dclojure.compiler.transitive=false&lt;/tt&gt; when using &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt;), only the first loaded file (either the ns named in the call to &lt;tt&gt;compile&lt;/tt&gt; or each of the namespaces named as arguments to &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt;) will have classfiles written to disk.&lt;/p&gt;

&lt;p&gt;This means that this compilation invocation:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java -cp &amp;lt;your classpath&amp;gt; -Dclojure.compiler.transitive=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; clojure.lang.Compile com.bar com.baz&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;will generate classfiles only for &lt;tt&gt;com.bar&lt;/tt&gt; and &lt;tt&gt;com.baz&lt;/tt&gt;, but not for any of the namespaces or other files they load, require, or use.&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;The only shortcoming of this WIP patch is that classfiles &lt;b&gt;are&lt;/b&gt; still generated for proxy and gen-class classes defined outside of the explicitly-named namespaces.  What I thought was a solution for this ended up breaking the loading of generated interfaces (as produced by defprotocol, etc).&lt;/p&gt;

&lt;p&gt;I&apos;ll take a second look at this before the end of the week, but wanted to get this out there so as to get any comments people might have.&lt;/p&gt;</comment>
                    <comment id="23779" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;technomancy said: Looks good, but I&apos;m having trouble getting it to work. I tried compiling from master of Chas&apos;s fork on github, but I still got the all the .class files generated with -Dclojure.compiler.transitive=false. It could be a quirk of the way I&apos;m using ant to fork off processes though. Is it possible to set it using System/setProperty, or must it be given as a property on the command-line?&lt;/p&gt;</comment>
                    <comment id="23780" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: Bah, that&apos;s just bad documentation. :-/&lt;/p&gt;

&lt;p&gt;The system property is only provided by &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt;; the value of it drives the binding of &lt;tt&gt;clojure.core/&lt;b&gt;transitive-compile&lt;/b&gt;&lt;/tt&gt;, which has a root binding of true.&lt;/p&gt;

&lt;p&gt;You should be able to configure the transitivity the same way you configure &lt;tt&gt;&lt;b&gt;compile-path&lt;/b&gt;&lt;/tt&gt; (system prop to &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt; or a direct binding when at the REPL, etc).&lt;/p&gt;

&lt;p&gt;If not, ping me in irc or elsewhere.&lt;/p&gt;</comment>
                    <comment id="23781" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;meikelbrandmeyer said: I think, excluding parts &apos;load&apos;ed is a little strong. I have some namespaces which load several parts from different files, but which belong to the same namespace. The most prominent example of such a case is clojure.core itself. I&apos;m find with stopping require and use, but load is a bit too much, I&apos;d say.&lt;/p&gt;</comment>
                    <comment id="23782" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;technomancy said: Chas: Thanks; will give that a go.&lt;/p&gt;

&lt;p&gt;Meikel: Do people actually use load outside of clojure.core? I thought it was only used there because clojure.core is a &quot;special&quot; namespace where you want more vars to be available than can reasonably fit in a single file. Splitting up a namespace into several files is quite unadvisable otherwise.&lt;/p&gt;</comment>
                    <comment id="23783" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;technomancy said: I can confirm that this works for me modulo the proxy/gen-class issue that Chas mentioned. I would love to see this in Clojure 1.2; it would really clean up a lot of build-related issues.&lt;/p&gt;</comment>
                    <comment id="23784" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;meikelbrandmeyer said: I used it several times and this is the first time, I hear that it is unadvisable to do so. Even with a lower number of Vars in the namespace (c.c is here certainly exceptional) and might be of use to split several &quot;sections&quot; of code which belong to the same namespace but have different functionality. Whether to use a big comment in the source to indicate the section or split things into subfiles is a matter of taste. But it&apos;s a perfectly reasonable thing todo.&lt;/p&gt;

&lt;p&gt;Another use case, where I use this (and c.c.lazy-xml, IIRC) is to conditionally load code depending on whether a dependency is available or not. Eg. vimclojure uses c.c.pprint and c.c.stacktrace/clj-stacktrace transparently depending on their availability.&lt;/p&gt;

&lt;p&gt;There are perfectly legal uses of load. I don&apos;t see any &quot;unadvisable&quot; here.&lt;/p&gt;</comment>
                    <comment id="23785" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: Thanks, Meikel; I had forgotten about that use case, as I don&apos;t use load directly myself at all.  I probably wouldn&apos;t say it&apos;s inadvisable, just mostly unnecessary.  In any case, that&apos;s a good catch.  It complicates things a bit, but we&apos;ll see what happens.  I&apos;m going to take another whack at resolving the proxy/gen-class case and narrowing the impact of nontransitivity to use and require later tonight.&lt;/p&gt;

&lt;p&gt;I agree wholeheartedly that this should be in 1.2, assuming the technical bits work out.  This has been an irritant for quite a long time.  I actually believe that nontransitivity should be the &lt;b&gt;default&lt;/b&gt; &amp;#8211; no one wants or expects to have classfiles show up for dependencies show up when a project is AOT-compiled.  I think the only negative impact would be whoever still fiddles with compilation at the REPL, and doesn&apos;t use maven or lein &amp;#8211; and even then, it&apos;s just a matter of binding another var.&lt;/p&gt;</comment>
                    <comment id="23786" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;meikelbrandmeyer said: Then the var should be added to the default bindings in the clojure.main repl. Then it&apos;s set!-able like the other vars &#65533;&#65533;&#65533; &lt;b&gt;warn-on-reflection&lt;/b&gt; and friends.&lt;/p&gt;</comment>
                    <comment id="23787" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: This is looking pretty good (&lt;b&gt;still WIP&lt;/b&gt;):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/cemerick/clojure/commit/fedfb022ecef420a932b3d69c182ec7a8e5960a6&quot;&gt;http://github.com/cemerick/clojure/commit/fedfb022ecef420a932b3d69c182ec7a8e5960a6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you again for mentioning load, Meikel: it was very helpful in resolving the proxy/gen-class issue as well.&lt;/p&gt;

&lt;p&gt;Just a single data point: the jar produced by the medium-sized project I&apos;ve been using for testing the changes has shrunk from 1.8MB to less than 1MB.  That&apos;s not the only reason this is a good change, but it&apos;s certainly a nice side-effect.&lt;/p&gt;</comment>
                    <comment id="23788" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: [&lt;a href=&quot;file:aIWFiWHeGr35ImeJe5cbLA&quot;&gt;file:aIWFiWHeGr35ImeJe5cbLA&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23789" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: [&lt;a href=&quot;file:aI7Eu-HeGr35ImeJe5cbLA&quot;&gt;file:aI7Eu-HeGr35ImeJe5cbLA&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23790" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: Patched attached.  The &lt;del&gt;compat&lt;/del&gt; one retains the current default behaviour &lt;span class=&quot;error&quot;&gt;&amp;#91;*transitive-compile* true&amp;#93;&lt;/span&gt;, the other changes the default so that transitivity is a non-default option.  At least of those I&apos;ve spoken to about this, the latter is preferred.&lt;/p&gt;

&lt;p&gt;The user impact of changing the default would be:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;The result of compiling from the REPL will change. Getting back current behaviour would require adding a &lt;span class=&quot;error&quot;&gt;&amp;#91;*transitive-compile* true&amp;#93;&lt;/span&gt; binding to the existing bindings one must set when compiling from the REPL.&lt;/li&gt;
	&lt;li&gt;The same as #1 goes for those scripting AOT compilation via &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt; as well (whether by shell scripts, ant, etc).&lt;/li&gt;
	&lt;li&gt;Those using lein, clojure-maven-plugin, gradle, and others will likely have a new option provided by those tools, and perhaps a different default than the language&apos;s.  I suspect those using such tools would much prefer a change from the default behaviour in any case.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="23791" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;hlship said: Just had a brain-storm:&lt;/p&gt;

&lt;p&gt;How about an option to support  transitive compilation, but only if the Clojure source file being compiled as a file: URL (i.e., its a local file on the file system, not a file stored in a JAR). That would make it easier to use compilation on the local project without transitively compiling imported libraries, such as clojure-contrib.&lt;/p&gt;

&lt;p&gt;So &lt;b&gt;transitive-compile&lt;/b&gt; should be a keyword, not a boolean, with values :all (for 1.1 behavior), :none (to compile only the exact specified namespaces) or :local (to compile transitively, but only for local files, not source files from JARs).&lt;/p&gt;</comment>
                    <comment id="23792" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;cemerick said: (Crossposted to the clojure-dev list)&lt;/p&gt;

&lt;p&gt;I thought about this some, and I don&apos;t think that&apos;s a good idea, at least for now.  I&apos;m uncomfortable with semantics changing depending upon where code is being loaded from &amp;#8211; which, depending upon a tool&apos;s implementation, might be undefined.  E.g. if the com.foo.bar ns is available in source form in one directory, but as classes from a jar, and classpaths aren&apos;t being constructed in a stable fashion, then the results of compilation will change.&lt;/p&gt;

&lt;p&gt;If we decide that special treatment depending upon the source of code is warranted in the future, that&apos;s a fairly straightforward thing to do w.r.t. the API &amp;#8211; we could have :all and :local as you suggest, with nil representing :none.&lt;/p&gt;</comment>
                    <comment id="23793" author="importer" created="Tue, 28 Sep 2010 00:18:00 -0500"  >&lt;p&gt;stu said: Rich is not comfortable enough with the implementation complexity of this patch (e.g. the guard clause for proxies and gen-class) to slide this in as a minor fix under the wire for 1.2. &lt;/p&gt;

&lt;p&gt;Better to live with the pain we know a little longer than ship something we don&apos;t have enough experience with to be confident.&lt;/p&gt;</comment>
                    <comment id="25949" author="cemerick" created="Fri, 19 Nov 2010 21:28:37 -0600"  >&lt;p&gt;Updated patch to cleanly apply to HEAD and address issues raised by screening done by &lt;a href=&quot;http://groups.google.com/group/clojure-dev/msg/0771729b72e04c9e&quot;&gt;Cosmin Stejerean&lt;/a&gt;.  Also includes proper tests.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note: this patch&apos;s tests require the fix for&lt;/b&gt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-432&quot; title=&quot;deftype does not work if containing ns contains dashes&quot;&gt;&lt;del&gt;CLJ-432&lt;/del&gt;&lt;/a&gt;!&lt;/p&gt;</comment>
                    <comment id="25971" author="stu" created="Mon, 29 Nov 2010 07:18:41 -0600"  >&lt;p&gt;the &quot;-resolved&quot; patch resolves a conflict in main.clj&lt;/p&gt;</comment>
                    <comment id="25972" author="stu" created="Mon, 29 Nov 2010 07:25:20 -0600"  >&lt;p&gt;Several questions:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;I am getting an ant build error: &quot;/Users/stuart/repos/clojure/build.xml:137: java.io.FileNotFoundException: Could not locate clojure/test_clojure/aot/nontransitive__init.class or clojure/test_clojure/aot/nontransitive.clj on classpath:&quot;&lt;/li&gt;
	&lt;li&gt;It feels icky to have a method named writeClassFile that, under some circumstances, does &lt;b&gt;not&lt;/b&gt; write a class file, but instead loads it via a dynamic loader. Maybe this is just a naming issue.&lt;/li&gt;
	&lt;li&gt;Are there any other ways to accomplish the goals of &lt;tt&gt;&lt;b&gt;load-level&lt;/b&gt;&lt;/tt&gt;? Or, taking the other side, if we are going to have a &lt;b&gt;load-level&lt;/b&gt;, are there other possible consumers who might have different needs?&lt;/li&gt;
	&lt;li&gt;(Minor) Why the &lt;tt&gt;use :only&lt;/tt&gt; idiom instead of just &lt;tt&gt;require&lt;/tt&gt;?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26023" author="stuart.sierra" created="Fri, 10 Dec 2010 15:34:32 -0600"  >&lt;p&gt;An alternative approach: patch write-classes-1.diff.gz&lt;/p&gt;

&lt;p&gt;From &lt;a href=&quot;https://github.com/stuartsierra/clojure/tree/write-classes&quot;&gt;my forked branch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What this patch does:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Keeps &apos;compile&apos; and &apos;&lt;b&gt;compile-files&lt;/b&gt;&apos; exactly the same&lt;/li&gt;
	&lt;li&gt;Adds &apos;compile-write-classes&apos; to write .class files for specifically named classes&lt;/li&gt;
	&lt;li&gt;Minor compiler changes to support this&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This approach was prompted by the following observations:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Java interop is the dominant reason for needing .class files&lt;/li&gt;
	&lt;li&gt;Things other than namespaces can generate classes for Java interop:
	&lt;ul&gt;
		&lt;li&gt;deftype/defrecord&lt;/li&gt;
		&lt;li&gt;defprotocol&lt;/li&gt;
		&lt;li&gt;gen-class/gen-interface&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;For library releases, we want to control which .class files are emitted on a per-class basis, not per-namespace&lt;/li&gt;
	&lt;li&gt;Some legitimate uses of AOT compilation will want transitive compilation
	&lt;ul&gt;
		&lt;li&gt;Pre-compiling an entire application before release&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="26024" author="cemerick" created="Fri, 10 Dec 2010 16:04:25 -0600"  >&lt;p&gt;S. Halloway: My apologies, I didn&apos;t know you had commented.  I thought that, having assigned this issue to myself, I&apos;d be notified of updates. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;FWIW, I aim to review your comments and SS&apos; approach over the weekend.&lt;/p&gt;</comment>
                    <comment id="26035" author="cemerick" created="Thu, 16 Dec 2010 07:36:22 -0600"  >&lt;p&gt;S. Halloway:&lt;/p&gt;

&lt;p&gt;1. Certainly shouldn&apos;t happen.  AFAIK, others have screened the patch, presumably with a successful build.&lt;br/&gt;
2. Agreed; given the approach, I think it&apos;s just a bad name.&lt;br/&gt;
3. Yes, I think S. Sierra&apos;s is one.  See my next comment.&lt;br/&gt;
4. Because the &lt;tt&gt;:use&lt;/tt&gt; form was already there. I&apos;ve actually been using that form of &lt;tt&gt;:use&lt;/tt&gt; more and more; I&apos;ve found that easier than occasionally having to shuffle around specs between &lt;tt&gt;:use&lt;/tt&gt; and &lt;tt&gt;:require&lt;/tt&gt;. I think I&apos;m aping Chris Houser in that regard.&lt;/p&gt;</comment>
                    <comment id="26036" author="cemerick" created="Thu, 16 Dec 2010 09:00:03 -0600"  >&lt;p&gt;I think S. Sierra&apos;s approach is fundamentally superior what I offered.  I have two suggestions: one slight perspective change (which implies no change in the actual implementation), and an idea for an even simpler approach (at least from a user perspective), in that order.&lt;/p&gt;

&lt;p&gt;While interop is the driving requirement behind AOT, I absolutely do not want to have to keep an updated enumeration of all of the classes resulting from each and every &lt;tt&gt;defrecord&lt;/tt&gt; et al. usages in my &lt;tt&gt;pom.xml&lt;/tt&gt;/&lt;tt&gt;project.clj&lt;/tt&gt; (and I wouldn&apos;t wish the task of ferreting those usages and their resulting classnames on any build tool author).&lt;/p&gt;

&lt;p&gt;Right now, &lt;tt&gt;&amp;#42;compile-write-classes&amp;#42;&lt;/tt&gt; is documented to be a set of classname strings, but could just as easily be any other function.  &lt;tt&gt;&amp;#42;compile-write-classes&amp;#42;&lt;/tt&gt; should be documented to accept any predicate function (renamed to e.g. &lt;tt&gt;&amp;#42;compile-write-class?&amp;#42;&lt;/tt&gt;?).  There&apos;s no reason why it shouldn&apos;t be bound to, e.g. &lt;tt&gt;#(re-matches #&quot;foo\.bar\.[\w&amp;#95;]+$&quot; %)&lt;/tt&gt; if I know that all my records are defined in the &lt;tt&gt;foo.bar&lt;/tt&gt; namespace.&lt;/p&gt;

&lt;p&gt;To go along with that, I think some package/classname-globbing utilities along with corresponding options to &lt;tt&gt;clojure.lang.Compile&lt;/tt&gt; would be most welcome.  Classname munging rules are not exactly obvious, and it&apos;d be good to make things a little easier for users in this regard.&lt;/p&gt;

&lt;hr /&gt;

&lt;h5&gt;&lt;a name=&quot;Anotheralternative&quot;&gt;&lt;/a&gt;Another alternative&lt;/h5&gt;
&lt;p&gt;If there&apos;s a closed set of forms that generate classes that one might reasonably be interested in having in a build result (outside of use cases for pervasive AOT), then why not have a simple option that only those forms utilize?  &lt;tt&gt;gen-class&lt;/tt&gt; and &lt;tt&gt;gen-interface&lt;/tt&gt; already do this, but reusing the all-or-nothing &lt;tt&gt;&amp;#42;compile-files&amp;#42;&lt;/tt&gt; binding; if they keyed off of a binding that implied a diminished scope (e.g. &lt;tt&gt;&amp;#42;compile-interop-forms&amp;#42;&lt;/tt&gt; &#8211; which would be &lt;tt&gt;true&lt;/tt&gt; if &lt;tt&gt;&amp;#42;compile-files&amp;#42;&lt;/tt&gt; were &lt;tt&gt;true&lt;/tt&gt;), then they&apos;d do exactly what we wanted.  Extending this approach to &lt;tt&gt;deftype&lt;/tt&gt; (and therefore &lt;tt&gt;defrecord&lt;/tt&gt;) &lt;em&gt;should&lt;/em&gt; be straightforward.&lt;/p&gt;

&lt;p&gt;An implementation of this would probably be somewhat more complicated than S. Sierra&apos;s patch, though not as complex as my original stab at the problem (i.e. no &lt;tt&gt;&amp;#42;load-level&amp;#42;&lt;/tt&gt;).  On the plus side:&lt;/p&gt;

&lt;p&gt;1. No additional configuration for users or implementation work for build tool authors, aside from the addition of the boolean diminished-scope AOT option&lt;br/&gt;
2. Class file generation would remain opaque from a build process standpoint&lt;br/&gt;
3. Future/other class-generating forms (there are a few people futzing with ASM independently, etc) can make local decisions about whether or not to participate in interop-centric classfile generation.  This might be particularly helpful if a given form emits multiple classes, making the determination of a classname-based filter fn less straightforward.&lt;/p&gt;

&lt;p&gt;I can see wanting to further restrict AOT to specific classnames in certain circumstances, in which case the above and S. Sierra&apos;s patch might be complimentary.&lt;/p&gt;</comment>
                    <comment id="26037" author="stuart.sierra" created="Thu, 16 Dec 2010 11:49:12 -0600"  >&lt;p&gt;I like the idea of &lt;tt&gt;&amp;#42;compile-interop-forms&amp;#42;&lt;/tt&gt;.  But is it always possible to determine what an &quot;interop form&quot; is?  I &lt;em&gt;think&lt;/em&gt; it is, I&apos;m just not sure.&lt;/p&gt;</comment>
                    <comment id="26915" author="arohner" created="Sun, 9 Oct 2011 12:50:17 -0500"  >&lt;p&gt;I&apos;m also in favor of compile-interop-forms. As far as determining, how about sticking metadata on the var?&lt;/p&gt;

&lt;p&gt;(defmacro ^{:interop-form true} deftype ...)&lt;/p&gt;</comment>
                    <comment id="27077" author="stuart.sierra" created="Fri, 21 Oct 2011 08:38:31 -0500"  >&lt;p&gt;Summary and design discussion on wiki at &lt;a href=&quot;http://dev.clojure.org/display/design/Transitive+AOT+Compilation&quot;&gt;http://dev.clojure.org/display/design/Transitive+AOT+Compilation&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27367" author="stuart.sierra" created="Tue, 29 Nov 2011 18:54:01 -0600"  >&lt;p&gt;New attachment &lt;tt&gt;compile-interop-1.patch&lt;/tt&gt; has new approach: Add a third possible value for &lt;tt&gt;&amp;#42;compile-files&amp;#42;&lt;/tt&gt;. True and false keep their original meanings, but &lt;tt&gt;:interop&lt;/tt&gt; causes &lt;b&gt;only&lt;/b&gt; interop-related forms to be written out as .class files. &quot;Interop forms&quot; are gen-class, gen-interface, deftype, defrecord, defprotocol, and definterface.&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;doesn&apos;t change existing behavior&lt;/li&gt;
	&lt;li&gt;handles common case for non-transitive AOT (interop)&lt;/li&gt;
	&lt;li&gt;minimal changes to the compiler&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;not flexible&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="27385" author="stuart.sierra" created="Fri, 2 Dec 2011 08:12:21 -0600"  >&lt;p&gt;Just realized my patch doesn&apos;t solve the transitive compilation problem. If library A loads library B, then compiling interop forms in A will also emit interop .class files in B.&lt;/p&gt;</comment>
                    <comment id="30340" author="pmoriarty" created="Tue, 1 Jan 2013 03:55:41 -0600"  >&lt;p&gt;It&apos;s disappointing to see an important issue like this still unresolved after 2.5 years. This is a real pain for us. We have a large closed source project where shipping source is not an option. This forces us to manage the AOT&apos;ing of dependencies due to the hard dependency on protocol interfaces introduced by transitive AOT compilation (see &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/r3A1JOIiwVU&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/r3A1JOIiwVU&lt;/a&gt;).&lt;/p&gt;</comment>
                    <comment id="30346" author="jafingerhut" created="Tue, 1 Jan 2013 16:27:20 -0600"  >&lt;p&gt;Paul, do you have a suggestion for which of the approaches described in comments here, or on the wiki page &lt;a href=&quot;http://dev.clojure.org/display/design/Transitive+AOT+Compilation&quot;&gt;http://dev.clojure.org/display/design/Transitive+AOT+Compilation&lt;/a&gt; would be preferable solution for you?  Or perhaps even a patch that implements your preferred approach?&lt;/p&gt;</comment>
                    <comment id="30371" author="hlewisship" created="Fri, 4 Jan 2013 16:18:11 -0600"  >&lt;p&gt;Andy,&lt;/p&gt;

&lt;p&gt;I&apos;m now consulting with Paudi&apos;s organization, so I think I can speak for him (I&apos;m now the default buildmeister).&lt;/p&gt;

&lt;p&gt;I like Stuart&apos;s :interop idea, but that is somewhat orthogonal to our needs.&lt;/p&gt;

&lt;p&gt;I return to what I would like; compilation would compile specific namespaces; dependencies of those namespaces would not be compiled.&lt;/p&gt;

&lt;p&gt;To be honest, I&apos;m still a little hung up on the interop forms: especially defprotocol and friends; from a cursory glance, it appears that todays AOT compilation will compile the protocol into a Java class, then compile the namespace that references the protocol with the assumption that the protocol&apos;s Java class is available.  When we use build rules to only package our namespace&apos;s class files into the output JAR, the code fails with a NoClassDefFoundError because the protocol really needs to be recompiled, at runtime compilation, into an in-memory Java class.&lt;/p&gt;

&lt;p&gt;Obviously, supporting this correctly will be a challenge; the compiled bytecode for our namespace would ideally:&lt;br/&gt;
1) check to see if the Java class already exists and use it if so&lt;br/&gt;
2) load the necessary namespaces so as to force the creation of the Java class&lt;/p&gt;

&lt;p&gt;I can imagine any number of ways to juggle things to make this work, so I won&apos;t suggest a specific implementation.&lt;/p&gt;

&lt;p&gt;In the meantime, our workaround is to create a &quot;stub&quot; module as part of our build; it simply requires in the necessary namespaces (for example, org.clojure:core.cache); this forces an AOT compile of the dependencies and we have a special rule to package such dependencies in the stub module&apos;s output JAR.  This may not be a scalable problem, and it is expensive to identify what 3rd party dependencies require this treatment.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10035" name="0322-limit-aot-resolved.patch" size="11559" author="stu" created="Mon, 29 Nov 2010 07:18:41 -0600" />
                    <attachment id="10024" name="CLJ-322.diff" size="11478" author="cemerick" created="Fri, 19 Nov 2010 21:28:37 -0600" />
                    <attachment id="10723" name="compile-interop-1.patch" size="1443" author="stuart.sierra" created="Tue, 29 Nov 2011 18:54:01 -0600" />
                    <attachment id="10050" name="write-classes-1.diff.gz" size="1620" author="stuart.sierra" created="Fri, 10 Dec 2010 15:34:31 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>cemerick</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1183] java interop - cannot call a final method on non-public superclass </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1183</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;when trying to call a method on a concrete class that is defined as final on its super class that is not public, the runtime throws:&lt;/p&gt;

&lt;p&gt;&quot;java.lang.IllegalArgumentException: Can&apos;t call public method of non-public class&quot;&lt;/p&gt;

&lt;p&gt;even when fully annotated, Reflection is still used and the call fails.&lt;/p&gt;

&lt;p&gt;you can read the full description here &lt;a href=&quot;https://groups.google.com/d/msg/clojure/p2tBMT-BIYc/mDQB8cSponMJ&quot;&gt;https://groups.google.com/d/msg/clojure/p2tBMT-BIYc/mDQB8cSponMJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I included a sample project that demonstrate the problem&lt;/p&gt;</description>
                <environment></environment>
            <key id="16085">CLJ-1183</key>
            <summary>java interop - cannot call a final method on non-public superclass </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="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="shlomi">Shlomi</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Mar 2013 06:14:49 -0500</created>
                <updated>Sat, 18 May 2013 19:22:33 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="30755" author="shlomi" created="Wed, 13 Mar 2013 06:51:24 -0500"  >&lt;p&gt;in my sample project, i used a nested class, but i didnt have to (as pointed by Marko Topolnik). changing the java code to:&lt;/p&gt;

&lt;p&gt;  abstract class AbstractParent{&lt;br/&gt;
      final public int x() {return 6;}&lt;br/&gt;
  }&lt;/p&gt;

&lt;p&gt;  public class test  extends AbstractParent {}&lt;/p&gt;

&lt;p&gt;and the clojure to:&lt;/p&gt;

&lt;p&gt;  (ns call-test.core (:gen-class))&lt;br/&gt;
  (defn -main &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt;(.x ^AbstractParent (test.)))&lt;/p&gt;


&lt;p&gt;would produce the same error,&lt;/p&gt;

&lt;p&gt;java.lang.IllegalArgumentException: Can&apos;t call public method of non-public class: public final int AbstractParent.x()&lt;br/&gt;
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:88)&lt;/p&gt;</comment>
                    <comment id="31094" author="zoowar" created="Thu, 16 May 2013 12:05:36 -0500"  >&lt;p&gt;This issue affects the upcoming netty-4.0 release in which the public modifier of AbstractBootstrap was removed.&lt;/p&gt;</comment>
                    <comment id="31106" author="m@mattp.name" created="Sat, 18 May 2013 03:48:49 -0500"  >&lt;p&gt;To get Netty 4 working with Clojure I had to create a set of public static Java methods for the various inaccessible Netty calls, which I then call from Clojure. A PITA, but works fine. Happy to post code if anyone would find it useful.&lt;/p&gt;</comment>
                    <comment id="31107" author="shlomi" created="Sat, 18 May 2013 04:31:36 -0500"  >&lt;p&gt;Matthew, i kinda left that project after running to these and other troubles (focused on previous Netty until version 4 will become ready and be properly documented), but i&apos;d still like to see your code. you have a github account or a gist with it?&lt;/p&gt;

&lt;p&gt;Clojure devs - are there any plans of checking this problem out? it came up from Netty, but the problem is pretty generic&lt;/p&gt;</comment>
                    <comment id="31113" author="m@mattp.name" created="Sat, 18 May 2013 19:22:33 -0500"  >&lt;p&gt;Shlomi: here&apos;s a gist with the code I&apos;m using in it. It&apos;s not comprehensive, just the bits I needed. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/scramjet/5606195&quot;&gt;https://gist.github.com/scramjet/5606195&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11912" name="call-test.tar.gz" size="1234" author="shlomi" created="Wed, 13 Mar 2013 06:14:49 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-69] GC Issue 66: Add &quot;keyset&quot; to Clojure; make .keySet for APersistentMap return IPersistentSet</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-69</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by wolfe.a.jason, Feb 04, 2009

Describe the feature/change.

Add &lt;span class=&quot;code-quote&quot;&gt;&quot;keyset&quot;&lt;/span&gt; to Clojure; make .keySet &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; APersistentMap &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; an
IPersistentSet

Was &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; discussed on the group? If so, please provide a link to the
discussion:

http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/group/clojure/browse_thread/thread/66e708e477ae992f/ff3d8d588068b60e?hl=en#ff3d8d588068b60e
&lt;/span&gt;
-----------------------------------------------------

A patch is attached.  Some notes:

I chose to add a &lt;span class=&quot;code-quote&quot;&gt;&quot;keyset&quot;&lt;/span&gt; function, rather than change the existing &lt;span class=&quot;code-quote&quot;&gt;&quot;keys&quot;&lt;/span&gt;,
so as to avoid breaking anything.

The corresponding RT.keyset function just calls .keySet on the argument.
I would have liked to have &lt;span class=&quot;code-quote&quot;&gt;&quot;keyset&quot;&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; an IPersistentSet even when
passed a (non-Clojure) java.util.Map, but &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; seems impossible to &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; in
sublinear time because of essentially the same limitation mentioned in the
above thread (the Map &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; does not support getKey() or entryAt()) --
assuming, again, that &lt;span class=&quot;code-quote&quot;&gt;&quot;get&quot;&lt;/span&gt; is supposed to &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; the actual (identical?)
key in a set, and not just an .equal key.

I then changed the implementation of .keySet &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; APersistentMap to
essentially copy APersistentSet.  A more concise alternative would have
been to extend APersistentSet and override the .get method, but that made
me a bit nervous (since &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; APeristentSet changed &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; could &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;). 

Anyway, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; is my first patch &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the Java side of Clojure, and I&apos;m not
yet solid on the conventions and aesthetics, so
comments/questions/criticisms/requests &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; revisions are very welcome.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13466">CLJ-69</key>
            <summary>GC Issue 66: Add &quot;keyset&quot; to Clojure; make .keySet for APersistentMap return IPersistentSet</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 00:55:00 -0500</created>
                <updated>Fri, 10 Dec 2010 08:48:40 -0600</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22640" author="importer" created="Tue, 28 Sep 2010 07:00:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/69&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/69&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
keyset.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/dKgE6mw3Gr3O2PeJe5afGb/download/dKgE6mw3Gr3O2PeJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/dKgE6mw3Gr3O2PeJe5afGb/download/dKgE6mw3Gr3O2PeJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22641" author="importer" created="Tue, 28 Sep 2010 07:00:00 -0500"  >&lt;p&gt;oranenj said: [&lt;a href=&quot;file:dKgE6mw3Gr3O2PeJe5afGb&quot;&gt;file:dKgE6mw3Gr3O2PeJe5afGb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="22642" author="importer" created="Tue, 28 Sep 2010 07:00:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="26003" author="stu" created="Fri, 3 Dec 2010 13:12:52 -0600"  >&lt;p&gt;patch not in correct format&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-211] Support arbitrary functional destructuring via -&gt; and -&gt;&gt;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-211</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Support arbitrary functional destructuring, that is the use of&lt;br/&gt;
any function in any destructuring form to help unpack data in&lt;br/&gt;
arbitrary ways.&lt;/p&gt;

&lt;p&gt;The discussion began here:&lt;br/&gt;
&lt;a href=&quot;http://clojure-log.n01se.net/date/2009-11-17.html#09:31c&quot;&gt;http://clojure-log.n01se.net/date/2009-11-17.html#09:31c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attached patch implements the spec described here:&lt;br/&gt;
&lt;a href=&quot;http://clojure-log.n01se.net/date/2009-11-17.html#10:50a&quot;&gt;http://clojure-log.n01se.net/date/2009-11-17.html#10:50a&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;That is, the following examples would now work:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let &lt;span class=&quot;error&quot;&gt;&amp;#91;(-&amp;gt; str a) 1&amp;#93;&lt;/span&gt; a)&lt;br/&gt;
&quot;1&quot;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let [&lt;span class=&quot;error&quot;&gt;&amp;#91;a (-&amp;gt; str b) c&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;] (list a b c))&lt;br/&gt;
(1 &quot;2&quot; nil)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let [(-&amp;gt;&amp;gt; (map int) &lt;span class=&quot;error&quot;&gt;&amp;#91;a b&amp;#93;&lt;/span&gt;) &quot;ab&quot;] (list a b))&lt;br/&gt;
(97 98)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13608">CLJ-211</key>
            <summary>Support arbitrary functional destructuring via -&gt; and -&gt;&gt;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Nov 2009 10:43:00 -0600</created>
                <updated>Fri, 10 Dec 2010 08:49:03 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23273" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/211&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/211&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
destructuring-fns.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aHWQ_W06Kr3O89eJe5afGb/download/aHWQ_W06Kr3O89eJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aHWQ_W06Kr3O89eJe5afGb/download/aHWQ_W06Kr3O89eJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23274" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;chouser@n01se.net said: [&lt;a href=&quot;file:aHWQ_W06Kr3O89eJe5afGb&quot;&gt;file:aHWQ_W06Kr3O89eJe5afGb&lt;/a&gt;]: &lt;span class=&quot;error&quot;&gt;&amp;#91;PATCH&amp;#93;&lt;/span&gt; Support -&amp;gt; and -&amp;gt;&amp;gt; in destructuring forms.&lt;/p&gt;</comment>
                    <comment id="23275" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;cgrand said: I think the current patch suffers from the problem described here &lt;a href=&quot;http://groups.google.com/group/clojure-dev/msg/80ba7fad2ff04708&quot;&gt;http://groups.google.com/group/clojure-dev/msg/80ba7fad2ff04708&lt;/a&gt; too.&lt;/p&gt;</comment>
                    <comment id="23276" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;richhickey said: so, don&apos;t use syntax-quote, just use clojure.core/-&amp;gt;&lt;/p&gt;</comment>
                    <comment id="23277" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;chouser@n01se.net said: Only -&amp;gt; and -&amp;gt;&amp;gt; are actually legal here anyway &amp;#8211; if you&apos;ve locally bound foo to -&amp;gt; there&apos;s not really any good reason to think (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;(foo inc a)&amp;#93;&lt;/span&gt; a) should work.  And if you&apos;ve redefined -&amp;gt; or -&amp;gt;&amp;gt; to mean something else in your ns, do we need to catch that at compile time, or is it okay to emit the rearranged code and see what happens?&lt;/p&gt;

&lt;p&gt;In short, would &apos;#{&lt;del&gt;&amp;gt; -&amp;gt;&amp;gt; clojure.core/&lt;/del&gt;&amp;gt; clojure.core/-&amp;gt;&amp;gt;} be sufficient?&lt;/p&gt;</comment>
                    <comment id="23278" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;cgrand said: Only -&amp;gt; and -&amp;gt;&amp;gt; are legal here but what if they are aliased or shadowed? Instead of testing the symboil per se I would check, if:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the symbol is not in &amp;amp;env&lt;/li&gt;
	&lt;li&gt;the symbol resolve to #&apos;clojure.core/&lt;del&gt;&amp;gt; or  #&apos;clojure.core/&lt;/del&gt;&amp;gt;&amp;gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(when-not (&amp;amp;env (first b)) (#{#&apos;clojure.core/-&amp;gt; #&apos;clojure.core/-&amp;gt;&amp;gt;} (resolve (first b))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but it requires to change destructure&apos;s sig to pass the env around&lt;/p&gt;</comment>
                    <comment id="26002" author="stu" created="Fri, 3 Dec 2010 13:03:07 -0600"  >&lt;p&gt;Rich: Are you assigned to this by accident? If so, please deassign yourself.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-291] (take-nth 0 coll) redux...</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-291</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I dont seem to be able make the old ticket uninvalid so here goes&lt;br/&gt;
(take-nth 0 coll) causes (at least on Solaris) infinite space and time consumption&lt;br/&gt;
It&apos;s not a printout error as the following code causes the problem too&lt;/p&gt;

&lt;p&gt;(let [j 0&lt;br/&gt;
 firstprod (apply * (doall (map #(- 1 %) (take-nth j (:props mix)))))]) ; from my parameter update function&lt;/p&gt;

&lt;p&gt;I used jvisualvm and the jvm is doing some RNI call - no clojure code is running at all&lt;br/&gt;
If left alone it will crash the jvm with all heap space consumed&lt;br/&gt;
0 is an InvalidArgument for take-nth&lt;br/&gt;
I wouldnt mind if it produced an infinite lazy sequence of nils even though thats wrong&lt;br/&gt;
It doesnt do this though it actively destroys the JVM&lt;br/&gt;
Its a bug nasty destructive and it took me half a day to figure out what was going on&lt;br/&gt;
please let someone fix it!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13688">CLJ-291</key>
            <summary>(take-nth 0 coll) redux...</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Apr 2010 06:29:00 -0500</created>
                <updated>Fri, 10 Dec 2010 08:50:19 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23615" author="importer" created="Sun, 17 Oct 2010 09:47:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/291&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/291&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
fixbug291.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/dfNhoS2Cir3543eJe5cbLA/download/dfNhoS2Cir3543eJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/dfNhoS2Cir3543eJe5cbLA/download/dfNhoS2Cir3543eJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23616" author="importer" created="Sun, 17 Oct 2010 09:47:00 -0500"  >&lt;p&gt;bhurt said: Before this bug gets marked as invalid as well, let me point out that the problem here is that (take-nth 0 any-list) is a meaningless construction- the only question is what to do when this happens.  IMHO, the correct behavior is to throw an exception.&lt;/p&gt;</comment>
                    <comment id="23617" author="importer" created="Sun, 17 Oct 2010 09:47:00 -0500"  >&lt;p&gt;ataggart said: [&lt;a href=&quot;file:dfNhoS2Cir3543eJe5cbLA&quot;&gt;file:dfNhoS2Cir3543eJe5cbLA&lt;/a&gt;]: throws IllegalArgumentException on negative step size&lt;/p&gt;</comment>
                    <comment id="25891" author="stu" created="Fri, 29 Oct 2010 10:36:34 -0500"  >&lt;p&gt;Does calling (take-nth 0 ...) cause the problem, or only realizing the result?&lt;/p&gt;</comment>
                    <comment id="25892" author="chouser@n01se.net" created="Fri, 29 Oct 2010 11:06:01 -0500"  >&lt;p&gt;I&apos;m not seeing a problem.  Calling take-nth and even partially consuming the seq it returns works fine for me:&lt;/p&gt;

&lt;p&gt;(take 5 (take-nth 0 &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;))&lt;br/&gt;
;=&amp;gt; (1 1 1 1 1)&lt;/p&gt;

&lt;p&gt;Note however that it is returning an infinite lazy seq.  The example in the issue description seems to include essentially (doall &amp;lt;infinite-lazy-seq&amp;gt;) which does blow the heap:&lt;/p&gt;

&lt;p&gt;(doall (range))&lt;/p&gt;

&lt;p&gt;This issue still strikes me as invalid.&lt;/p&gt;</comment>
                    <comment id="25893" author="richhickey" created="Fri, 29 Oct 2010 11:06:02 -0500"  >&lt;p&gt;(take-nth 0 ...) returns an infinite sequence of the first item:&lt;/p&gt;

&lt;p&gt;(take 12 (take-nth 0 &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;))&lt;br/&gt;
=&amp;gt; (1 1 1 1 1 1 1 1 1 1 1 1)&lt;/p&gt;

&lt;p&gt;Is something other than this happening on Solaris?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-699] make sure compile paths shares as much code as possible</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-699</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Issue &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-697&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-697&lt;/a&gt; highlighted the fact that compilation has more than one entry point. Review these entry points and make them share code.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14308">CLJ-699</key>
            <summary>make sure compile paths shares as much code as possible</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Dec 2010 16:01:39 -0600</created>
                <updated>Fri, 31 Dec 2010 16:01:39 -0600</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1002] chunk-* functions not documented</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1002</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;None of the chunk related functions defined in core.clj have documentation.  While their implementations are straightforward, it means the functions do not show up in &lt;a href=&quot;http://clojure.org/api&quot;&gt;http://clojure.org/api&lt;/a&gt;.  Are these not considered part of the API?  If so, should they be private?  Otherwise, I think they should have public documentation.&lt;/p&gt;

&lt;p&gt;For searchability, the function are:&lt;/p&gt;

&lt;p&gt;chunk-append, chunk, chunk-first, chunk-rest, chunk-next, chunk-cons, chunked-seq?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15481">CLJ-1002</key>
            <summary>chunk-* functions not documented</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jim.blomo">Jim Blomo</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 May 2012 01:17:18 -0500</created>
                <updated>Sun, 27 May 2012 01:17:18 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-761] print-dup generates call to nonexistent method for APersistentVector$SubVector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-761</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Originally reported by &lt;a href=&quot;https://groups.google.com/d/topic/clojure/0JYeIgzAwsQ/discussion&quot;&gt;Carson&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;print-dup&lt;/tt&gt; on any collection type generates code to call the &lt;tt&gt;create&lt;/tt&gt; method of the collection&apos;s class.  &lt;tt&gt;APersistentVector$SubVector&lt;/tt&gt; has no &lt;tt&gt;create&lt;/tt&gt; method.&lt;/p&gt;

&lt;p&gt;Example with Clojure at commit ecae8ff08a298777c365a261001adfe9bfa4d83c :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Clojure 1.3.0-master-SNAPSHOT
user=&amp;gt; (read-string (binding [*print-dup* &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;] (pr-str (subvec [1 2 3] 1))))
IllegalArgumentException No matching method found: create  clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:50)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14377">CLJ-761</key>
            <summary>print-dup generates call to nonexistent method for APersistentVector$SubVector</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Mar 2011 08:36:57 -0500</created>
                <updated>Fri, 4 Nov 2011 11:31:09 -0500</updated>
                                    <version>Backlog</version>
                                <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27193" author="hiredman" created="Fri, 4 Nov 2011 11:29:27 -0500"  >&lt;p&gt;33.927         hiredman   ,(binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*print-dup* true&amp;#93;&lt;/span&gt; (pr-str (first {:a 1})))&lt;br/&gt;
 33.928  clojurebot   &quot;#=(clojure.lang.MapEntry/create &lt;span class=&quot;error&quot;&gt;&amp;#91;:a 1&amp;#93;&lt;/span&gt;)&quot;&lt;br/&gt;
 33.938         hiredman   yeah, well, I was busy&lt;br/&gt;
 33.941  chouser   heh&lt;br/&gt;
 33.949         hiredman   ,(clojure.lang.MapEntry/create &lt;span class=&quot;error&quot;&gt;&amp;#91;:a 1&amp;#93;&lt;/span&gt;)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-807] hash-maps print-dup as literal, thus can be read as array-maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-807</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Per Rich in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-799&quot; title=&quot;ArrayMaps print-dup with read-eval&quot;&gt;&lt;del&gt;CLJ-799&lt;/del&gt;&lt;/a&gt;: &quot;The point of print-dup is type preservation&quot;&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;user=&amp;gt; (hash-map :k :v)
{:k :v}
user=&amp;gt; (type *1)
clojure.lang.PersistentHashMap
user=&amp;gt; (binding [*print-dup* true] (print-str *2))
&quot;{:k :v}&quot;
user=&amp;gt; (read-string *1)
{:k :v}
user=&amp;gt; (type *1)
clojure.lang.PersistentArrayMap
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The cause is due to &lt;tt&gt;RT.map&lt;/tt&gt; conditionally creating an array-map if the size is within the &lt;tt&gt;PersistentArrayMap.HASHTABLE_THRESHOLD&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14455">CLJ-807</key>
            <summary>hash-maps print-dup as literal, thus can be read as array-maps</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Jun 2011 15:14:49 -0500</created>
                <updated>Fri, 29 Jul 2011 07:42:26 -0500</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26540" author="aaron" created="Tue, 28 Jun 2011 18:47:07 -0500"  >&lt;p&gt;Rich: do you want a patch for this?&lt;/p&gt;</comment>
                    <comment id="26668" author="richhickey" created="Fri, 29 Jul 2011 07:42:01 -0500"  >&lt;p&gt;Only if it important to someone, solves some problem.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-941] NullPointerException possible with seq-zip</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-941</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Clojure 1.3.0&lt;br/&gt;
user=&amp;gt; (require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.zip :as z&amp;#93;&lt;/span&gt;)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (-&amp;gt; (z/seq-zip (list 1)) z/down z/remove)&lt;br/&gt;
NullPointerException   clojure.core/with-meta (core.clj:211)&lt;/p&gt;

&lt;p&gt;Possibly the make-node function for seq-zip should be:&lt;/p&gt;

&lt;p&gt;(fn &lt;span class=&quot;error&quot;&gt;&amp;#91;node children&amp;#93;&lt;/span&gt; (with-meta (or children ()) (meta node)))&lt;/p&gt;</description>
                <environment></environment>
            <key id="15249">CLJ-941</key>
            <summary>NullPointerException possible with seq-zip</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="glchapman">Greg Chapman</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Feb 2012 17:19:20 -0600</created>
                <updated>Sun, 26 Feb 2012 17:54:13 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27878" author="glchapman" created="Sun, 26 Feb 2012 17:54:13 -0600"  >&lt;p&gt;Also the docstring for zipper should probably be updated to indicate that the children parameter can be nil.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-750] clojure.lang.MapEntry violates .equals and .hashCode contracts of HashMap.Entry; leads to non-reflexive .equals, etc.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-750</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user&amp;gt; (let &lt;span class=&quot;error&quot;&gt;&amp;#91;h (HashMap.)&amp;#93;&lt;/span&gt; &lt;br/&gt;
       (.put h 1 2) &lt;br/&gt;
       (let [p1 (first h) &lt;br/&gt;
             p2 (first {1 2})] &lt;br/&gt;
        (println (.hashCode p1) (.hashCode p2) &lt;br/&gt;
                 (= p1 p2) (= p2 p1) &lt;br/&gt;
                 (.equals p1 p2) (.equals p2 p1))))&lt;/p&gt;

&lt;p&gt;3 994 false false true false&lt;/p&gt;

&lt;p&gt;clojure.lang.MapEntry does not follow the contracts of hashCode or equals for java.util.Map$Entry.  This, among other things, leads to the above non-reflexive behavior of .equals.  &lt;/p&gt;

&lt;p&gt;I realize this isn&apos;t a simple bug; it&apos;s a fundamental issue, in that it&apos;s impossible to consistently implement both java.util.List and java.util.Map$Entry, which clojure.lang.MapEntry claims to do.  On balance I do find it very useful that Clojure map entries are equivalent to vectors, and probably wouldn&apos;t want to give that up.  But, I think that at minimum this wart should be documented somewhere, since it could lead to some very strange and hard to catch bugs.  &lt;/p&gt;</description>
                <environment></environment>
            <key id="14365">CLJ-750</key>
            <summary>clojure.lang.MapEntry violates .equals and .hashCode contracts of HashMap.Entry; leads to non-reflexive .equals, etc.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Mar 2011 22:04:41 -0600</created>
                <updated>Fri, 29 Jul 2011 07:45:40 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26259" author="jawolfe" created="Wed, 2 Mar 2011 22:13:33 -0600"  >&lt;p&gt;This might be fixable by changing seq to promise a sequence of pairs rather than MapEntries.  I don&apos;t know enough about Clojure internals to know if this would entail too large a performance hit, but perhaps it&apos;s worth considering.&lt;/p&gt;</comment>
                    <comment id="26273" author="stu" created="Fri, 4 Mar 2011 21:11:41 -0600"  >&lt;p&gt;Rich: is there a doc patch you would want for this?&lt;/p&gt;</comment>
                    <comment id="26670" author="richhickey" created="Fri, 29 Jul 2011 07:45:39 -0500"  >&lt;p&gt;doc patch ok&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-878] DispatchReader always calls CtorReader when no dispatch macro found</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-878</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;At the REPL, I accidentally typed:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; # &quot;\w+&quot;&lt;br/&gt;
RuntimeException Unsupported escape character: \w  clojure.lang.Util.runtimeExce&lt;br/&gt;
ption (Util.java:156)&lt;br/&gt;
#&amp;lt;core$&lt;em&gt;PLUS&lt;/em&gt; clojure.core$&lt;em&gt;PLUS&lt;/em&gt;@6b7dc78&amp;gt;&lt;/p&gt;

&lt;p&gt;You can see the confusing result (the REPL is also left in an unclosed string). After looking at LispReader.java, it seems to me DispatchReader ought to at least check for whitespace before calling CtorReader (perhaps better would be to check for a valid symbol character). Another example:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defrecord X &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.X&lt;br/&gt;
user=&amp;gt; # &quot;user.X&quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;5&amp;#93;&lt;/span&gt;&lt;br/&gt;
#user.X{:x 5}&lt;/p&gt;

&lt;p&gt;I&apos;m assuming the fact that the above successfully creates an X is accidental.&lt;/p&gt;</description>
                <environment>Windows 7, Java 1.7</environment>
            <key id="15010">CLJ-878</key>
            <summary>DispatchReader always calls CtorReader when no dispatch macro found</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="glchapman">Greg Chapman</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 17:28:46 -0600</created>
                <updated>Tue, 15 Nov 2011 17:28:46 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-880] syntax-quote should be a macro instead of implemented inside the reader</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-880</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;syntax-quote is currently a somewhat gnarly bit of java code in LispReader.java, would be great to replace it with a (hopefully less gnarly) clojure macro.&lt;/p&gt;

&lt;p&gt;LispReader.java would be required to do something similar to &apos;x =&amp;gt; (quote x). `x =&amp;gt; (syntax-quote x) , ~x =&amp;gt; (unquote x), ~@x =&amp;gt; (unquote-splicing x)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15017">CLJ-880</key>
            <summary>syntax-quote should be a macro instead of implemented inside the reader</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Nov 2011 17:02:48 -0600</created>
                <updated>Thu, 17 Nov 2011 17:02:48 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-946] eval reader fail to recognize  function object </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-946</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(defmacro stubbing &lt;span class=&quot;error&quot;&gt;&amp;#91;stub-forms &amp;amp; body&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (let [stub-pairs (partition 2 stub-forms)&lt;br/&gt;
        returns (map last stub-pairs)&lt;br/&gt;
        stub-fns (map constantly returns)  ;;(map #(list &apos;constantly %) returns)&lt;br/&gt;
        real-fns (map first stub-pairs)]&lt;br/&gt;
    `(binding &lt;span class=&quot;error&quot;&gt;&amp;#91;~@(interleave real-fns stub-fns)&amp;#93;&lt;/span&gt;&lt;br/&gt;
       ~@body)))&lt;/p&gt;

&lt;p&gt;This macro is from  Clojure In Action , whith the commented line rewrited (I know that original is better)&lt;br/&gt;
I assumed that this macro would work as supposed , if the stub forms use compile time literal, for e.g&lt;/p&gt;

&lt;p&gt;(def ^:dynamic $ (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (* x 10))&lt;/p&gt;


&lt;p&gt;(stubbing &lt;span class=&quot;error&quot;&gt;&amp;#91;$ 1&amp;#93;&lt;/span&gt;&lt;br/&gt;
        ($ 1 1))&lt;br/&gt;
;; =&amp;gt;&lt;br/&gt;
IllegalArgumentException No matching ctor found for class clojure.core$constantly$fn__3656&lt;br/&gt;
	clojure.lang.Reflector.invokeConstructor (Reflector.java:166)&lt;br/&gt;
	clojure.lang.LispReader$EvalReader.invoke (LispReader.java:1031)&lt;br/&gt;
	clojure.lang.LispReader$DispatchReader.invoke (LispReader.java:618)&lt;/p&gt;

&lt;p&gt;;;macro can expanded  &lt;br/&gt;
(macroexpand-all &apos;(stubbing &lt;span class=&quot;error&quot;&gt;&amp;#91;$ 1&amp;#93;&lt;/span&gt;&lt;br/&gt;
                ($ 1 1)))&lt;br/&gt;
;; =&amp;gt;&lt;br/&gt;
(let* [] (clojure.core/push-thread-bindings (clojure.core/hash-map (var $) #&amp;lt;core$constantly$fn_&lt;em&gt;3656 clojure.core$constantly$fn&lt;/em&gt;_3656@161f888&amp;gt;)) (try ($ 1 1) (finally (clojure.core/pop-thread-bindings))))&lt;/p&gt;

&lt;p&gt;I thought there is something wrong with eval reader, but i can&apos;t figure it out&lt;/p&gt;

&lt;p&gt;btw the above code can run on clojure-clr&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15263">CLJ-946</key>
            <summary>eval reader fail to recognize  function object </summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="xiaonaitong">Naitong Xiao</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Mar 2012 02:54:06 -0600</created>
                <updated>Wed, 7 Mar 2012 01:24:47 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27905" author="michaelklishin" created="Tue, 6 Mar 2012 23:24:35 -0600"  >&lt;p&gt;As far as I know, Clojure in Action examples are written for Clojure 1.2. What version are you using?&lt;/p&gt;</comment>
                    <comment id="27907" author="xiaonaitong" created="Wed, 7 Mar 2012 01:24:47 -0600"  >&lt;p&gt;I use clojure 1.3&lt;/p&gt;

&lt;p&gt;The example in Clojure In Action is Ok on clojure 1.3&lt;br/&gt;
I just found this peculiar thing when trying to answer a question from another one in a mail list.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1008] Make sorted maps and sets implement j.u.NavigableMap and NavigableSet interfaces </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1008</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Since Clojure 1.5 will probably no longer target JVM 5, add support for the (Concurrent)?Navigable(Map|Set) interfaces.  This should involve adding functions to PersistentTreeMap that descend the red-black tree to select the closest items.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15505">CLJ-1008</key>
            <summary>Make sorted maps and sets implement j.u.NavigableMap and NavigableSet interfaces </summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jim.blomo">Jim Blomo</reporter>
                        <labels>
                    </labels>
                <created>Sat, 2 Jun 2012 19:07:09 -0500</created>
                <updated>Sat, 2 Jun 2012 19:07:31 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-938] Output of clojure.reflect is not suitable for type hints</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-938</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;m trying to write a macro which generate reify forms using some reflection.&lt;/p&gt;

&lt;p&gt;clojure.reflect produces type symbols similar to &apos;java.util.Iterator&amp;lt;&amp;gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, the compiler doesn&apos;t accept the &amp;lt;&amp;gt; syntax in type hints:&lt;/p&gt;

&lt;p&gt;(reify Iterable (^{:tag java.util.Iterator} iterator &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; nil)) ; works&lt;/p&gt;

&lt;p&gt;(reify Iterable (^{:tag java.util.Iterator&amp;lt;&amp;gt;} iterator &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; nil)) ;; fails&lt;br/&gt;
CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: java.util.Iterator&amp;lt;&amp;gt;, compiling:(NO_SOURCE_PATH:1325)&lt;/p&gt;

&lt;p&gt;It seems like the compiler should understand the &amp;lt;&amp;gt; just enough to strip it, rather than reject it. This would make it much easier to write correct macros involving type hinting and reflection.&lt;/p&gt;

&lt;p&gt;The workaround I have been using is:&lt;/p&gt;

&lt;p&gt;(defn hint&lt;br/&gt;
  &quot;clojure.reflect demarks generics with angle brackets, but&lt;br/&gt;
   the compiler does not support generics in type hints&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;obj tag&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;tag (-&amp;gt; tag .toString (.replace &amp;quot;&amp;lt;&amp;gt;&amp;quot; &amp;quot;&amp;quot;) symbol)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (with-meta obj {:tag tag}))&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15244">CLJ-938</key>
            <summary>Output of clojure.reflect is not suitable for type hints</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bbloom">Brandon Bloom</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Feb 2012 23:31:12 -0600</created>
                <updated>Fri, 24 Feb 2012 01:37:33 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27832" author="bbloom" created="Fri, 24 Feb 2012 01:37:33 -0600"  >&lt;p&gt;I&apos;m sorry, I got this wrong earlier. The problem is real, but it&apos;s &lt;em&gt;arrays&lt;/em&gt;, not &lt;em&gt;generics&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;My workaround is useless... :-/&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1047] Simplify the process of requiring fj in clojure.core.reducers</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1047</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;this patch removes compile-if in favor of import-if, removing code duplication&lt;/p&gt;</description>
                <environment></environment>
            <key id="15638">CLJ-1047</key>
            <summary>Simplify the process of requiring fj in clojure.core.reducers</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Aug 2012 18:27:01 -0500</created>
                <updated>Tue, 21 Aug 2012 18:27:01 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11451" name="001-simplify-fj-importing.patch" size="2641" author="bronsa" created="Tue, 21 Aug 2012 18:27:01 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-955] java object reader constructor doesn&apos;t work</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-955</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Here is a transcript:&lt;/p&gt;

&lt;p&gt;;user=&amp;gt; &lt;b&gt;clojure-version&lt;/b&gt;&lt;br/&gt;
{:major 1, :minor 4, :incremental 0, :qualifier &quot;beta5&quot;}&lt;br/&gt;
;user=&amp;gt; (.getProtocol #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
java.lang.RuntimeException: Can&apos;t embed object in code, maybe print-dup not defined: &lt;a href=&quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;&gt;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&lt;/a&gt;, compiling:(null:2)&lt;br/&gt;
;user=&amp;gt; (.getProtocol (java.net.URL. &quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;))&lt;br/&gt;
&quot;file&quot;&lt;/p&gt;

&lt;p&gt;Another transcript from google groups &lt;a href=&quot;https://groups.google.com/forum/?fromgroups&amp;amp;hl=en#!topic/clojure/vlsFgVaKcSQ&quot;&gt;https://groups.google.com/forum/?fromgroups&amp;amp;hl=en#!topic/clojure/vlsFgVaKcSQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (def x #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user=&amp;gt; x&lt;br/&gt;
#&amp;lt;URL &lt;a href=&quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;&gt;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&lt;/a&gt;&amp;gt;&lt;br/&gt;
user=&amp;gt; (.getProtocol x)&lt;br/&gt;
&quot;file&quot;&lt;/p&gt;


&lt;p&gt;user=&amp;gt; (.getProtocol #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
CompilerException java.lang.RuntimeException: Can&apos;t embed object in code, maybe print-dup not defined: &lt;a href=&quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;&gt;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&lt;/a&gt;, compiling:(NO_SOURCE_PATH:5) &lt;br/&gt;
user=&amp;gt; (defmethod print-dup java.net.URL &lt;span class=&quot;error&quot;&gt;&amp;#91;o, ^java.io.Writer w&amp;#93;&lt;/span&gt; (.write w (str o)))&lt;br/&gt;
#&amp;lt;MultiFn clojure.lang.MultiFn@2e694f12&amp;gt;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (.getProtocol #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
ClassCastException clojure.lang.Symbol cannot be cast to java.net.URL  user/eval11 (NO_SOURCE_FILE:7)&lt;br/&gt;
user=&amp;gt;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (def x #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;)&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user=&amp;gt; (printf &quot;(class x)=%s x=&apos;%s&apos;\n&quot; (class x) x)&lt;br/&gt;
(class x)=class java.net.URL x=&apos;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&apos;&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (let [x #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;]&lt;br/&gt;
(printf &quot;(class x)=%s x=&apos;%s&apos;\n&quot; (class x) x))&lt;br/&gt;
CompilerException java.lang.RuntimeException: Can&apos;t embed object in code, maybe print-dup not defined: &lt;a href=&quot;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;&gt;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&lt;/a&gt;, compiling:(NO_SOURCE_PATH:4) &lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defmethod print-dup java.net.URL &lt;span class=&quot;error&quot;&gt;&amp;#91;o, ^java.io.Writer w&amp;#93;&lt;/span&gt; (.write w (str o)))&lt;br/&gt;
#&amp;lt;MultiFn clojure.lang.MultiFn@3362a63&amp;gt;&lt;br/&gt;
user=&amp;gt; (let [x #java.net.URL&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;quot;&amp;#93;&lt;/span&gt;]&lt;br/&gt;
(printf &quot;(class x)=%s x=&apos;%s&apos;\n&quot; (class x) x))&lt;br/&gt;
(class x)=class clojure.lang.Symbol x=&apos;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&apos;&lt;br/&gt;
nil&lt;/p&gt;</description>
                <environment></environment>
            <key id="15285">CLJ-955</key>
            <summary>java object reader constructor doesn&apos;t work</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bmillare">Brent Millare</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Mar 2012 19:37:26 -0500</created>
                <updated>Mon, 19 Mar 2012 10:26:00 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27963" author="jafingerhut" created="Mon, 19 Mar 2012 02:58:18 -0500"  >&lt;p&gt;I&apos;ve confirmed this behavior with 1.4.0 beta5.  I&apos;ve only tracked it down as far as finding the &quot;Can&apos;t embed object in code&quot; message, which is easy to find in Compiler.java in method emitValue.  That exception is thrown because printString in RT.java throws an exception.&lt;/p&gt;

&lt;p&gt;It isn&apos;t clear to me what should be done instead, though.&lt;/p&gt;</comment>
                    <comment id="27964" author="fogus" created="Mon, 19 Mar 2012 09:03:08 -0500"  >&lt;p&gt;What would it mean to construct an arbitrary Java object for the purpose of embedding it in code in a generic way? You could say that it&apos;s just a matter of calling its constructor with the right args but very often in Java that is &lt;b&gt;not&lt;/b&gt; enough to make an object considered &quot;initialize&quot;.  Sometimes there are init methods or putters or whatever that are required for object construction.  So right there I hope it&apos;s clear that even though #some.Klass&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;foo&amp;quot;&amp;#93;&lt;/span&gt; provides a way to call an arbitrary constructor, it&apos;s in no way a guarantee that an instance is properly constructed.  The reason that (for example) defrecords are embeddable anywhere is because we know for certain that the constructor creates a fully initialized instance. If you need to embed specific instances in your own code then you have two options:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Implement a print-dup for the class that guarantees a fully initialized object is built.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Use Clojure 1.4&apos;s tagged literal feature to do the same.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Quick point of note:&lt;/p&gt;

&lt;p&gt;Your code &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;(defmethod print-dup java.net.URL [o, ^java.io.Writer w] (.write w (str o)))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Doesn&apos;t do what you think it does.  It spits out exactly &lt;tt&gt;&lt;a href=&quot;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;&gt;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&lt;/a&gt;&lt;/tt&gt; that Clojure reads in as a symbol.  Something like the following might be more appropriate:&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;(defmethod print-dup java.net.URL [o, ^java.io.Writer w] (.write w &quot;#java.net.URL&quot;) (.write w (str [ (str o) ])))

(let [x #java.net.URL[&quot;file:///home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&quot;]]                             
  (printf &quot;(class x)=%s x=&apos;%s&apos;\n&quot; (class x) x) x)                                                                          

; (class x)=class java.net.URL x=&apos;file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&apos;

;=&amp;gt; #&amp;lt;URL file:/home/hara/dj/usr/src/clojurescript/src/cljs/cljs/core.cljs&amp;gt;

(.getProtocol *1)                        
;=&amp;gt; &quot;file&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="27965" author="bmillare" created="Mon, 19 Mar 2012 10:09:10 -0500"  >&lt;p&gt;Fogus, can you please elaborate on using clojure 1.4&apos;s tagged literal features. While I understand that you can define data-reader functions, for example&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;(binding [*data-readers* {&apos;user/f (fn [x] (java.io.File. (first x)))}] (read-string &quot;#user/f [\&quot;hello\&quot;]&quot;)) ;=&amp;gt; #&amp;lt;File hello&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;however, I feel this is only half a fix, compared with the first mentioned solution (involving print-dup), since clojure&apos;s tagged literals only are important for reading, not for printing. Does using tagged literals, so that (read-string (pr-str (read-string ...) works, imply that you must also define print methods per class? If this is true, it seems problematic since if different code wants to define different print methods, this will conflict since defining print-dup methods is global. Is there a good solution for printing objects depending on the context? As an alternative solution, I propose making the default print-method of all objects that didn&apos;t already have a printed representation to be a tagged literal, this way, users can customize what it means to read it. (See &lt;a href=&quot;https://groups.google.com/forum/?fromgroups&amp;amp;hl=en#!topic/clojure/GdT5cO6JoSQ&quot;&gt;https://groups.google.com/forum/?fromgroups&amp;amp;hl=en#!topic/clojure/GdT5cO6JoSQ&lt;/a&gt; )&lt;/p&gt;</comment>
                    <comment id="27966" author="fogus" created="Mon, 19 Mar 2012 10:18:29 -0500"  >&lt;p&gt;&quot;Fogus, can you please elaborate on using clojure 1.4&apos;s tagged literal features.&quot;&lt;/p&gt;

&lt;p&gt;I can, but it falls outside of the scope of this particular ticket.  It might be better to take the broader conversation to the design page at &lt;a href=&quot;http://dev.clojure.org/display/design/Tagged+Literals&quot;&gt;http://dev.clojure.org/display/design/Tagged+Literals&lt;/a&gt; and the clojure-dev list.&lt;/p&gt;

&lt;p&gt;Has the original motivation for this ticket been addressed?&lt;/p&gt;</comment>
                    <comment id="27967" author="bmillare" created="Mon, 19 Mar 2012 10:26:00 -0500"  >&lt;p&gt;I think you&apos;ve explained the underlying problem, so yes. One possible caveat might be that it may be a concern that the current error message is not telling that the underlying problem lies in an improperly initialized object. (or maybe it is, and that&apos;s the error message I should expect).&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1015] Standalone Clojure library for Java users</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1015</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Many of Clojure&apos;s data structures (e.g. PersistentHashMap) may be of interest to the wider Java community, and would benefit from being packaged in a way that makes them easy to include in projects.  While they are public (and thus can be accessed by way of clojure.lang), Clojure&apos;s classloader is implemented in a way such that Clojure files such as core.clj end up being loaded, even when an end-user is not interested in the Clojure environment itself.  The Java classes could also use some documentation!&lt;/p&gt;

&lt;p&gt;I&apos;d be happy to work on a patch but this change may require some restructuring of the build process, so it&apos;d be good to get community sign-off first.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15536">CLJ-1015</key>
            <summary>Standalone Clojure library for Java users</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ezyang">Edward Z. Yang</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Jun 2012 14:19:00 -0500</created>
                <updated>Thu, 14 Jun 2012 17:39:23 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28808" author="jafingerhut" created="Thu, 14 Jun 2012 17:39:23 -0500"  >&lt;p&gt;I am assuming this ticket is a request that the original Clojure distribution be modified to easily build such a library of data structures, and be maintained as a separate build target, going forward.&lt;/p&gt;

&lt;p&gt;Reference to related info: Below is a copy of most of a message from someone with userid Krukow posted to the Clojure Google group on June 3, 2012: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure/UyjmafY_ZE8&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure/UyjmafY_ZE8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a project containing only the persistent data structures for use with Java et al. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/krukow/clj-ds&quot;&gt;https://github.com/krukow/clj-ds&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is the data structures only so no bootstrap penalty. There are also Java&apos;ish &quot;improvements&quot; like basic Generics and improved performance on the iterator pattern.&lt;/p&gt;

&lt;p&gt;It&apos;s still on Clojure 1.3 (As far as I recall), but I am planning on taking another iteration.&lt;/p&gt;

&lt;p&gt;TODO:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;better Generics support&lt;/li&gt;
	&lt;li&gt;more data structures  (tries, RRB-trees)&lt;/li&gt;
	&lt;li&gt;include the reducers library support for parallelism&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-735] Improve error message when a protocol method is not found</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-735</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you call a protocol function but pass the wrong arity (forget an argument for example), you currently a message that says &quot;No single method ... of interface ... found for function ... of protocol ...&quot;.  The code in question is getting matching methods from the Reflector and creates this message if the number of matches != 1.  &lt;/p&gt;

&lt;p&gt;There are really two cases there:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;matches == 0 - this happens frequently due to typos&lt;/li&gt;
	&lt;li&gt;matches &amp;gt; 1 - this presumably happens infrequently&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I propose that the == 0 case instead should have slightly different text at the beginning and a hint as to the intended arity within it: &lt;/p&gt;

&lt;p&gt;&quot;No method: ... of interface ... with arity ... found for function ... of protocol ...&quot;.  &lt;/p&gt;

&lt;p&gt;The &amp;gt;1 case should have similar changes:  &quot;Multiple methods: ... of interface ... with arity ... found for function ... of protocol ...&quot;.&lt;/p&gt;

&lt;p&gt;Patch is attached.  I used case which presumably should have better performance than a nested if/else.  I was not sure whether the reported arity should match the actual Java method arity or Clojure protocol function arity (including the target).  I did the former.&lt;/p&gt;

&lt;p&gt;I did not add a test as I wasn&apos;t sure whether checking error messages in tests was appropriate or not.  Happy to add that if requested.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14348">CLJ-735</key>
            <summary>Improve error message when a protocol method is not found</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="alexmiller">Alex Miller</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Feb 2011 14:52:40 -0600</created>
                <updated>Fri, 9 Dec 2011 10:05:55 -0600</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26570" author="cemerick" created="Thu, 14 Jul 2011 06:39:26 -0500"  >&lt;blockquote&gt;&lt;p&gt;I was not sure whether the reported arity should match the actual Java method arity or Clojure protocol function arity (including the target). I did the former.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I think it should be the latter.  The message is emitted when the protocol methods are being invoked through the corresponding function, so it should be consistent with the errors emitted by regular functions.&lt;/p&gt;

&lt;p&gt;+1 for some tests, too.  There certainly are tests for reflection warnings and such.&lt;/p&gt;

&lt;p&gt;FWIW, I&apos;m happy to take this on if Alex is otherwise occupied.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10107" name="protocolerr.diff" size="1965" author="alexmiller" created="Fri, 4 Feb 2011 14:52:40 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-304] contrib get-source no longer works with deftype</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-304</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Now that deftype creates a class (but not a var), you can&apos;t use c.c.repl-utils/get-source on a deftype. Is there something we can do on the Clojure side to help this work again?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13701">CLJ-304</key>
            <summary>contrib get-source no longer works with deftype</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Apr 2010 21:18:00 -0500</created>
                <updated>Fri, 3 Dec 2010 11:44:01 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23670" author="importer" created="Tue, 24 Aug 2010 16:38:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/304&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/304&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23671" author="importer" created="Tue, 24 Aug 2010 16:38:00 -0500"  >&lt;p&gt;chouser@n01se.net said: That&apos;s a great question.  get-source just needs a file name and line number.&lt;/p&gt;

&lt;p&gt;If IMeta were a protocol, it could be extended to Class.  That implementation could look for a &quot;well-known&quot; static field, perhaps?  __clojure_meta or something?  Then deftype would just have to populate that field, and get-source would be all set.&lt;/p&gt;

&lt;p&gt;Does that plan have any merit?  Is there a better place to store a file name and line number?&lt;/p&gt;</comment>
                    <comment id="23672" author="importer" created="Tue, 24 Aug 2010 16:38:00 -0500"  >&lt;p&gt;stu said: Seems like a reasonable idea, but this is going to get back-burnered for now, unless there is a dire use case we have missed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-900] Document defonce-like behavior of defmulti</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-900</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Since Clojure 1.2 defmulti behaves similarly to defonce. This fact, and how one deals with it when doing interactive development, does not seem to be documented anywhere. This issue pops up fairly regularly in the #clojure channel.&lt;/p&gt;

&lt;p&gt;Commit that introduced the change: &lt;a href=&quot;https://github.com/clojure/clojure/commit/1b8d5001ba094053b24c55829994785be422cfbf&quot;&gt;https://github.com/clojure/clojure/commit/1b8d5001ba094053b24c55829994785be422cfbf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can volunteer to update the docstrings and (if I get access to it) the clojure.org page.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15082">CLJ-900</key>
            <summary>Document defonce-like behavior of defmulti</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="raek">Rasmus Svensson</reporter>
                        <labels>
                        <label>documentation</label>
                    </labels>
                <created>Mon, 19 Dec 2011 16:40:59 -0600</created>
                <updated>Mon, 19 Dec 2011 16:40:59 -0600</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-5] Unintuitive error response in clojure 1.0</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-5</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following broken code:&lt;/p&gt;

&lt;p&gt;(let [&lt;span class=&quot;error&quot;&gt;&amp;#91;x y&amp;#93;&lt;/span&gt; {}] x)&lt;/p&gt;

&lt;p&gt;provides the following stack trace:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.UnsupportedOperationException: nth not supported on this type: PersistentArrayMap (test.clj:0)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:4543)&lt;br/&gt;
        at clojure.lang.Compiler.load(Compiler.java:4857)&lt;br/&gt;
        at clojure.lang.Compiler.loadFile(Compiler.java:4824)&lt;br/&gt;
        at clojure.main$load_script__5833.invoke(main.clj:206)&lt;br/&gt;
        at clojure.main$script_opt__5864.invoke(main.clj:258)&lt;br/&gt;
        at clojure.main$main__5888.doInvoke(main.clj:333)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:413)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:346)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:173)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:463)&lt;br/&gt;
        at clojure.main.main(main.java:39)&lt;br/&gt;
Caused by: java.lang.UnsupportedOperationException: nth not supported on this type: PersistentArrayMap&lt;br/&gt;
        at clojure.lang.RT.nth(RT.java:800)&lt;br/&gt;
        at clojure.core$nth__3578.invoke(core.clj:873)&lt;br/&gt;
        at user$eval__1.invoke(test.clj:1)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:4532)&lt;br/&gt;
        ... 10 more&lt;/p&gt;

&lt;p&gt;The message &quot;nth not supported on this type&quot; while correct doesn&apos;t make the cause of the error very clear.  Better error messages when destructuring would be very helpful.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13402">CLJ-5</key>
            <summary>Unintuitive error response in clojure 1.0</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 02:35:00 -0500</created>
                <updated>Sat, 28 Apr 2012 22:48:40 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="22468" author="importer" created="Tue, 24 Aug 2010 10:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/5&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/5&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27279" author="ekoontz" created="Fri, 11 Nov 2011 19:36:54 -0600"  >&lt;p&gt;Please see the attached patch which produces a (hopefully more clear) error message as shown below (given the broken code shown in the original bug report):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Clojure 1.4.0-master-SNAPSHOT
user=&amp;gt; (let [x 42 y 43] (+ x y))
85
user=&amp;gt; (let [[x y] {}] x)
UnsupportedOperationException left side of binding must be a symbol (found a PersistentVector instead).  clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.checkLet (&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6545)
user=&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In addition, this patch checks the argument of (let) as shown below:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (let 42)
UnsupportedOperationException argument to (let)  must be a vector (found a &lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt; instead).  clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.checkLet (&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6553)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="27280" author="ekoontz" created="Fri, 11 Nov 2011 19:38:24 -0600"  >&lt;p&gt;Patch produced by doing git diff against commit ba930d95fc (master branch).&lt;/p&gt;</comment>
                    <comment id="27290" author="ekoontz" created="Sun, 13 Nov 2011 23:24:45 -0600"  >&lt;p&gt;Sorry, this patch is wrong: it assumes that the left side of the binding is wrong - the &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;x y&amp;#93;&lt;/span&gt;&lt;/tt&gt; in :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(let [[x y] {}] x)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;because &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;x y&amp;#93;&lt;/span&gt;&lt;/tt&gt; is a vector, when in fact, the left side is fine (per &lt;a href=&quot;http://clojure.org/special_forms#let&quot;&gt;http://clojure.org/special_forms#let&lt;/a&gt; : &quot;Clojure supports abstract structural binding, often called destructuring, in let binding lists&quot;.)&lt;/p&gt;

&lt;p&gt;So it&apos;s the right side (the {}) that needs to be checked and flagged as erroneous, not the &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;x y&amp;#93;&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="27374" author="carinmeier" created="Wed, 30 Nov 2011 12:15:24 -0600"  >&lt;p&gt;Add patch better-error-for-let-vector-map-binding&lt;/p&gt;

&lt;p&gt;This produces the following:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(let [[x y] {}] x)
Exception map binding to vector is not supported&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There are other cases that are not handled by this though &amp;#8212; like binding vector to a set&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (let [[x y] #{}] x)
UnsupportedOperationException nth not supported on &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; type: PersistentHashSet&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Wondering if it might be better to try convert the map to a seq to support?  Although this might be another issue.&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;</comment>
                    <comment id="27381" author="aaron" created="Wed, 30 Nov 2011 19:12:37 -0600"  >&lt;p&gt;This seems too specific. Is this issue indicative of a larger problem that should be addressed? Even if this is the only case where bindings produce poor error messages, all the cases described above should be addressed in the patch.  &lt;/p&gt;</comment>
                    <comment id="27473" author="carinmeier" created="Fri, 16 Dec 2011 07:47:56 -0600"  >&lt;p&gt;Unfortunately, realized that this still does not cover the nested destructuring cases.  Coming to the conclusion, that my approach above is not going to work for this.&lt;/p&gt;</comment>
                    <comment id="28309" author="carinmeier" created="Sat, 28 Apr 2012 22:46:34 -0500"  >&lt;p&gt;File: clj-5-destructure-error.diff &lt;/p&gt;

&lt;p&gt;Added support for nested destructuring errors&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;let [[[x1 y1][x2 y2]] [[1 2] {}]]
;=&amp;gt; UnsupportedOperationException let cannot destructure class clojure.lang.PersistentArrayMap.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11124" name="clj-5-destructure-error.diff" size="5796" author="carinmeier" created="Sat, 28 Apr 2012 22:46:34 -0500" />
                    <attachment id="10697" name="CLJ-5.patch" size="2009" author="ekoontz" created="Fri, 11 Nov 2011 19:38:24 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1029] ns defmacro allows arbitrary execution of clojure.core fns</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1029</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The form:&lt;/p&gt;

&lt;p&gt;    (ns foo (:print &quot;I AM A ROBOT&quot;))&lt;/p&gt;

&lt;p&gt;will print &quot;I AM A ROBOT&quot;&lt;/p&gt;

&lt;p&gt;This is because the defmacro takes the name of the first element of the reference, looks it up in the clojure.core namespace and invokes it on the rest of the args.&lt;/p&gt;

&lt;p&gt;This is minor, but it does mean that an otherwise declarative form is not executing code.&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="15588">CLJ-1029</key>
            <summary>ns defmacro allows arbitrary execution of clojure.core fns</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="craigbrozefsky">Craig Brozefsky</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Jul 2012 21:00:38 -0500</created>
                <updated>Sun, 5 Aug 2012 10:00:07 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29043" author="amalloy" created="Wed, 25 Jul 2012 16:37:07 -0500"  >&lt;p&gt;One apparent problem with this patch is that you throw an exception for :refer. You should add that, and make sure there aren&apos;t any others missing. Also, #{x y z} is better than (set &lt;span class=&quot;error&quot;&gt;&amp;#91;x y z&amp;#93;&lt;/span&gt;), and you should probably use pr-str rather than str, although I can&apos;t think of a case where it matters for the objects in question.&lt;/p&gt;</comment>
                    <comment id="29051" author="jafingerhut" created="Thu, 26 Jul 2012 18:31:58 -0500"  >&lt;p&gt;A more minor detail of patch formatting &amp;#8211; please attach your patch in git format.  See the instructions under the section heading &quot;Development&quot; on this web page: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29085" author="craigbrozefsky" created="Sun, 5 Aug 2012 09:53:15 -0500"  >&lt;p&gt;git format-patch version of the diff, with the edits suggested by other maintainers.&lt;/p&gt;</comment>
                    <comment id="29086" author="craigbrozefsky" created="Sun, 5 Aug 2012 10:00:07 -0500"  >&lt;p&gt;Alan: please note that :refer was not mentioned in the docstring for ns, or used in any of the unit tests for clojure.&lt;/p&gt;

&lt;p&gt;Are you sure that it is an expected argument, or just an arrangement that happens to work under the current ns macro?  The docstring for &apos;refer itself says to use :use in ns macros instead of calling refer.&lt;/p&gt;

&lt;p&gt;I added &quot;refer&quot; to the set of accepted references all the same.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11412" name="ns-patch.diff" size="1076" author="craigbrozefsky" created="Sun, 5 Aug 2012 09:53:15 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-776] seque broken for some BlockingQueues</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-776</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.core/seque takes an optional argument that can be the initial capacity for a LinkedBlockingQueue or an instance of the BlockingQueue interface.&lt;/p&gt;

&lt;p&gt;PriorityBlockingQueue is such a class, but fails to work because seque makes a few assumptions about BlockingQueues that are not true for all BlockingQueues.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (def s (seque (java.util.concurrent.PriorityBlockingQueue. 100) (shuffle (range 100))))&lt;br/&gt;
#&apos;user/s&lt;br/&gt;
user=&amp;gt; s&lt;br/&gt;
java.lang.NullPointerException&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (seque (java.util.concurrent.SynchronousQueue.) (shuffle (range 100)))&lt;br/&gt;
&amp;lt;never finishes&amp;gt;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (seque (java.util.concurrent.ArrayBlockingQueue. 10) (shuffle (range 100)))&lt;br/&gt;
(39 41 27 76 1 24 92 34 72 37 67 99 38 21 5 64 9 26 59 43 82 65 3 11 31 93 50 63 15 90 13 75 40 97 57 88 86 53 19 83 2 12 54 49 71 28 68 73 96 44 8 98 61 6 22 25 78 66 32 84 60 94 70 7 89 4 33 55 74 81 51 56 62 87 69 80 77 20 30 91 52 10 48 18 36 58 47 14 16 42 35 17 95 0 45 85 29 23 46 79)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14402">CLJ-776</key>
            <summary>seque broken for some BlockingQueues</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="pepijndevos">Pepijn de Vos</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Apr 2011 08:33:48 -0500</created>
                <updated>Fri, 22 Apr 2011 09:27:55 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26378" author="pepijndevos" created="Thu, 21 Apr 2011 11:32:12 -0500"  >&lt;p&gt;A working implementation with some tests.&lt;/p&gt;</comment>
                    <comment id="26381" author="pepijndevos" created="Fri, 22 Apr 2011 09:27:55 -0500"  >&lt;p&gt;Attachement removed, I&apos;m working on it here: &lt;a href=&quot;https://gist.github.com/934781&quot;&gt;https://gist.github.com/934781&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-809] fn&apos;s created using defn should not lexical shadow the var that holds them</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-809</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;currently (defn foo &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (foo x)) expands to something like (def foo&lt;br/&gt;
(fn foo &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (foo x))) so the fn is bound to foo lexically in the scope&lt;br/&gt;
of the fn body.&lt;/p&gt;

&lt;p&gt;because of this lexical shadowing self calls to fns defined with defn&lt;br/&gt;
do not incur the overhead of var dereferencing, I assume this is the&lt;br/&gt;
reason it was added.&lt;/p&gt;

&lt;p&gt;the lexical shadowing also breaks memoization if you create the&lt;br/&gt;
memoized functions via (alter-var-root #&apos;foo memoize) and several&lt;br/&gt;
macros here and there emit code in this style, since reusing defn is&lt;br/&gt;
the easiest way to get all the good juicy metadata bits like arglists,&lt;br/&gt;
etc.&lt;/p&gt;

&lt;p&gt;1.3 has changes to eliminate some of the cost of going through the var.&lt;/p&gt;

&lt;p&gt;since going through the var is much cheaper now it would be nice to &lt;br/&gt;
eliminate the lexical shadowing.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/33b52b24616967f?hl=en&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/33b52b24616967f?hl=en&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14461">CLJ-809</key>
            <summary>fn&apos;s created using defn should not lexical shadow the var that holds them</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                    </labels>
                <created>Sat, 11 Jun 2011 14:37:22 -0500</created>
                <updated>Fri, 29 Jul 2011 07:39:50 -0500</updated>
                                    <version>Release 1.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26505" author="hiredman" created="Sat, 11 Jun 2011 14:40:23 -0500"  >&lt;p&gt;tests indicate that accessing the fn through the var vs. accessing through the lexical binding have very similar access times&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1013008&quot;&gt;https://gist.github.com/1013008&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;results in&lt;/p&gt;

&lt;p&gt;$ java -jar clojure.jar ~/src/lexicaltest.clj&lt;br/&gt;
lexical binding run 0&lt;br/&gt;
&quot;Elapsed time: 86.739 msecs&quot;&lt;br/&gt;
lexical binding run 1&lt;br/&gt;
&quot;Elapsed time: 8.062 msecs&quot;&lt;br/&gt;
lexical binding run 2&lt;br/&gt;
&quot;Elapsed time: 16.182 msecs&quot;&lt;br/&gt;
var binding run 0&lt;br/&gt;
&quot;Elapsed time: 61.136 msecs&quot;&lt;br/&gt;
var binding run 1&lt;br/&gt;
&quot;Elapsed time: 40.317 msecs&quot;&lt;br/&gt;
var binding run 2&lt;br/&gt;
&quot;Elapsed time: 11.641 msecs&quot;&lt;br/&gt;
$&lt;/p&gt;</comment>
                    <comment id="26510" author="jawolfe" created="Mon, 13 Jun 2011 17:05:00 -0500"  >&lt;p&gt;Here&apos;s another test that makes sure no JIT funny business (e.g. dead code elimination) is going on, and also looks at primitive hinted versions.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1023816&quot;&gt;https://gist.github.com/1023816&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;var-obj result, time: 14930352 ,&quot;Elapsed time: 965.577 msecs&quot;&lt;br/&gt;
lex-obj result, time: 14930352 ,&quot;Elapsed time: 957.741 msecs&quot;&lt;br/&gt;
var-prim result, time: 14930352 ,&quot;Elapsed time: 770.411 msecs&quot;&lt;br/&gt;
lex-prim result, time: 14930352 ,&quot;Elapsed time: 113.412 msecs&quot;&lt;br/&gt;
nil&lt;/p&gt;

&lt;p&gt;I&apos;m not sure how to properly hint the var in the var-prim version to get truly comparable results.  In any case, this use case should definitely be kept in mind. &lt;/p&gt;</comment>
                    <comment id="26511" author="hiredman" created="Mon, 13 Jun 2011 17:35:15 -0500"  >&lt;p&gt;I think the point is we want to make sure the jvm can optimize both just as well, so making the code purposefully unoptimizable is kind of silly, yes? &lt;/p&gt;</comment>
                    <comment id="26526" author="jawolfe" created="Tue, 21 Jun 2011 16:41:55 -0500"  >&lt;p&gt;@Kevin In your gist, the return value of foo is not used, and foo has no side effects.  A sufficiently smart compiler could optimize the calls out entirely, which would not tell us much about the runtime of foo.  &lt;/p&gt;</comment>
                    <comment id="26541" author="aaron" created="Tue, 28 Jun 2011 18:49:28 -0500"  >&lt;p&gt;Rich: Given the performance testing (in the email thread) what is the next step here?&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;more thorough testing&lt;/li&gt;
	&lt;li&gt;patch?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Are there things that this might break that we need to consider?&lt;/p&gt;</comment>
                    <comment id="26667" author="richhickey" created="Fri, 29 Jul 2011 07:39:33 -0500"  >&lt;p&gt;Someone needs to make a patch, and then test perf with and without the patch. These simulated tests aren&apos;t necessarily indicative. Naive fib is an ok test once you have a patch. And yes, more things might break - needs careful assessment.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-821] should reify merge rather than replace on repeated specs? </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-821</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;reify, deftype, and the like fail silently if you specify a class twice:&lt;/p&gt;

&lt;p&gt;(macroexpand &apos;(reify Map (size &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; 0), &lt;br/&gt;
                     Counted (count &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; 0), &lt;br/&gt;
                     Map (keySet &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; nil)))&lt;br/&gt;
;=&amp;gt; (reify* &lt;span class=&quot;error&quot;&gt;&amp;#91;Counted Map&amp;#93;&lt;/span&gt; (count &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; 0) (keySet &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt; nil))&lt;/p&gt;

&lt;p&gt;The later Map section entirely supersedes the former, which I discovered when I wrote a macro that injects some automated method bodies into a reify for you.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a fix to make the above expand to the expected &lt;span class=&quot;error&quot;&gt;&amp;#91;for me, anyway&amp;#93;&lt;/span&gt; output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14493">CLJ-821</key>
            <summary>should reify merge rather than replace on repeated specs? </summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Jul 2011 01:53:45 -0500</created>
                <updated>Tue, 9 Aug 2011 14:18:40 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26650" author="stu" created="Mon, 25 Jul 2011 17:01:35 -0500"  >&lt;p&gt;In Clojure, it is generally the case that redefining something &lt;b&gt;replaces&lt;/b&gt; the original, as opposed to augmenting it by merging the old and the new. This makes it easy to reason locally about how code works. One could argue that the following snippet has the same kind of issue you describe:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn foo [a] 1)
(defn foo [a b] 1)
(foo 1) ; is it a bug that the first arity is gone?&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I also wonder whether the current behavior might be a convenience for some macros. (Clearly it wasn&apos;t for yours!) I am changing the type and title of the ticket to better reflect the nature of the request and see what the BDFL says. &lt;/p&gt;</comment>
                    <comment id="26666" author="richhickey" created="Fri, 29 Jul 2011 07:32:37 -0500"  >&lt;p&gt;Everything in this ticket needs to be said with more precision. I don&apos;t know what exactly the problem is nor what the proposed solution is. &lt;/p&gt;

&lt;p&gt;One thing to note is that it is necessary to accept definitions under base interfaces, so the class areas are not strict, nor expected to be complete.&lt;/p&gt;</comment>
                    <comment id="26714" author="amalloy" created="Tue, 9 Aug 2011 14:16:53 -0500"  >&lt;p&gt;Stuart: The two foo forms you give are entirely separate, and to unify the two behaviors you would have to group them together. It&apos;s not at all unreasonable to suppose the user wants to define foo once, fiddle with it, and then redefine it - clojure.core does similar stuff with let, reduce, etc.&lt;/p&gt;

&lt;p&gt;As written, deftype/reify have a somewhat similar &quot;look&quot; - because there is nothing physically grouping the declaration of Map with its functions, it&apos;s not clear what should happen when a heading like Map is given twice, and it&apos;s not specified in the docs.&lt;/p&gt;

&lt;p&gt;I think the difference is that in the reify case, the two are in the &lt;em&gt;same top-level form&lt;/em&gt;, so the compiler can detect that you&apos;re trying to do something &quot;weird&quot;, so a silent redefinition (reasonable for your defn example) is surprising. There are a number of solutions that would reduce this surprise:&lt;/p&gt;

&lt;p&gt;1) Permit or require reify to group things, as in (reify (Comparable (compare &lt;span class=&quot;error&quot;&gt;&amp;#91;this other&amp;#93;&lt;/span&gt; 1))). Then the explicit grouping of Comparable with its methods serves two purposes: it implies that other definitions for Comparable should be included in that grouping; and it makes it easier to &lt;b&gt;do&lt;/b&gt; that, because you can just iterate over forms until you find Comparable, and then insert another definition.&lt;/p&gt;

&lt;p&gt;2) Throw an exception if an interface is specified twice. This is not ideal because it can be a lot of work for the user to group things together themselves, while it&apos;s easy for deftype to do given the grouping it&apos;s already doing. However, it would avoid the confusion and surprise, by saying &quot;that&apos;s not allowed&quot; rather than leaving the user guessing what&apos;s gone wrong.&lt;/p&gt;

&lt;p&gt;3) Interpret my original example code as an attempt to open the Map interface, add implementations, and then later add some more implementations.&lt;/p&gt;

&lt;p&gt;I would have liked reify to implement (1) to begin with, but at this point I don&apos;t think the syntax is backwards-compatible, so it doesn&apos;t seem like a good idea. I suppose either (2) or (3) is fine, and they both seem like an improvement over the current confusing behavior. Of course, I prefer (3), but I can understand a desire to make reify reject syntax that is not immediately obvious in intent rather than interpreting it as what I think is the most useful intent.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10281" name="0001-Make-deftype-reify-extend-tolerant-of-interfaces-spe.patch" size="1540" author="amalloy" created="Wed, 20 Jul 2011 01:54:06 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-983] proxy-super does not restore original binding if call throws exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-983</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The code for proxy-call-with-super internally used by proxy-super does not handle exceptions from the call method:&lt;/p&gt;

&lt;p&gt;(defn proxy-call-with-super &lt;span class=&quot;error&quot;&gt;&amp;#91;call this meth&amp;#93;&lt;/span&gt;&lt;br/&gt;
 (let &lt;span class=&quot;error&quot;&gt;&amp;#91;m (proxy-mappings this)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (update-proxy this (assoc m meth nil))&lt;br/&gt;
    (let &lt;span class=&quot;error&quot;&gt;&amp;#91;ret (call)&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (update-proxy this m)&lt;br/&gt;
      ret)))&lt;/p&gt;

&lt;p&gt;As a result the following sequence behaves unexpectedly:&lt;br/&gt;
(def obj (proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;java.lang.ClassLoader&amp;#93;&lt;/span&gt; []&lt;br/&gt;
		      (loadClass &lt;span class=&quot;error&quot;&gt;&amp;#91;cl&amp;#93;&lt;/span&gt; (println &quot;enter&quot;)&lt;br/&gt;
				 (proxy-super loadClass cl))))&lt;br/&gt;
(.loadClass obj &quot;nonexistent&quot;)&lt;br/&gt;
;; prints enter, then throws ClassNotFoundException&lt;br/&gt;
(.loadClass obj &quot;nonexistent&quot;)&lt;br/&gt;
;; does not print anything before throwing cnfe&lt;/p&gt;


&lt;p&gt;A try-finally block around the invocation would solve this particular issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15409">CLJ-983</key>
            <summary>proxy-super does not restore original binding if call throws exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tuor713">Valentin Mahrwald</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 5 May 2012 03:36:15 -0500</created>
                <updated>Sat, 5 May 2012 09:04:26 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28392" author="tuor713" created="Sat, 5 May 2012 09:04:26 -0500"  >&lt;p&gt;Test &amp;amp; fix patch on latest Clojure github branch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11171" name="proxy_super.patch" size="1867" author="tuor713" created="Sat, 5 May 2012 09:04:26 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-888] defprotocol should throw error when signatures include variable number of parameters</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-888</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I tried to use &amp;amp; in the signature for a method in defprotocol. Apparently (see below), this is compiled so that &amp;amp; becomes a simple parameter name, and there is no special handling for variable number of parameters. I think the use of &amp;amp; in a protocol signature ought to be detected and immediately cause an exception (I also think this restriction on the signatures ought to be documented; I couldn&apos;t find it specified in the current documentation, though of course it is implied (as I later realized) by the fact that defprotocol creates a Java interface).&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defprotocol Applier (app &lt;span class=&quot;error&quot;&gt;&amp;#91;this f &amp;amp; args&amp;#93;&lt;/span&gt;))&lt;br/&gt;
Applier&lt;br/&gt;
user=&amp;gt; (deftype A [] Applier (app &lt;span class=&quot;error&quot;&gt;&amp;#91;_ f &amp;amp; args&amp;#93;&lt;/span&gt; (prn f &amp;amp; args) (apply f args)))&lt;br/&gt;
user.A&lt;br/&gt;
user=&amp;gt; (app (A.) + 1 2)&lt;br/&gt;
#&amp;lt;core$&lt;em&gt;PLUS&lt;/em&gt; clojure.core$&lt;em&gt;PLUS&lt;/em&gt;@5d9d0d20&amp;gt; 1 2&lt;br/&gt;
IllegalArgumentException Don&apos;t know how to create ISeq from: java.lang.Long  &lt;br/&gt;
clojure.lang.RT.seqFrom (RT.java:487)&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15039">CLJ-888</key>
            <summary>defprotocol should throw error when signatures include variable number of parameters</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="glchapman">Greg Chapman</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Nov 2011 16:38:02 -0600</created>
                <updated>Tue, 29 Nov 2011 16:38:02 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1039] Using &apos;def with metadata {:type :anything} throws ClassCastException</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1039</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In lein 1.7.1 (and CCW) the form (def ^{:type :anything} mydef 1) throws &quot;ClassCastException clojure.lang.Var cannot be cast to clojure.lang.IObj  clojure.core/with-meta (core.clj:211)&quot;.&lt;br/&gt;
This seems to be due to setting the :type metadata. With other metadata keys it works well.&lt;/p&gt;

&lt;p&gt;If it is intended to forbid setting the :type metadata, then there should be an appropriate error message instead of the ClassCastException&lt;/p&gt;


&lt;p&gt;In lein2 repl which is using &quot;REPL-y 0.1.0-beta8&quot; the exception does not occur.&lt;/p&gt;

&lt;p&gt;Full stacktrace:&lt;br/&gt;
java.lang.ClassCastException: clojure.lang.Var cannot be cast to clojure.lang.IObj&lt;br/&gt;
 at clojure.core$with_meta.invoke (core.clj:211)&lt;br/&gt;
    clojure.core$vary_meta.doInvoke (core.clj:617)&lt;br/&gt;
    clojure.lang.RestFn.invoke (RestFn.java:425)&lt;br/&gt;
    clojure.core/fn (core_print.clj:76)&lt;br/&gt;
    clojure.lang.MultiFn.invoke (MultiFn.java:167)&lt;br/&gt;
    clojure.core$pr_on.invoke (core.clj:3266)&lt;br/&gt;
    clojure.core$pr.invoke (core.clj:3278)&lt;br/&gt;
    clojure.lang.AFn.applyToHelper (AFn.java:161)&lt;br/&gt;
    clojure.lang.RestFn.applyTo (RestFn.java:132)&lt;br/&gt;
    clojure.core$apply.invoke (core.clj:601)&lt;br/&gt;
    clojure.core$prn.doInvoke (core.clj:3311)&lt;br/&gt;
    clojure.lang.RestFn.invoke (RestFn.java:408)&lt;br/&gt;
    clojure.main$repl$read_eval_print__6405.invoke (main.clj:246)&lt;br/&gt;
    clojure.main$repl$fn__6410.invoke (main.clj:266)&lt;br/&gt;
    clojure.main$repl.doInvoke (main.clj:266)&lt;br/&gt;
    clojure.lang.RestFn.invoke (RestFn.java:512)&lt;br/&gt;
    user$eval27$acc_&lt;em&gt;3261&lt;/em&gt;&lt;em&gt;auto&lt;/em&gt;__&lt;em&gt;30$fn&lt;/em&gt;_32.invoke (NO_SOURCE_FILE:1)&lt;br/&gt;
    clojure.lang.AFn.run (AFn.java:24)&lt;br/&gt;
    java.lang.Thread.run (Thread.java:662)&lt;/p&gt;</description>
                <environment>Ubuntu, lein 1.7.1 - lein repl</environment>
            <key id="15618">CLJ-1039</key>
            <summary>Using &apos;def with metadata {:type :anything} throws ClassCastException</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gv">Gunnar V&#246;lkel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Aug 2012 06:05:34 -0500</created>
                <updated>Fri, 10 Aug 2012 13:40:31 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29106" author="stu" created="Fri, 10 Aug 2012 13:40:31 -0500"  >&lt;p&gt;This is caused by the printer dispatch function&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;(defmulti print-method (fn [x writer]
                         (let [t (get (meta x) :type)]
                           (if (keyword? t) t (class x)))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which ends up calling the default dispatch, which tries to vary-meta.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-929] Accessing Java property starting with _ has issues in 1.4</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-929</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When attempting to use interop syntax with symbols which aren&apos;t legal Java names (such as deleted?), the names are mangled a bit. That&apos;s necessary, of course, and the method of munging can be internal to the compiler. However, the behavior when munging changed a little between 1.3 and 1.4 beta1. Obviously the specifics of munging are something I should avoid relying on, but the way it changed looks like an accident or a bug even so.&lt;/p&gt;

&lt;p&gt;The use-case I ran into is that defrecords contain a field named __meta for tracking their metadata. In both 1.3 and 1.4 you can get at that field with (. record __meta), which avoids munging. But on 1.3 (. record --meta) also accesses it (translating each - to a _), while on 1.4 (. record -meta) works and (. record --meta) doesn&apos;t.&lt;/p&gt;

&lt;p&gt;Actually, looking at line 883 of Compiler.java, it looks like this may be related to the (. foo -property) syntax ported from CLJS, and indeed (. record ---meta) works, I guess by reducing to an &quot;old style&quot; (. record --meta). So that clears up why --meta fails: it&apos;s looking for __meta. I&apos;m still not clear on why (. record -meta) works, though.&lt;/p&gt;

&lt;p&gt;So it looks like the - prefix for properties is not 100% backwards-compatible like it seemed to be. Is this an issue we need to fix, or is the recommendation simply to never have fields that start with - or _?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15208">CLJ-929</key>
            <summary>Accessing Java property starting with _ has issues in 1.4</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Feb 2012 17:50:05 -0600</created>
                <updated>Thu, 9 Feb 2012 15:01:53 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27701" author="fogus" created="Thu, 9 Feb 2012 14:33:39 -0600"  >&lt;p&gt;Is this a general problem with fields starting with _ or just fields named __meta as in (defrecord &lt;span class=&quot;error&quot;&gt;&amp;#91;__meta&amp;#93;&lt;/span&gt; ...)&lt;/p&gt;
</comment>
                    <comment id="27702" author="amalloy" created="Thu, 9 Feb 2012 15:01:53 -0600"  >&lt;p&gt;It&apos;s a general issue. (defrecord &lt;span class=&quot;error&quot;&gt;&amp;#91;__meta&amp;#93;&lt;/span&gt;) actually breaks immediately, because the record mechanism itself generates a field named __meta, but any field named with a - or _ prefix has this issue.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defrecord Foo &lt;span class=&quot;error&quot;&gt;&amp;#91;-blah&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.Foo&lt;br/&gt;
user=&amp;gt; (.-blah (Foo. 1))&lt;br/&gt;
IllegalArgumentException No matching field found: blah for class user.Foo  clojure.lang.Reflector.getInstanceField (Reflector.java:289)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-958] Make APersistentVector.iterator slightly more efficient</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-958</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The attached patch uses a sequence to create an iterator for persistent vectors.  It should be slightly more efficient for PersistentVector objects than repeatedly calling nth (for reasons that I outline in the commit message).  &lt;/p&gt;</description>
                <environment></environment>
            <key id="15290">CLJ-958</key>
            <summary>Make APersistentVector.iterator slightly more efficient</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chrismgray">Chris Gray</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Mar 2012 13:28:07 -0500</created>
                <updated>Tue, 14 Aug 2012 13:43:53 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11003" name="0001-Make-APersistentVector.iterator-slightly-more-effici.patch" size="1394" author="chrismgray" created="Fri, 23 Mar 2012 13:28:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</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>

<item>
            <title>[CLJ-957] Typehints for variadic methods in deftype fail to compile</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-957</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When a method defined by a protocol has multiple typehinted signatures, it is impossible to implement them using deftype because deftype throws away the typehints.  The compiler then looks for the proper signatures (i.e. with typehints) and throws an exception when it can&apos;t find them.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15289">CLJ-957</key>
            <summary>Typehints for variadic methods in deftype fail to compile</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chrismgray">Chris Gray</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Mar 2012 17:24:31 -0500</created>
                <updated>Sun, 19 Aug 2012 04:31:33 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27982" author="chrismgray" created="Thu, 22 Mar 2012 17:41:46 -0500"  >&lt;p&gt;Clojure-dev discussion started here: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/1f106a21ec1ce3de&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/1f106a21ec1ce3de&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29228" author="jafingerhut" created="Sun, 19 Aug 2012 04:31:33 -0500"  >&lt;p&gt;Patch clj-957-allow-typehinting-of-method-signatures-in-deftype-patch2.txt dated Aug 19 2012 is identical to Chris Gray&apos;s patch 0001-Allow-for-typehinting-of-method-signatures-in-deftyp.patch dated Mar 22, 2012, except it has some updated context lines so that it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11002" name="0001-Allow-for-typehinting-of-method-signatures-in-deftyp.patch" size="3242" author="chrismgray" created="Thu, 22 Mar 2012 17:24:31 -0500" />
                    <attachment id="11448" name="clj-957-allow-typehinting-of-method-signatures-in-deftype-patch2.txt" size="3247" author="jafingerhut" created="Sun, 19 Aug 2012 04:31:32 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-668] Improve slurp performance by using native Java StringWriter and jio/copy</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-668</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Instead of copying each character from InputReader to StringBuffer.&lt;/p&gt;

&lt;p&gt;Performance improvement:&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;From:
user&amp;gt; (time (count (slurp &quot;/home/juergen/test.dat&quot;)))
&quot;Elapsed time: 4269.980863 msecs&quot;
104857600
To:
user&amp;gt; (time (count (slurp &quot;/home/juergen/test.dat&quot;)))
&quot;Elapsed time: 1140.854023 msecs&quot;
104857600
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Patch: &lt;a href=&quot;http://github.com/juergenhoetzel/clojure/commit/af1a5713cd485ba5f1db25c37906ebaf7d474b47&quot;&gt;http://github.com/juergenhoetzel/clojure/commit/af1a5713cd485ba5f1db25c37906ebaf7d474b47&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14270">CLJ-668</key>
            <summary>Improve slurp performance by using native Java StringWriter and jio/copy</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Nov 2010 15:58:31 -0500</created>
                <updated>Mon, 1 Nov 2010 15:58:31 -0500</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-997] max-key and min-key to return the first entry in case of several candidates</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-997</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Consider the following code:&lt;/p&gt;

&lt;p&gt;(def values [&lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;3 4&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;5&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;6 7&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;8&amp;#93;&lt;/span&gt;])&lt;br/&gt;
(apply max-key count values)&lt;br/&gt;
; =&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;6 7&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Which returns the &lt;b&gt;last&lt;/b&gt; max entry &lt;span class=&quot;error&quot;&gt;&amp;#91;6 7&amp;#93;&lt;/span&gt;. Why its not the first max entry &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;?&lt;br/&gt;
Well, truth is &quot;max-key&quot; gives no warranty on which max value will be returned.&lt;/p&gt;

&lt;p&gt;Consider the following example in Scala:&lt;/p&gt;

&lt;p&gt;println(List(List(0, 1, 2), List(2, 3, 4), List(1), List(1, 2, 3)).maxBy(_.length))&lt;br/&gt;
&amp;gt; List(0, 1, 2)&lt;/p&gt;

&lt;p&gt;The very same function in Scala returns the &lt;b&gt;first&lt;/b&gt; max entry (by default).&lt;/p&gt;



&lt;p&gt;The code from relase 1.4 file &quot;clojure/core.clj#4419-4426&quot; looks is:&lt;br/&gt;
=======================&lt;br/&gt;
4419: (defn max-key&lt;br/&gt;
4420:  &quot;Returns the x for which (k x), a number, is greatest.&quot;&lt;br/&gt;
4421:  {:added &quot;1.0&quot;&lt;br/&gt;
4422:   :static true}&lt;br/&gt;
4423:  (&lt;span class=&quot;error&quot;&gt;&amp;#91;k x&amp;#93;&lt;/span&gt; x)&lt;br/&gt;
4424:  (&lt;span class=&quot;error&quot;&gt;&amp;#91;k x y&amp;#93;&lt;/span&gt; (if (&amp;gt; (k x) (k y)) x y))&lt;br/&gt;
4425:  (&lt;span class=&quot;error&quot;&gt;&amp;#91;k x y &amp;amp; more&amp;#93;&lt;/span&gt;&lt;br/&gt;
4426:   (reduce1 #(max-key k %1 %2) (max-key k x y) more)))&lt;br/&gt;
=======================&lt;/p&gt;

&lt;p&gt;I am unsure what is the motivation in returning the last candidate, but&lt;/p&gt;

&lt;p&gt;I suggest two following things:&lt;/p&gt;

&lt;p&gt;1. Make &quot;max-key&quot; and &quot;min-key&quot; return the &lt;b&gt;first&lt;/b&gt; max/min entry if there are several candidates.&lt;/p&gt;

&lt;p&gt;  This behavior seems more natural/convenient (to me), because in most cases you want to get first &quot;winner&quot;.&lt;br/&gt;
  (e.g. find the first biggest vector in a sequence) and less often you need to get the last entry &amp;#8211; in those cases&lt;br/&gt;
   you can do &quot;reverse&quot; before feeding a sequence to &quot;max-key&quot;, thus it seems having &quot;return first max&quot; behavior more useful.&lt;/p&gt;

&lt;p&gt;  Line #4424 should have &quot;&amp;gt;=&quot; instead of &quot;&amp;gt;&quot;.&lt;/p&gt;

&lt;p&gt;2. Make &quot;max-key&quot; and &quot;min-key&quot; make warranty on order, which max/min entry will be returned (either first or last).&lt;/p&gt;

&lt;p&gt;  Line #4420 should say &quot;Returns the x for which (k x), a number, is greatest. In case of several matches, the first max entry will be returned&quot; or the same doc, but saying &quot;the last max entry will returned&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15453">CLJ-997</key>
            <summary>max-key and min-key to return the first entry in case of several candidates</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="oshyshko">Oleksandr Shyshko</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 May 2012 06:03:15 -0500</created>
                <updated>Fri, 18 May 2012 16:03:44 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28526" author="steveminer@gmail.com" created="Fri, 18 May 2012 16:03:44 -0500"  >&lt;p&gt;The current behavior matches the documentation so I wouldn&apos;t consider it a &quot;defect&quot;.  There doesn&apos;t seem to be a compelling reason to impose a tie-breaker rule on the implementation.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-731] Create macro to variadically unroll a combinator function definition</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-731</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure contains a set of combinators that are implemented in a similar, but slightly different way.  That is, they are implemented as a complete set of variadic overloads on both the call-side and also on the functions that they return.  Visually, they all tend to look something like:&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;(defn foo
  ([f]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2 f3]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2 f3 &amp;amp; fs]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To build this type of function for each combinator is tedious and error-prone.&lt;/p&gt;

&lt;p&gt;There must be a way to implement a macro that takes a &quot;specification&quot; of a combinator including:&lt;/p&gt;

&lt;p&gt;1. name&lt;br/&gt;
2. docstring&lt;br/&gt;
3. do stuff template&lt;br/&gt;
4. do variadic stuff template&lt;/p&gt;

&lt;p&gt;And builds something like the function &lt;tt&gt;foo&lt;/tt&gt; above.  This macro should be able to implement the current batch of combinators (assuming that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-730&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-730&lt;/a&gt; is completed first for the sake of verification).&lt;/p&gt;</description>
                <environment></environment>
            <key id="14344">CLJ-731</key>
            <summary>Create macro to variadically unroll a combinator function definition</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Jan 2011 12:00:01 -0600</created>
                <updated>Fri, 28 Jan 2011 09:40:05 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="26181" author="stu" created="Fri, 28 Jan 2011 09:03:46 -0600"  >&lt;p&gt;This seems useful. Rich, would you accept a patch?&lt;/p&gt;</comment>
                    <comment id="26185" author="stu" created="Fri, 28 Jan 2011 09:40:05 -0600"  >&lt;p&gt;Nevermind, just saw that Rich already suggested this on the dev list. Patch away.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-373] update-in with empty key paths</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-373</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;To the topic of get-in and update-in. While I realize this is not a bug it is odd and in my eyes unexpected and unwanted behavior.&lt;/p&gt;

&lt;p&gt;get-in called with an empty path returns the hashmap it was given to walk through - this is as I expect and makes a lot of sense when dynamically (with generated pathes ) walking a hash map.&lt;/p&gt;

&lt;p&gt;update-in behaves differently and while from the implementation side, it&apos;s behavior too makes sense, it does not work as expected (at least not for me) update-in with an empty map creates a new key &apos;nil&apos; so:&lt;/p&gt;

&lt;p&gt;(update-in {...} [] f) ist he same as (update-in {...} &lt;span class=&quot;error&quot;&gt;&amp;#91;nil&amp;#93;&lt;/span&gt; f) while (get-in {...} []) is not the same as (get-in {...} &lt;span class=&quot;error&quot;&gt;&amp;#91;nil&amp;#93;&lt;/span&gt;) and of cause differs from what update-in does.&lt;/p&gt;

&lt;p&gt;For automatically walking trees the behavior of get-in makes a lot more sense since the current behavior of update-in forces you to check for empty paths and if they are empty fall back to plain assoc and get (or get-in since this works):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;-let [r (butlast @path)]
(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
  (alter m update-in r dissoc (last @path))
  (alter m update-in r assoc {:name @sr} c))
(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
  (alter m dissoc (last @path))
  (alter m assoc {:name @sr} c)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next argument is that update-in with an empty map working on nil isn&apos;t easy to gasp, one needs to know the implementation details to realize that it works, I think 90% of the people reading update-in with [] will not instinctively know that it works on the key nil, so changing this would most likely not break any current code, and if it would the code would be bad anyway &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/tongue.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;

&lt;p&gt;Chouser has, a very nice solution on the mailing list that would fix the problem I&apos;m not sure if I&apos;m entitled to post it here since I did not wrote it but it can be found in this thread: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/de5b20b8c3fe498b?hl=en&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/de5b20b8c3fe498b?hl=en&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Heinz&lt;/p&gt;</description>
                <environment></environment>
            <key id="13770">CLJ-373</key>
            <summary>update-in with empty key paths</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Jun 2010 10:31:00 -0500</created>
                <updated>Sat, 8 Sep 2012 06:13:29 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="23998" author="importer" created="Fri, 8 Oct 2010 10:33:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/373&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/373&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="25938" author="chouser@n01se.net" created="Sat, 13 Nov 2010 18:37:53 -0600"  >&lt;p&gt;I&apos;ve attached my code from the g.group thread in the form of a patch, in case it&apos;s sufficient.  (Thanks to abedra for the gentle kick in the pants.)&lt;/p&gt;</comment>
                    <comment id="25974" author="stu" created="Mon, 29 Nov 2010 08:20:59 -0600"  >&lt;p&gt;Looks to me like the patch is misusing if-let, e.g.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(when-let [[k &amp;amp; mk] []] &lt;span class=&quot;code-quote&quot;&gt;&quot;Doh!&quot;&lt;/span&gt;) 
=&amp;gt; Doh!&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Please correct, and add tests for &lt;tt&gt;nil&lt;/tt&gt; and &lt;tt&gt;[]&lt;/tt&gt; keys (at least).&lt;/p&gt;</comment>
                    <comment id="28412" author="scottlowe" created="Tue, 8 May 2012 12:20:53 -0500"  >&lt;p&gt;I will write some tests and correct this.&lt;/p&gt;</comment>
                    <comment id="28419" author="scottlowe" created="Wed, 9 May 2012 20:39:11 -0500"  >&lt;p&gt;I&apos;m sorry to report that my good intentions of wanting to help clear some of the project backlog has created more work by way of further questions. I&apos;d also like to clarify the desired new behaviours for the test cases.&lt;/p&gt;

&lt;p&gt;Heinz proposed that an empty key sequence will not create a new nil key in the returned map.&lt;br/&gt;
He also suggested that the following behaviour changes be made (compare old and new* behaviours):&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; 
(update-in {1 2} [] (constantly {2 3}))
{nil {2 3}, 1 2}

(update-in* {1 2} [] (constantly {2 3}))
{2 3}

(update-in {1 2} [] assoc  1 3)
{nil {1 3}, 1 2}

(update-in* {1 2} [] assoc  1 3)
{1 3}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Chouser also added that nil keys should be honoured, as before:&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; 
(update-in* {nil 2} [nil] (constantly 3))
{nil 3}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;I&apos;ve added a variety of tests to cover the existing behaviour and would like to confirm that the above is all that&apos;s required for new behaviour.&lt;/p&gt;

&lt;p&gt;The patch from November 2010 didn&apos;t work, but I tweaked it with a &lt;em&gt;when-let&lt;/em&gt; as Stuart suggested and placed a check for an empty sequence of keys before the &lt;em&gt;when-let&lt;/em&gt; block; because essentially, the primary behaviour change boils down to simply handling an empty sequence of keys, in addition to the existing behaviours.&lt;/p&gt;

&lt;p&gt;I&apos;m not entirely convinced that these changes are a good thing, but at least there&apos;s now something concrete for discussion. Please have a look at what is there. The good news is that at least there are some tests covering &lt;em&gt;update-in&lt;/em&gt; now.&lt;/p&gt;</comment>
                    <comment id="28596" author="jafingerhut" created="Thu, 24 May 2012 22:35:24 -0500"  >&lt;p&gt;clj-373-alter-behavior-of-update-in-with-empty-key-patch2.txt dated May 24, 2012 supersedes patch 0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-373&quot; title=&quot;update-in with empty key paths&quot;&gt;CLJ-373&lt;/a&gt;&lt;del&gt;Alter-behaviour-of-update-in-with-empty-key&lt;/del&gt;.patch dated May 9, 2012.  It makes no changes to the contents of the patch except in the lines of context that have changed since the earlier patch was created.  It applies cleanly to the latest master whereas the earlier patch no longer does.  Builds and passes tests with Oracle/Apple JDK 1.6 on Mac OS X 10.6.8.&lt;/p&gt;</comment>
                    <comment id="29176" author="fogus" created="Wed, 15 Aug 2012 11:21:49 -0500"  >&lt;p&gt;This patch creates a new error mode highlighted by the following:&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;(update-in {:a 1} [] inc)

; ClassCastException clojure.lang.PersistentArrayMap cannot be cast to java.lang.Number
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason is that the code that executes in the event that the keys are empty (or nil) blindly assumes that the function given can be applied to the map itself. This is no problem in the case of &lt;tt&gt;assoc&lt;/tt&gt; and the like, but clearly not for &lt;tt&gt;inc&lt;/tt&gt; and many other useful functions.&lt;/p&gt;

&lt;p&gt;The old behavior was to throw an NPE and if any code relies on that fact is now broken. Maybe this is not a problem, but I&apos;m kicking it back to get a little more discussion &lt;b&gt;and&lt;/b&gt; to request that whatever the ultimate fix happens to be, its behavioral changes and error modes are noted in the docstring for &lt;tt&gt;update-in&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="29407" author="gv" created="Sat, 8 Sep 2012 06:11:44 -0500"  >&lt;p&gt;I vote for changing `update-in` to support empty key vectors.&lt;/p&gt;

&lt;p&gt;Because I think &quot;(apply f m args)&quot; in case of an empty vector is the natural continuation of the usual behavior of update-in:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;update-in with 2 keys the second level map is updated&lt;/li&gt;
	&lt;li&gt;update-in with 1 key the first level map (child of given map) is updated&lt;/li&gt;
	&lt;li&gt;update-in with no key the given map (zero level) is updated.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Otherwise, you will always have to wrap update-in in something like the following when the keys vector is computed:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;    (if (seq keys) (apply update-in m keys f args) (apply f m args))&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;To Fogus&apos; last post: (update-in {:a {:b 1}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a&amp;#93;&lt;/span&gt; inc) fails similar and is not handled with a special exception.&lt;/p&gt;



</comment>
                </comments>
                    <attachments>
                    <attachment id="11182" name="0001-CLJ-373-Alter-behaviour-of-update-in-with-empty-key-.patch" size="2922" author="scottlowe" created="Wed, 9 May 2012 20:39:11 -0500" />
                    <attachment id="10019" name="0001-Support-empty-path-in-update-in.-CLJ-373.patch" size="949" author="chouser@n01se.net" created="Sat, 13 Nov 2010 18:37:53 -0600" />
                    <attachment id="11256" name="clj-373-alter-behavior-of-update-in-with-empty-key-patch2.txt" size="2901" author="jafingerhut" created="Thu, 24 May 2012 22:35:24 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>chouser@n01se.net</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1021] (let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1021</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;i 5&amp;#93;&lt;/span&gt; (defmacro m &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; args) (def x (m (inc 5) (inc 6) (inc 7))) &lt;a href=&quot;#&amp;#39;m)&quot;&gt;x m (meta #&apos;m)&lt;/a&gt;)&lt;br/&gt;
is&lt;br/&gt;
[(8) #&amp;lt;user$eval522$m_&lt;em&gt;523 user$eval522$m&lt;/em&gt;_523@11a74355&amp;gt; {:macro true, :ns #&amp;lt;Namespace user&amp;gt;, :name m, :arglists (&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt;), :line 1, :file &quot;NO_SOURCE_PATH&quot;}]&lt;/p&gt;

&lt;p&gt;It appears to be interpreting m as a function despite the metadata. This behavior only shows up inside the (let ...).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15565">CLJ-1021</key>
            <summary>(let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="zii-prime">Zii Prime</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 2 Jul 2012 23:32:22 -0500</created>
                <updated>Thu, 13 Sep 2012 14:29:20 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29222" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500"  >&lt;p&gt;The problem is the same as the one for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-918&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-918&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The patch linked there was mine but i had no CA signed at that time, and no account on jira.&lt;/p&gt;

&lt;p&gt;Here is the same patch in the correct format.&lt;/p&gt;

&lt;p&gt;Bug #918 should be closed as this is a duplicate&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11443" name="001-propagate-on-macro-meta.diff" size="1018" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1003] :100 is a valid Clojure keyword. Is that intentional?</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1003</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In the latest clojure (eccde24c7),&lt;/p&gt;

&lt;p&gt;These parse as keywords:&lt;/p&gt;

&lt;p&gt;:100&lt;br/&gt;
:100/a &lt;/p&gt;

&lt;p&gt;This is an error:&lt;/p&gt;

&lt;p&gt;:a/100&lt;/p&gt;

&lt;p&gt;Is this behavior intentional?&lt;/p&gt;

&lt;p&gt;In LispReader.java, the pattern for a symbol (and keyword) is &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;?([\\D&amp;amp;&amp;amp;&lt;span class=&quot;error&quot;&gt;&amp;#91;^/&amp;#93;&lt;/span&gt;].*/)?([&lt;br clear=&quot;all&quot; /&gt;D&amp;amp;&amp;amp;&lt;span class=&quot;error&quot;&gt;&amp;#91;^/&amp;#93;&lt;/span&gt;]&lt;span class=&quot;error&quot;&gt;&amp;#91;^/&amp;#93;&lt;/span&gt;*)&quot;. If I&apos;m mentally parsing that correctly, it seems like none of my examples should be valid keywords. I don&apos;t know why the first two cases parse.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt; says that none of my examples should parse.&lt;/p&gt;

&lt;p&gt;Clojurescript does not accept any of my examples, see &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-142&quot; title=&quot;ClojureScript reader throws TypeError when map keys start with colon then number&quot;&gt;&lt;del&gt;CLJS-142&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15482">CLJ-1003</key>
            <summary>:100 is a valid Clojure keyword. Is that intentional?</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="netguy204">Brian Taylor</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 May 2012 23:39:17 -0500</created>
                <updated>Thu, 13 Sep 2012 18:34:52 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29438" author="jafingerhut" created="Thu, 13 Sep 2012 18:34:52 -0500"  >&lt;p&gt;The reason that :100 parses as a keyword is that [&lt;br clear=&quot;all&quot; /&gt;D&amp;amp;&lt;span class=&quot;error&quot;&gt;&amp;#91;^/&amp;#93;&lt;/span&gt;] matches a colon character, too.  So the first : of :100 is not matching the &lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;? at the beginning of the regular expression, but by a later part of it.  Regexps can be tricky.&lt;/p&gt;

&lt;p&gt;Whether this is intentional or not, my guess is probably not.  Given that the docs at &lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt; also say &quot;A symbol can contain one or more non-repeating &apos;:&apos;s&quot;, writing a regexp that matches only what is documented there looks fairly complex.&lt;/p&gt;

&lt;p&gt;Clojure has a history of allowing things, without throwing exceptions or giving any other errors, even if they are documented as not legal.  This may be one of those cases.  Do not consider this last paragraph as any kind of authoritative answer.  It is only my observation.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1063] Missing dissoc-in</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1063</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There is no clojure.core/dissoc-in although there is an assoc-in.&lt;br/&gt;
It is correct that dissoc-in can be build with update-in and dissoc but this is an argument against assoc-in as well.&lt;br/&gt;
When a shortcut for assoc-in is provided, there should also be one for dissoc-in for consistency reasons.&lt;br/&gt;
Implementation is analogical to assoc-in.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15682">CLJ-1063</key>
            <summary>Missing dissoc-in</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gv">Gunnar V&#246;lkel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Sep 2012 05:20:59 -0500</created>
                <updated>Mon, 17 Sep 2012 07:04:54 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29434" author="jafingerhut" created="Thu, 13 Sep 2012 14:17:36 -0500"  >&lt;p&gt;Patch clj-1063-add-dissoc-in-patch-v2.txt dated Sep 13 2012 supersedes 001-dissoc-in.diff dated Sep 7 2012.  It fixes a typo (missing final &quot; in doc string), and adds a test case for the new function.&lt;/p&gt;</comment>
                    <comment id="29436" author="bronsa" created="Thu, 13 Sep 2012 14:27:24 -0500"  >&lt;p&gt;Thanks for the fix Andy&lt;/p&gt;</comment>
                    <comment id="29444" author="jafingerhut" created="Fri, 14 Sep 2012 20:24:31 -0500"  >&lt;p&gt;This proposed dissoc-in should be compared with the one in clojure.core.incubator which I just happened across.  I see they look different, but haven&apos;t examined to see if there are any behavior differences.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj&quot;&gt;https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29447" author="bronsa" created="Sat, 15 Sep 2012 06:43:55 -0500"  >&lt;p&gt;dissoc-in in clojure.core.incubator recursively removes empty maps&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (clojure.core.incubator/dissoc-in {:a {:b {:c 1}}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{}&lt;/p&gt;

&lt;p&gt;while the one in this patch doesn&apos;t (as I would expect)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (dissoc-in {:a {:b {:c 1}}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{:a {:b {}}}&lt;/p&gt;</comment>
                    <comment id="29459" author="stu" created="Mon, 17 Sep 2012 07:04:54 -0500"  >&lt;p&gt;Please do this work in the incubator.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11483" name="001-dissoc-in.diff" size="949" author="bronsa" created="Fri, 7 Sep 2012 06:30:47 -0500" />
                    <attachment id="11495" name="clj-1063-add-dissoc-in-patch-v2.txt" size="1650" author="jafingerhut" created="Thu, 13 Sep 2012 14:17:36 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1043] Unordered literals does not preserve left-to-right evaluation of arguments</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1043</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Given: (defn f &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (println x) x)&lt;/p&gt;

&lt;p&gt;#{(f 2) (f 1)}&lt;/p&gt;

&lt;p&gt;Prints:&lt;/p&gt;

&lt;p&gt;1&lt;br/&gt;
2&lt;/p&gt;

&lt;p&gt;But expected would be:&lt;/p&gt;

&lt;p&gt;2&lt;br/&gt;
1&lt;/p&gt;

&lt;p&gt;This issue is related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-288&quot; title=&quot;Compilation of unordered collections &quot;&gt;CLJS-288&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15632">CLJ-1043</key>
            <summary>Unordered literals does not preserve left-to-right evaluation of arguments</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bbloom">Brandon Bloom</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Aug 2012 21:25:31 -0500</created>
                <updated>Sun, 23 Sep 2012 19:38:35 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29525" author="jafingerhut" created="Sun, 23 Sep 2012 18:01:17 -0500"  >&lt;p&gt;I have the same question as David Nolen for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-288&quot; title=&quot;Compilation of unordered collections &quot;&gt;CLJS-288&lt;/a&gt;: Is this a bug, or just behavior you didn&apos;t expect?&lt;/p&gt;

&lt;p&gt;It seems that vectors preserve the order of evaluation, so if you really want to control evaluation order you could use something like (set &lt;span class=&quot;error&quot;&gt;&amp;#91;(f 2) (f 1)&amp;#93;&lt;/span&gt;) or (set (map f &lt;span class=&quot;error&quot;&gt;&amp;#91;2 1&amp;#93;&lt;/span&gt;)).&lt;/p&gt;</comment>
                    <comment id="29526" author="bbloom" created="Sun, 23 Sep 2012 19:38:35 -0500"  >&lt;p&gt;I&apos;d consider the expected default behavior of any syntax or macro to evaluate each sub-form once each, from left to right. Conditional, repeated, or out-of-order evaluation should be documented as deviations from that norm. If you buy that, then this is either a code or a documentation bug. My vote is for code bug.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-703] Improve writeClassFile performance</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-703</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/be0c45b3a4f3d46/36337ac7260d7d0a?lnk=gst&amp;amp;q=writeclassfile#36337ac7260d7d0a&quot;&gt;Discussion&lt;/a&gt; about timing issues when writing class files led to the the current implementation of synchronous writes to disk. This leads to bad performance/system-load when compiling Clojure code.&lt;/p&gt;

&lt;p&gt;This &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/23213b787d3ec60f#&quot;&gt;Discussion&lt;/a&gt; questioned the current implentation.&lt;/p&gt;

&lt;p&gt;Synchronous writes are not necessary and also do not ensure (crash while calling write) valid classfiles.&lt;/p&gt;

&lt;p&gt;These Patches (0001 is just a code cleanup for creating the directory structure) ensures atomic creation of classfiles by using File.renameTo()&lt;/p&gt;




</description>
                <environment></environment>
            <key id="14312">CLJ-703</key>
            <summary>Improve writeClassFile performance</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Jan 2011 12:58:38 -0600</created>
                <updated>Fri, 5 Oct 2012 19:08:06 -0500</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="26140" author="djpowell" created="Mon, 17 Jan 2011 14:16:19 -0600"  >
&lt;p&gt;Removing sync makes clojure build much faster.  I wonder why it was added in the first place?  I guess only Rich knows?  I assume that it is not necessary.&lt;/p&gt;

&lt;p&gt;If we are removing sync though, I wouldn&apos;t bother with the atomic rename stuff.  Doing that sort of thing can cause problems on some platforms, eg with search indexers and virus checkers momentarily locking files after they are created.  &lt;/p&gt;

&lt;p&gt;The patch seems to be assuming that sync is there for some reason, but my initial assumption would be that sync isn&apos;t necessary - perhaps it was working around some issue that no longer exists?&lt;/p&gt;
</comment>
                    <comment id="26142" author="juergenhoetzel" created="Wed, 19 Jan 2011 14:05:21 -0600"  >&lt;p&gt;Although its unlikely: there is a possible race condition &quot;loading a paritally written classfile&quot;?:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L393&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L393&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28600" author="jszakmeister" created="Fri, 25 May 2012 04:22:12 -0500"  >&lt;p&gt;The new improve-writeclassfile-perf version of the patch combines the two previous patches into a single patch file and brings them up-to-date with master.  I can split the two changes back out into separate patch files if desired, but I figured out current tooling is more geared towards a single patch being applied.&lt;/p&gt;</comment>
                    <comment id="28601" author="jszakmeister" created="Fri, 25 May 2012 04:36:10 -0500"  >&lt;p&gt;FWIW, both fixes look sane.  The first one is a nice cleanup.  The second one is a little more interesting in that uses a rename operation to put the final file into place.  It removes the sync call, which does make things faster.  In general, if we&apos;re concerned about on-disk consistency, we should really have a combination of the two: write the full contents to a tmp file, sync it, and atomically rename to the destination file name.&lt;/p&gt;

&lt;p&gt;Neither the current master, nor the current patch will guarantee on-disk consistency across a machine wide crash.  The current master could crash before the sync() occurs, leaving the file in an inconsistent state.  With the patch, the OS may not get the file from file cache to disk before an OS level crash occurs, and leave the file in an inconsistent state as well.  The benefit of the patch version is that the whole file does atomically come into view at once.  It does have a nasty side effect of leaving around a temp file if the compiler crashes just before the rename though.&lt;/p&gt;

&lt;p&gt;Perhaps a little more work to catch an exception and clean up is in order?  In general, I like the patched version better.&lt;/p&gt;</comment>
                    <comment id="29611" author="ivan" created="Fri, 5 Oct 2012 19:07:32 -0500"  >&lt;p&gt;File.renameTo returns false on (most?) errors, but the patch doesn&apos;t check for failure.  Docs say &quot;The return value should always be checked to make sure that the rename operation was successful.&quot;  Failure might be especially likely on Windows, where files are opened by others without FILE_SHARE_DELETE.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10066" name="0001-use-File.mkdirs-instead-of-mkdir-every-single-direct.patch" size="1224" author="juergenhoetzel" created="Tue, 4 Jan 2011 12:58:38 -0600" />
                    <attachment id="10067" name="0002-Ensure-atomic-creation-of-class-files-by-renaming-a-.patch" size="1442" author="juergenhoetzel" created="Tue, 4 Jan 2011 12:58:38 -0600" />
                    <attachment id="11258" name="improve-writeclassfile-perf.patch" size="2684" author="jszakmeister" created="Fri, 25 May 2012 04:22:12 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1087] clojure.data/diff uses set union on key seqs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1087</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;&lt;tt&gt;clojure.data/diff&lt;/tt&gt;, on line 118, defines:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java.util.Map
(diff-similar [a b]
  (diff-associative a b (set/union (keys a) (keys b))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Since &lt;tt&gt;keys&lt;/tt&gt; returns a key seq, this seems like an error. &lt;tt&gt;clojure.set/union&lt;/tt&gt; has strange and inconsistent behavior with regard to non-sets, and in this case the two key seqs are concatenated. Based on a cursory benchmark, it seems that this bug &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; is a slight performance gain when the maps have no common keys, and a significant performance loss when the maps have the same keys. The results are still correct because of the merging reduce in &lt;tt&gt;diff-associative&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The patch is easy (just call set on each key seq).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15753">CLJ-1087</key>
            <summary>clojure.data/diff uses set union on key seqs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                        <label>bug</label>
                        <label>performance</label>
                    </labels>
                <created>Mon, 15 Oct 2012 03:59:52 -0500</created>
                <updated>Mon, 15 Oct 2012 14:52:42 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29650" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500"  >&lt;p&gt;clj-1087-diff-perf-enhance-patch-v1.txt dated Oct 15 2012 implements Tom&apos;s suggested performance enhancement, although not exactly in the way he suggested.  It does calculate the union of the two key sequences.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11562" name="clj-1087-diff-perf-enhance-patch-v1.txt" size="760" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1097] node-seq for clojure.zip</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1097</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Many times it&apos;s easier to get to a zipper node via (first (filter pred ...)) instead of manually walking the tree via next/up/down. Other times it&apos;s easier to process certain nodes via filter &amp;amp; map instead of again, walking the tree. This patch provides a single function called node-seq that uses zip/next to generate a lazy-seq of nodes. Tests provide two examples.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15803">CLJ-1097</key>
            <summary>node-seq for clojure.zip</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="halgari">Timothy Baldridge</reporter>
                        <labels>
                        <label>clojure.zip</label>
                    </labels>
                <created>Mon, 29 Oct 2012 21:37:18 -0500</created>
                <updated>Mon, 29 Oct 2012 21:37:18 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11641" name="node-seq.diff" size="1571" author="halgari" created="Mon, 29 Oct 2012 21:37:18 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-842] clojure.pprint uses the old-style metadata.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-842</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I was looking through the implementation of clojure.pprint.* and found that it still uses the old-style metadata to mark vars as private - ^{:private true} instead of ^:private.&lt;/p&gt;

&lt;p&gt;I have migrated the metadata to the new style in the attached trivial patch, which can be used in case this is deemed to be an issue.&lt;/p&gt;

&lt;p&gt;FWIW, there are some other namespaces which use the old-style metadata as well; I am willing to fix those as well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14646">CLJ-842</key>
            <summary>clojure.pprint uses the old-style metadata.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ghoseb">Baishampayan Ghose</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Sep 2011 02:35:36 -0500</created>
                <updated>Wed, 14 Nov 2012 13:19:38 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29944" author="jafingerhut" created="Wed, 14 Nov 2012 13:19:38 -0600"  >&lt;p&gt;clj-842-update-clojure.pprint-metadata-v2.txt dated Nov 14 2012 is identical to Baishampayan Ghose&apos;s 0001-Migrate-the-metadata-in-clojure.pprint.-to-the-new-s.patch dated Sep 26, 2011, except it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10372" name="0001-Migrate-the-metadata-in-clojure.pprint.-to-the-new-s.patch" size="16175" author="ghoseb" created="Mon, 26 Sep 2011 02:35:36 -0500" />
                    <attachment id="11676" name="clj-842-update-clojure.pprint-metadata-v2.txt" size="16179" author="jafingerhut" created="Wed, 14 Nov 2012 13:19:38 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-849] Add a pseudo-variable containing the current line number</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-849</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Add a pseudo-variable (similar to &amp;#42;file*), containing the current line number. This should be available during AOT compilation. The name &quot;&amp;#42;line-number*&quot; might be good.&lt;/p&gt;

&lt;p&gt;It will be useful for diagnostic log messages. Using exception stack traces has poor runtime performance and the line number should be available to the compiler at minimal cost.&lt;/p&gt;</description>
                <environment>Any</environment>
            <key id="14672">CLJ-849</key>
            <summary>Add a pseudo-variable containing the current line number</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="grkuntzmd">G. Ralph Kuntz, MD</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Oct 2011 07:59:03 -0500</created>
                <updated>Wed, 14 Nov 2012 15:44:21 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="29947" author="cninja" created="Wed, 14 Nov 2012 15:41:34 -0600"  >&lt;p&gt;Adding initial patch. A symbol&apos;s position is now stored in its metadata, just like a seq when it is read with the LispReader. &lt;/p&gt;

&lt;p&gt;The Compiler.LINE and Compiler.COLUMN values are now updated as each symbol is analyzed. This provides more exact line and column numbers for Compiler errors which will resolve ticket &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-420&quot; title=&quot;Some compiler exceptions erroneously using REPL line numbers.&quot;&gt;CLJ-420&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Compiler.LINE variable has been interned as clojure.core/&lt;b&gt;line-number&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Adding extra metadata to symbols resulted in some tests failing due to the extra values. The failing tests have been updated to ignore the new metadata keys.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11678" name="CLJ-849-line-number-pesudo-variable.diff" size="9179" author="cninja" created="Wed, 14 Nov 2012 15:41:34 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-99] GC Issue 95:    max-key and min-key evaluate k multiple times for arguments</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-99</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by H.Duerer, Mar 13, 2009

max-key or min-key will evaluate (k value) multiple times &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; arguments &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;
more than 2 arguments are passed.

This is undesirable &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; k is expensive to calculate.

Something like the code below would avoid these &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; calculations (at the
price of generating more ephemeral garbage)

(defn max-key
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Returns the x &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; which (k x), a number, is greatest.&quot;&lt;/span&gt;
  ([k x] x)
  ([k x y] (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&amp;gt; (k x) (k y)) x y))
  ([k x y &amp;amp; more]
     (second (reduce (fn [x y] (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&amp;gt; (first x) (first y)) x y))
                     (map #(vector (k %) %) (cons x (cons y more)))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13496">CLJ-99</key>
            <summary>GC Issue 95:    max-key and min-key evaluate k multiple times for arguments</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 15:49:00 -0500</created>
                <updated>Thu, 15 Nov 2012 21:36:54 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22760" author="importer" created="Tue, 24 Aug 2010 05:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/99&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/99&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22761" author="importer" created="Tue, 24 Aug 2010 05:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="29955" author="jafingerhut" created="Thu, 15 Nov 2012 21:36:27 -0600"  >&lt;p&gt;clj-99-min-key-max-key-performance-v1.txt dated Nov 15 2012 changes min-key and max-key to evaluate the function k on each of its other arguments at most once.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11682" name="clj-99-min-key-max-key-performance-v1.txt" size="2577" author="jafingerhut" created="Thu, 15 Nov 2012 21:36:27 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1113] `reductions` reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1113</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;It would be nice to have a reducers implementation of the core `reductions` function.&lt;/p&gt;

&lt;p&gt;Initial implementation attempt included.  This version requires an initial reduction value parameter (vs using (f)) and includes that initial value in the final reduction.  I&apos;m not certain either of these decisions is optimal, but results in a function which most closely mimics `clojure.core/reductions`.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15848">CLJ-1113</key>
            <summary>`reductions` reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="llasram">Marshall T. Vandegrift</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Nov 2012 08:22:37 -0600</created>
                <updated>Fri, 23 Nov 2012 08:22:37 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11703" name="reductions-reducer.diff" size="2172" author="llasram" created="Fri, 23 Nov 2012 08:22:37 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1049] Make reducer/folder support reduce-kv</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1049</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently, although rfn makes an effort to support reduce-kv, it is wasted effort since the return values of reducer and folder don&apos;t satisfy IKVReduce.&lt;/p&gt;

&lt;p&gt;I have a working patch for this, it&apos;s quite small. I have printed a CA but not sent it, so I won&apos;t reveal the patch yet...&lt;/p&gt;

&lt;p&gt;This also applies to ClojureScript.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15641">CLJ-1049</key>
            <summary>Make reducer/folder support reduce-kv</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 02:22:23 -0500</created>
                <updated>Sun, 23 Sep 2012 20:34:21 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29445" author="tomoj" created="Sat, 15 Sep 2012 00:47:17 -0500"  >&lt;p&gt;Hmm.. it&apos;s not quite as simple as I thought. My first patch simply had reducer/folder implement IKVReduce with `(clojure.core.protocols/kv-reduce coll (xf f1) init)`, but for map and mapcat, this results in strange behavior (reduce-kv reducefs being called with only 2 args).&lt;/p&gt;

&lt;p&gt;Patch 0001 includes modifications to map and mapcat so that the reduce-kv reducef will always be called with 3 args. The previous implementation of mapcat also had the converse problem: during non-kv reduce, if the mapcat fn returned a map, the reducef would be called with 3 args since maps reduce with reduce-kv.&lt;/p&gt;

&lt;p&gt;The patch gives behavior like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user&amp;gt; (-&amp;gt;&amp;gt; {1 {2 3 4 5} 6 {7 8 9 10}}
        (r/mapcat #(r/map + %2))
        (reduce-kv #(conj %1 [%2 %3]) []))
[[2 5] [4 9] [7 15] [9 19]]
user&amp;gt; (-&amp;gt;&amp;gt; [{2 3 4 5} {7 8 9 10}]
        (r/mapcat identity)
        (r/reduce conj []))
[[2 3] [4 5] [7 8] [9 10]]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="29528" author="tomoj" created="Sun, 23 Sep 2012 20:34:21 -0500"  >&lt;p&gt;Would like to discuss these changes (and auto-kv for maps) on clojure-dev, but my membership is still pending. My CA has been received. Anyone know who to contact to get my membership approved?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11497" name="0001-reduce-kv-transformations.diff" size="2180" author="tomoj" created="Sat, 15 Sep 2012 00:45:14 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1056] defprotocol: invalid method overload syntax getting accepted </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1056</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The compiler accepts both of these erroneous forms which while silly, are not imposible to come up with.&lt;/p&gt;

&lt;p&gt;(defprotocol Foo (f (&lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;) (&lt;span class=&quot;error&quot;&gt;&amp;#91;this arg&amp;#93;&lt;/span&gt;)))&lt;br/&gt;
(defprotocol Bar (m &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;) (m &lt;span class=&quot;error&quot;&gt;&amp;#91;this arg&amp;#93;&lt;/span&gt;))&lt;/p&gt;</description>
                <environment></environment>
            <key id="15665">CLJ-1056</key>
            <summary>defprotocol: invalid method overload syntax getting accepted </summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="vemv">V&#237;ctor M. Valenzuela</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Sep 2012 19:19:17 -0500</created>
                <updated>Thu, 29 Nov 2012 16:03:11 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30099" author="halgari" created="Thu, 29 Nov 2012 16:02:50 -0600"  >&lt;p&gt;Can not reproduce the fist error:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defprotocol Foo (f (&lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;) (&lt;span class=&quot;error&quot;&gt;&amp;#91;this arg&amp;#93;&lt;/span&gt;)))    &lt;br/&gt;
CompilerException java.lang.IllegalArgumentException: Parameter declaration missing, compiling:(NO_SOURCE_PATH:5:1) &lt;/p&gt;

&lt;p&gt;But the 2nd one I can reproduce:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defprotocol Bar (m &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;) (m &lt;span class=&quot;error&quot;&gt;&amp;#91;this arg&amp;#93;&lt;/span&gt;))    &lt;br/&gt;
Bar&lt;br/&gt;
user=&amp;gt; Bar&lt;br/&gt;
{:on-interface user.Bar, :on user.Bar, :sigs {:m {:doc nil, :arglists (&lt;span class=&quot;error&quot;&gt;&amp;#91;this arg&amp;#93;&lt;/span&gt;), :name m}}, :var #&apos;user/Bar, :method-map {:m :m}, :method-builders {#&apos;user/m #&amp;lt;user$eval71$fn_&lt;em&gt;72 user$eval71$fn&lt;/em&gt;_72@1a2b53fb&amp;gt;}}&lt;br/&gt;
user=&amp;gt; &lt;/p&gt;

&lt;p&gt;Notice that :arglists only has one entry&lt;/p&gt;

&lt;p&gt;Vetting&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1090] Indirect function calls through Var instances fail to clear locals</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1090</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you make a function call indirectly by invoking a Var object (which derefs itself and invokes the result), the invocation parameters remain in the thread&apos;s local stack for the duration of the function call, even though they are needed only long enough to be passed into the deref&apos;d function. As a result, passing a lazy seq into a function invoked in its Var form may run out of memory if the seq is forced inside that function. For example:&lt;/p&gt;

&lt;p&gt;(defn total &lt;span class=&quot;error&quot;&gt;&amp;#91;xs&amp;#93;&lt;/span&gt; (reduce + 0 xs))&lt;br/&gt;
(total (range 1000000000))   ; this works, though takes a while&lt;br/&gt;
(#&apos;total (range 1000000000)) ; this dies with out of memory error&lt;/p&gt;

&lt;p&gt;I can provide a patch if it would be useful. The fix should be trivial, something along the lines of wrapping each argN in clojure/lang/Var.java inside a Util.ret1(argN, argN = null) as is done in RestFn.java.&lt;/p&gt;</description>
                <environment>Probably all, but observed on Ubuntu 12.04, OpenJDK 6</environment>
            <key id="15768">CLJ-1090</key>
            <summary>Indirect function calls through Var instances fail to clear locals</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stfactual">Spencer Tipping</reporter>
                        <labels>
                        <label>performance</label>
                    </labels>
                <created>Mon, 22 Oct 2012 18:43:19 -0500</created>
                <updated>Fri, 30 Nov 2012 14:26:45 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29776" author="stfactual" created="Tue, 23 Oct 2012 13:37:16 -0500"  >&lt;p&gt;Sorry, I typo&apos;d the example. (defn total ...) should be (defn sum ...).&lt;/p&gt;</comment>
                    <comment id="30054" author="halgari" created="Tue, 27 Nov 2012 11:45:43 -0600"  >&lt;p&gt;fixed typeo in example&lt;/p&gt;</comment>
                    <comment id="30055" author="halgari" created="Tue, 27 Nov 2012 11:47:35 -0600"  >&lt;p&gt;Couldn&apos;t reproduce the exception, but the 2nd example did chew through about 4x the amount of memory. Vetting. &lt;/p&gt;</comment>
                    <comment id="30095" author="halgari" created="Thu, 29 Nov 2012 14:57:28 -0600"  >&lt;p&gt;adding a patch. Since most of Clojure ends up running this code in one way or another, I&apos;d assert that tests are included as part of the normal Clojure test process. &lt;/p&gt;

&lt;p&gt;Patch simply calls Util.ret1(argx, argx=null) on all invoke calls. &lt;/p&gt;</comment>
                    <comment id="30097" author="halgari" created="Thu, 29 Nov 2012 15:17:52 -0600"  >&lt;p&gt;And as a note, both examples in the original report now have extremely similar memory usages. &lt;/p&gt;</comment>
                    <comment id="30118" author="stfactual" created="Fri, 30 Nov 2012 14:22:14 -0600"  >&lt;p&gt;Sounds great, and the patch looks good too. Let me know if I need to do anything else.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11729" name="var-clear-locals.diff" size="19020" author="halgari" created="Thu, 29 Nov 2012 14:57:28 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1102] Better handling of exceptions with empty stack traces</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1102</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I don&apos;t know what I did to cause some exceptions to be thrown while running Clojure tests that return a length 0 array from (.getStackTrace throwable), but according to the Java docs this is legal.  I searched all places in the Clojure code that call .getStackTrace and found two that don&apos;t handle this correctly, one of which causes an ArrayOutOfBoundsException (that is the one I found during my testing).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15814">CLJ-1102</key>
            <summary>Better handling of exceptions with empty stack traces</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Nov 2012 17:03:47 -0600</created>
                <updated>Fri, 30 Nov 2012 14:57:46 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29900" author="jafingerhut" created="Sun, 4 Nov 2012 17:07:36 -0600"  >&lt;p&gt;clj-1102-improve-empty-stack-trace-handling-v1.txt dated Nov 4 2012 improves the handling of .getStackTrace returning a length 0 array in two places.  I checked all other places .getStackTrace was called and they seem to already handle this case gracefully.&lt;/p&gt;</comment>
                    <comment id="30120" author="halgari" created="Fri, 30 Nov 2012 14:57:37 -0600"  >&lt;p&gt;Vetting.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11662" name="clj-1102-improve-empty-stack-trace-handling-v1.txt" size="1791" author="jafingerhut" created="Sun, 4 Nov 2012 17:07:36 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1103] Make conj assoc dissoc and transient versions handle args similarly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1103</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;A discussion came up in the Clojure Google group about conj giving an error when taking only a coll as an argument, as opposed to disj which works for this case:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z9mFxsTYTqQ&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z9mFxsTYTqQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I looked through the rest of the code for similar cases, and found that conj! assoc assoc! and disj! also had the same property, and there were some other differences between them in how different numbers of arguments were handled, such as:&lt;/p&gt;

&lt;p&gt;conj handles an arbitrary number of arguments, but conj! does not.&lt;br/&gt;
assoc checks for a final key with no value specified (&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1052&quot; title=&quot;assoc should throw exception if missing val for last key&quot;&gt;&lt;del&gt;CLJ-1052&lt;/del&gt;&lt;/a&gt;), but assoc! did not.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15815">CLJ-1103</key>
            <summary>Make conj assoc dissoc and transient versions handle args similarly</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Nov 2012 18:00:32 -0600</created>
                <updated>Sun, 9 Dec 2012 17:30:00 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29901" author="jafingerhut" created="Sun, 4 Nov 2012 18:04:54 -0600"  >&lt;p&gt;clj-1103-make-conj-assoc-dissoc-handle-args-similarly-v1.txt dated Nov 4 2012 makes conj conj! assoc assoc! dissoc dissoc! handle args similarly to each other.&lt;/p&gt;</comment>
                    <comment id="30197" author="bbloom" created="Sun, 9 Dec 2012 17:30:00 -0600"  >&lt;p&gt;I too ran into this and started an additional discussion here: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/wL5hllfhw4M/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/wL5hllfhw4M/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In particular, I don&apos;t buy the argument that (into coll xs) is sufficient, since into implies conj and there isn&apos;t an terse and idiomatic way to write (into map (parition 2 keyvals))&lt;/p&gt;

&lt;p&gt;So +1 from me&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11663" name="clj-1103-make-conj-assoc-dissoc-handle-args-similarly-v1.txt" size="8667" author="jafingerhut" created="Sun, 4 Nov 2012 18:04:54 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1124] for-as</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1124</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;A common pattern in programming is building up some data structure step by step:&lt;/p&gt;

&lt;p&gt;In Python:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
x = {0: 1}&lt;br/&gt;
for item in stuff:&lt;br/&gt;
    x&lt;span class=&quot;error&quot;&gt;&amp;#91;item&amp;#93;&lt;/span&gt; = item * x.get(item - 1, 0)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;br/&gt;
etc.&lt;/p&gt;

&lt;p&gt;In an imperative for loop this is easy since we have easy access to the &quot;current&quot; data structure being built up.&lt;/p&gt;

&lt;p&gt;I propose the addition of a function for-as similar to as-&amp;gt; except the value of the last loop iteration is bound to the name.&lt;/p&gt;

&lt;p&gt;So we can write the above as:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
(last (for-as &lt;span class=&quot;error&quot;&gt;&amp;#91;x {0 1}&amp;#93;&lt;/span&gt;&lt;br/&gt;
        &lt;span class=&quot;error&quot;&gt;&amp;#91;item stuff&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (assoc x item (* item (get x (- item 1) 0)))))&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;An (un-optimized) implementation might be something like:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
(defmacro reduce-for [&lt;span class=&quot;error&quot;&gt;&amp;#91;res init&amp;#93;&lt;/span&gt; for-seq-exprs body-expr]&lt;br/&gt;
  `(reduce #(%2 %1) ~init&lt;br/&gt;
    (for ~for-seq-exprs&lt;br/&gt;
      (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;~res&amp;#93;&lt;/span&gt;&lt;br/&gt;
        ~body-expr))))&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Note: reduce-for does not return a seq, instead it returns the result of the last loop body iteration.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15880">CLJ-1124</key>
            <summary>for-as</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="yongqli">Yongqian Li</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Dec 2012 23:27:10 -0600</created>
                <updated>Mon, 10 Dec 2012 23:33:43 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30208" author="yongqli" created="Mon, 10 Dec 2012 23:31:11 -0600"  >&lt;p&gt;(Fixed formatting)&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;x = {0: 1}
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; item in stuff:
    x[item] = item * x.get(item - 1, 0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(last (&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-as [x {0 1}]
        [item stuff]
  (assoc x item (* item (get x (- item 1) 0)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defmacro reduce-&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; [[res init] &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-seq-exprs body-expr]
  `(reduce #(%2 %1) ~init
    (&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ~&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-seq-exprs
      (fn [~res]
        ~body-expr))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(Someone please fix the formatting in above and delete this comment.)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1128] Improve merge-with</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1128</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Set a first map as an initial value for reduce to&lt;br/&gt;
avoid merge-entry (series of contains? calls and etc) call on the first map.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15888">CLJ-1128</key>
            <summary>Improve merge-with</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="edtsech">Edward Tsech</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Dec 2012 13:29:35 -0600</created>
                <updated>Thu, 13 Dec 2012 17:41:39 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30225" author="edtsech" created="Thu, 13 Dec 2012 13:36:23 -0600"  >&lt;p&gt;Tests pass.&lt;/p&gt;</comment>
                    <comment id="30226" author="jafingerhut" created="Thu, 13 Dec 2012 14:32:13 -0600"  >&lt;p&gt;Edward, your patch replaces the expression (or m1 {}) with m1.  It was changed from m1 to (or m1 {}) in a commit on Oct 16, 2008 with descriptive text &quot;improved nil handling in merge, merge-with&quot;, so I am pretty sure it would be best to leave it as (or m1 {}).  I believe the intent is to allow all but one of the map arguments to merge-with be nil, and everything will still work.&lt;/p&gt;

&lt;p&gt;The rest of the patch for avoiding one merge call seems sound to me.&lt;/p&gt;

&lt;p&gt;Your change would be even better at preserving any metadata on the first non-nil map in the list, if instead of calling with the first map, it called it with the first non-nil item of the list, and then the rest of the list after that.&lt;/p&gt;</comment>
                    <comment id="30228" author="edtsech" created="Thu, 13 Dec 2012 17:41:39 -0600"  >&lt;p&gt;I figured out that `reduce1` did pass a head of the list for me. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; (&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L887&quot;&gt;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L887&lt;/a&gt;)&lt;br/&gt;
But case with first nil argument is still valid. Correct me, please, if i&apos;m wrong.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure about `(or m1 {})`. I don&apos;t see any problems which can happen. Probably behaviour of functions which are used internally was changed since 2008.&lt;/p&gt;

&lt;p&gt;(contains? nil :a) ;=&amp;gt; false&lt;br/&gt;
(assoc nil :a 1) ;=&amp;gt; {:a 1}&lt;br/&gt;
(get nil :a) ;=&amp;gt; nil&lt;/p&gt;

&lt;p&gt;I could write some tests for that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11761" name="0001-Improve-merge-with.patch" size="851" author="edtsech" created="Thu, 13 Dec 2012 13:29:35 -0600" />
                    <attachment id="11762" name="0002-Improve-merge-with.patch" size="1077" author="edtsech" created="Thu, 13 Dec 2012 17:41:39 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1119] inconsistent behavior of lazy-seq w/ macro &amp; closure on excptions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1119</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;lazy-seq seems to evaluate inconsistently when body includes a macro and throws and exception. 1st evalutation throws the exceptions, subsequent ones return empty sequence.&lt;/p&gt;

&lt;p&gt;demo code:&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (let [coll &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;]&lt;br/&gt;
    (lazy-seq&lt;br/&gt;
      (when-let &lt;span class=&quot;error&quot;&gt;&amp;#91;s (seq coll)&amp;#93;&lt;/span&gt;&lt;br/&gt;
        (throw (Exception.))))))&lt;/p&gt;

&lt;p&gt;(def lazy (gen-lazy))&lt;/p&gt;

&lt;p&gt;(try&lt;br/&gt;
  (println &quot;lazy:&quot; lazy)&lt;br/&gt;
  (catch Exception ex&lt;br/&gt;
    (println ex)))&lt;/p&gt;

&lt;p&gt;(try&lt;br/&gt;
  (println &quot;lazy, again:&quot; lazy)&lt;br/&gt;
  (catch Exception ex&lt;br/&gt;
    (println ex)))&lt;/p&gt;

&lt;p&gt;It should throw an exception both times but only does on 1st. Generally speaking an expression shouldn&apos;t evaluate to different things depending on whether it&apos;s been evaluated before.&lt;/p&gt;

&lt;p&gt;When removing the closure ...&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (lazy-seq&lt;br/&gt;
    (when-let [s (seq &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;)]&lt;br/&gt;
      (throw (Exception.)))))&lt;/p&gt;

&lt;p&gt;... or removing the when-let macro ...&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (let [coll &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;]&lt;br/&gt;
    (lazy-seq&lt;br/&gt;
      (seq coll)&lt;br/&gt;
      (throw (Exception.)))))&lt;/p&gt;

&lt;p&gt;It works i.e. consistently throws the exception, so seems to be some interaction between the closure and the macro at work here. This particular combination is used in the &apos;map&apos; function.&lt;/p&gt;

&lt;p&gt;See also: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z3EiBUQ7Inc&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z3EiBUQ7Inc&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15869">CLJ-1119</key>
            <summary>inconsistent behavior of lazy-seq w/ macro &amp; closure on excptions</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hank">Hank</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Dec 2012 03:00:15 -0600</created>
                <updated>Sun, 16 Dec 2012 04:06:49 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30147" author="hank" created="Mon, 3 Dec 2012 04:26:02 -0600"  >&lt;p&gt;N.B. The primary use case I have for this, in case it matters, is interrupting the evaluation of a &apos;map&apos; expression in which the mapped fn is slow to evaluate (throwing an InterruptedException), because I am not interested in its result any more. Then later I re-evaluate it because I am interested in the result after all, however with above bug the lazy sequence terminates instead of recommencing where it left off.&lt;/p&gt;

&lt;p&gt;(UPDATE: This use case is similar to the kind of ersatz continuations that Jetty does (RetryRequest runtime exception) or even Clojure itself when barging STM transactions with the RetryEx exception.)&lt;/p&gt;</comment>
                    <comment id="30149" author="hank" created="Mon, 3 Dec 2012 08:45:27 -0600"  >&lt;p&gt;Related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-457&quot; title=&quot;lazy recursive definition giving incorrect results&quot;&gt;CLJ-457&lt;/a&gt; according to Christophe. His patch fixes this,too.&lt;/p&gt;</comment>
                    <comment id="30172" author="hank" created="Tue, 4 Dec 2012 05:02:32 -0600"  >&lt;p&gt;Sorry Christophe&apos;s patch doesn&apos;t work for me here. It avoids evaluating the LazySeq a second time by prematurely throwing an exception. However a LazySeq might evaluate properly the second time around b/c the situation causing the exception was transient. As per comment above an evaluation might get interrupted, throwing InterruptedException the first time around but not the second time.&lt;/p&gt;

&lt;p&gt;Also the observation with the closure and macro need explanation IMHO.&lt;/p&gt;</comment>
                    <comment id="30189" author="hank" created="Sat, 8 Dec 2012 03:51:04 -0600"  >&lt;p&gt;further insight: &apos;delay&apos; exhibits the same behavior and is a more simple case to examine. the macro suspicion is a red herring: as demoed below it is actually the closed over variable magically turns to nil, the when-let macro simply turned that into a nil for the whole expression.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def delayed
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (delay
      (print &lt;span class=&quot;code-quote&quot;&gt;&quot;a=&quot;&lt;/span&gt; a)
      (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.)))))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 1:&quot;&lt;/span&gt;)
  (force delayed)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 2:&quot;&lt;/span&gt;)
  (force delayed)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;prints:&lt;/p&gt;

&lt;p&gt;delayed 1:a= true#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
delayed 2:a= nil#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;/p&gt;</comment>
                    <comment id="30193" author="hank" created="Sun, 9 Dec 2012 01:31:54 -0600"  >&lt;p&gt;The above leads to dodgy outcomes such as: The following expression leads to an Exception on 1st evaluation and to &quot;w00t!&quot; on subsequent ones.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def delayed
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (delay
      (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; a
        (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.))
        &lt;span class=&quot;code-quote&quot;&gt;&quot;w00t!&quot;&lt;/span&gt;))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Try it like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 1:&quot;&lt;/span&gt; )
  (println (force delayed))
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 2:&quot;&lt;/span&gt;)
  (println (force delayed))
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;br/&gt;
delayed 1:#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
delayed 2:w00t!&lt;/p&gt;

&lt;p&gt;This code shows that the problem is tied to the :once flag as suspected.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def test-once
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (^{:once &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;} fn* foo []
	    (println &lt;span class=&quot;code-quote&quot;&gt;&quot;a=&quot;&lt;/span&gt; a)
	    (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Invoking the fn twice will show &apos;a&apos; turning from &apos;true&apos; to &apos;nil&apos;, try it like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;test-once 1:&quot;&lt;/span&gt;)
  (test-once)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;test-once 2:&quot;&lt;/span&gt;)
  (test-once)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;br/&gt;
test-once 1:a= true&lt;br/&gt;
#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
test-once 2:a= nil&lt;br/&gt;
#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;/p&gt;

&lt;p&gt;That doesn&apos;t happen when the ^{:once true} is removed. Now one could argue that above fn is invoked twice, which is exactly what one is not supposed to do when decorated with the :once flag, but I argue that an unsuccessful call doesn&apos;t count as invocation towards the :once flag. The delay and lazy-seq macros agree with me there as the resulting objects are not considered realized (as per realized? function) if the evaluation of the body throws an exception, and realization/evaluation of the body is therefore repeated on re-evaluation of the delay/lazy-seq.&lt;/p&gt;

&lt;p&gt;Try this using &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(realized? delayed)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; after the first evaluation in the code above. In the implementation this can be seen e.g. &lt;a href=&quot;https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/jvm/clojure/lang/Delay.java#L33&quot;&gt;here for clojure.lang.Delay&lt;/a&gt; (similarly for LazySeq), the body-fn is set to null (meaning realized) after the invocation returns &lt;b&gt;successfully&lt;/b&gt; only.&lt;/p&gt;

&lt;p&gt;The :once flag affects &lt;a href=&quot;https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/jvm/clojure/lang/Compiler.java#L4701&quot;&gt;this part of the compiler only&lt;/a&gt;. Some field is set to nil there in the course of a function invocation, for the good reason of letting the garbage compiler collect objects, however this should to be done after the function successfully completes only. Can this be changed?&lt;/p&gt;</comment>
                    <comment id="30240" author="hank" created="Sun, 16 Dec 2012 04:02:08 -0600"  >&lt;p&gt;A workaround for the case of the &apos;map&apos; function as described in the 1st comment, works as this: The original map function, if you take out the cases for several colls, the performance enhancements for chunked seqs and forcing the coll argument to a seq, looks like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn map [f s]
  (lazy-seq
    (cons (f (first s)) (map f (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; s)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In my workaround I evaluate f &lt;b&gt;twice&lt;/b&gt;:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn map [f s]
  (lazy-seq
    (f (first s))
    (cons (f (first s)) (map f (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; s)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because the downstream functions that are slow to evaluate are all of the deref kind that cache their result (more lazy-seqs, delays, futures, promises), the InterruptedException can only happen during the 1st evaluation, while the tail call optimization that sets closed-over variables to nil (it pays to read this here: &lt;a href=&quot;http://clojure.org/lazy&quot;&gt;http://clojure.org/lazy&lt;/a&gt;) only happens on the second call. The first still creates an fn that captures the head of the sequence &apos;s&apos;, however this is not being held onto as it is not returned.&lt;/p&gt;

&lt;p&gt;I use this special version of map (and other, similarly rewritten functions based on lazy-seq such as iterate) when I want interruptible, restartable seq evaluations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1132] For record type Rec,  (instance? Rec (map-&gt;Rec {...})) need not return true, though (instance? Rec (Rec. ...)) does.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1132</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;    (defrecord Rec ...)&lt;/p&gt;

&lt;p&gt;    (instance? Rec (Rec. ...))        ;=&amp;gt; true&lt;br/&gt;
    (instance? Rec (map-&amp;gt;Rec {...}))  ;=&amp;gt; can be false  &lt;br/&gt;
&lt;br/&gt;
This occurs when the code is wrapped in a tomcat servlet by `lein ring&lt;br/&gt;
uberwar`, but &lt;b&gt;not&lt;/b&gt; when run at the REPL or under Jetty, say.&lt;br/&gt;
&lt;br/&gt;
Although produced under ring, this seems to me to be a general problem&lt;br/&gt;
with the map-&amp;gt; constructor, as (true? (instance? Rec (map-&amp;gt;Rec {...})))&lt;br/&gt;
should be an invariant, regardless of the environment or context.&lt;br/&gt;
The problem seems to arise in some aspect of the class loading process:&lt;/p&gt;

&lt;p&gt;    (.getClassLoader Rec)                    ;=&amp;gt; WebappClassLoader (delegate: false, repositories: /WEB-INF/classes/, parent: org.apache.catalina.loader.StandardClassLoader@790bc49d)&lt;br/&gt;
    (.getClassLoader (class (Rec. ...)))     ;=&amp;gt; WebappClassLoader (same as the previous line)&lt;br/&gt;
    (.getClassLoader (class (map-&amp;gt;Rec ...))) ;=&amp;gt; clojure.lang.DynamicClassLoader@2e7227a8&lt;/p&gt;

&lt;p&gt;The map-&amp;gt;Rec delegates to the create method, which seems to be where the problem lies.&lt;/p&gt;

&lt;p&gt;The record namespace is AOT compiled, properly I think/hope, and the requisite classes &lt;br/&gt;
imported as they should be.&lt;/p&gt;

&lt;p&gt;I have attached a minimal web app that reproduces the problem and shows&lt;br/&gt;
the configuration. As a sanity check, I have also created a trivial &lt;br/&gt;
workaround defrecord* that creates a clojure-native map constructor, &lt;br/&gt;
for which the problem does not occur. See the README.md in the tar &lt;br/&gt;
file for usage details, and the project.clj for my configuration.&lt;/p&gt;

&lt;p&gt;Again, I&apos;ve only been able to reproduce the problem under Tomcat,&lt;br/&gt;
not under Jetty or at the REPL.&lt;/p&gt;</description>
                <environment>Apache Tomcat/6.0.24 JVM/1.6.0_26-b03  Linux 2.6.32-279.el6.x86_64&lt;br/&gt;
&lt;br/&gt;
Clojure 1.4.0,  Ring 1.1.6, Compojure 1.1.3, Lein-Ring Plugin 0.7.5 (for lein ring uberwar)&lt;br/&gt;
</environment>
            <key id="15902">CLJ-1132</key>
            <summary>For record type Rec,  (instance? Rec (map-&gt;Rec {...})) need not return true, though (instance? Rec (Rec. ...)) does.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cg-at">Christopher Genovese</reporter>
                        <labels>
                        <label>constructor</label>
                        <label>defrecord</label>
                    </labels>
                <created>Tue, 18 Dec 2012 10:58:29 -0600</created>
                <updated>Tue, 18 Dec 2012 10:58:29 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11766" name="recordbug.tgz" size="5373405" author="cg-at" created="Tue, 18 Dec 2012 10:58:29 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1133] Certain actions on mutable fields in deftype lead to very strange error messages</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1133</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Consider the following code:&lt;/p&gt;

&lt;p&gt;(definterface Test&lt;br/&gt;
  (^void fail []))&lt;/p&gt;

&lt;p&gt;(deftype TestImpl&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:unsynchronized-mutable true :tag int} x&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Test&lt;br/&gt;
  (fail &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (set! x (dec x))))&lt;/p&gt;

&lt;p&gt;Its compilation fails with the following message:&lt;br/&gt;
CompilerException java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack, compiling&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.../test.clj:27) &lt;/p&gt;

&lt;p&gt;The following code works:&lt;/p&gt;

&lt;p&gt;(definterface Test&lt;br/&gt;
  (^void fail []))&lt;/p&gt;

&lt;p&gt;(deftype TestImpl&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:unsynchronized-mutable true :tag int} x&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Test&lt;br/&gt;
  (fail &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (set! x (int (dec x)))))&lt;/p&gt;

&lt;p&gt;The only change here is that I have wrapped (dec x) form into (int) call.&lt;/p&gt;

&lt;p&gt;I understand that in fact the former code should not work anyway (or at least should not work as I have expected) because (dec) is defined as a call to clojure.lang.Numbers.dec(), which is overloaded for double, long and Object only (in fact, changing :tag int to :tag long in the first example allows the program to compile).  However, the error message is completely uninformative and misleading; it also looks like that it is a consequence of compiler error. It is also not a problem of this concrete example; I found this error in more complex interface method implementation where (set!) call was right in the middle of its body.&lt;/p&gt;

&lt;p&gt;I&apos;m using Clojure 1.4.0 and have experienced this problem on Archlinux x86_64 and Windows 7 x86_64.&lt;/p&gt;

&lt;p&gt;Full stack trace of the error, in case it would be helpful:&lt;/p&gt;

&lt;p&gt;java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack, compiling&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.../test.clj:27)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)&lt;br/&gt;
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.access$100(Compiler.java:37)&lt;br/&gt;
	at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:518)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5919)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)&lt;br/&gt;
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6508)&lt;br/&gt;
	at clojure.lang.Compiler.load(Compiler.java:6952)&lt;br/&gt;
	at clojure.lang.Compiler.loadFile(Compiler.java:6912)&lt;br/&gt;
	at clojure.lang.RT$3.invoke(RT.java:307)&lt;br/&gt;
	at test$eval3224.invoke(NO_SOURCE_FILE:43)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6511)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6477)&lt;br/&gt;
	at clojure.core$eval.invoke(core.clj:2797)&lt;br/&gt;
	at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)&lt;br/&gt;
	at clojure.main$repl$fn__6410.invoke(main.clj:266)&lt;br/&gt;
	at clojure.main$repl.doInvoke(main.clj:266)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
	at clojure.main$repl_opt.invoke(main.clj:332)&lt;br/&gt;
	at clojure.main$main.doInvoke(main.clj:428)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:397)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:411)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:159)&lt;br/&gt;
	at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
	at clojure.main.main(main.java:37)&lt;br/&gt;
Caused by: java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack&lt;br/&gt;
	at java.lang.Class.forName0(Native Method)&lt;br/&gt;
	at java.lang.Class.forName(Class.java:264)&lt;br/&gt;
	at clojure.lang.RT.classForName(RT.java:2039)&lt;br/&gt;
	at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:957)&lt;br/&gt;
	at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:736)&lt;br/&gt;
	at clojure.lang.Compiler$NewExpr$Parser.parse(Compiler.java:2473)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	... 45 more&lt;/p&gt;</description>
                <environment>Archlinux x86_64, Windows 7 x86_64</environment>
            <key id="15905">CLJ-1133</key>
            <summary>Certain actions on mutable fields in deftype lead to very strange error messages</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="dpx-infinity">Vladimir Matveev</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Dec 2012 13:48:31 -0600</created>
                <updated>Wed, 19 Dec 2012 01:20:28 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30255" author="dpx-infinity" created="Tue, 18 Dec 2012 13:51:17 -0600"  >&lt;p&gt;Shouldn&apos;t have set major priority; but I cannot edit issue again &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="30263" author="jafingerhut" created="Wed, 19 Dec 2012 01:20:28 -0600"  >&lt;p&gt;Reduced priority to minor, since ticket creator could not do so themselves.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-835] defmulti doc string doesn&apos;t mention needing to be passed a var for the value of :hierarchy</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-835</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The :hierarchy option for defmulti should be passed a var, but this is not mentioned in the doc string.&lt;/p&gt;

&lt;p&gt;The error message from passing the hierarchy directly is rather cryptic:&lt;/p&gt;

&lt;p&gt;Evaluation aborted on java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.IRef (SOURCE_FORM_44:19).&lt;/p&gt;</description>
                <environment>1.2, 1.3 beta3</environment>
            <key id="14599">CLJ-835</key>
            <summary>defmulti doc string doesn&apos;t mention needing to be passed a var for the value of :hierarchy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Sep 2011 15:09:00 -0500</created>
                <updated>Wed, 19 Dec 2012 07:59:17 -0600</updated>
                                    <version>Release 1.2</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26815" author="mbrandmeyer" created="Wed, 14 Sep 2011 15:11:10 -0500"  >&lt;p&gt;Modified doctoring to clarify the usage of &lt;tt&gt;:hierarchy&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="28429" author="scottlowe" created="Thu, 10 May 2012 17:16:19 -0500"  >&lt;p&gt;New patch: &apos;0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-835&quot; title=&quot;defmulti doc string doesn&amp;#39;t mention needing to be passed a var for the value of :hierarchy&quot;&gt;CLJ-835&lt;/a&gt;-Refine-doc-string-for-defmulti-hierarchy-opt.patch&apos; 10/May/12.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a new doc string patch in response to Andy Fingerhut&apos;s request posted here: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/i7H82fJYL-U&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/i7H82fJYL-U&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Andy&apos;s request stated &quot;Attached patch seems to have spelling mistakes, and perhaps could be worded more clearly.&quot;&lt;/p&gt;

&lt;p&gt;I hope my new patch is an improvement upon what was there.&lt;/p&gt;

&lt;p&gt;This patch supersedes &apos;0001-Clarify-docstring-for-defmulti.patch&apos; from 14/Sep/11.&lt;/p&gt;</comment>
                    <comment id="29195" author="fogus" created="Thu, 16 Aug 2012 14:49:50 -0500"  >&lt;p&gt;This is a million times better than what was there before, but (who knew!?) it could be better. A couple points of contention:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The order under the &lt;tt&gt;:hierarchy&lt;/tt&gt; section seems off. I would start with an overview of what a hierarchy is including a definition of the global hierarchy map (it&apos;s mentioned, but glossed over). I&apos;d then move on to an example impl. Finally, I&apos;d then add the discussion starting &quot;Multimethods expect...&quot; immediately followed by an example.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;In the &lt;tt&gt;isa?&lt;/tt&gt; example it would be great to show the return value.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;You mention that the hierarchy should be supplied as a reference, which is correct, however you talk about #&apos;.  The link between e.g. var and #&apos; could be a bit more explicit. Maybe the sentence about #&apos; could be parenthetical?&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;It&apos;s ok to finish with a very small example of its use in &lt;tt&gt;defmethod&lt;/tt&gt;, in fact a simple example specifying methods for &lt;tt&gt;::shape&lt;/tt&gt; and &lt;tt&gt;::circle&lt;/tt&gt; would clarify the intent nicely.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="30265" author="richhickey" created="Wed, 19 Dec 2012 07:58:57 -0600"  >&lt;p&gt;Please leave examples out of docs strings. Use precise language.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10361" name="0001-Clarify-docstring-for-defmulti.patch" size="1058" author="mbrandmeyer" created="Wed, 14 Sep 2011 15:11:10 -0500" />
                    <attachment id="11188" name="0001-CLJ-835-Refine-doc-string-for-defmulti-hierarchy-opt.patch" size="1885" author="scottlowe" created="Thu, 10 May 2012 17:16:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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>

<item>
            <title>[CLJ-1137] Metadata on a def gets evaluated twice</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1137</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Metadata on the symbol of a def special form is evaluated twice.&lt;/p&gt;

&lt;p&gt;(def ^{:foo (println &quot;HA&quot;)} a [])&lt;/p&gt;

&lt;p&gt;prints out HA HA.  Offending line is in Compiler$DefExpr, fixed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15915">CLJ-1137</key>
            <summary>Metadata on a def gets evaluated twice</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gshayban">Ghadi Shayban</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Dec 2012 11:32:28 -0600</created>
                <updated>Fri, 21 Dec 2012 11:32:28 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11772" name="CLJ-1137-eval-metadata-once.diff" size="889" author="gshayban" created="Fri, 21 Dec 2012 11:32:28 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1104] Concurrent with-redefs do not unwind properly, leaving a var permanently changed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1104</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;On 1.4 and latest master:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defn ten [] 10)&lt;br/&gt;
#&apos;user/ten&lt;br/&gt;
user&amp;gt; (doall (pmap #(with-redefs [ten (fn [] %)] (ten)) (range 20 100)))&lt;br/&gt;
(20 21 22 23 24 25 34 27 28 29 30 31 32 33 34 35 36 37 38 39 39 35 42 43 44 45 48 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 79 87 88 89 90 91 92 93 94 95 97 92 98 99)&lt;br/&gt;
user&amp;gt; (ten)&lt;br/&gt;
79&lt;/p&gt;

&lt;p&gt;Not sure if this is a bug per se, but the doc doesn&apos;t mention lack of concurrency safety and my expectation was that the original value would always be restored after any (arbitrarily interleaved) sequence of with-redefs calls. &lt;/p&gt;</description>
                <environment>Mac OS, Java 6</environment>
            <key id="15816">CLJ-1104</key>
            <summary>Concurrent with-redefs do not unwind properly, leaving a var permanently changed</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2012 17:46:19 -0600</created>
                <updated>Fri, 21 Dec 2012 23:05:10 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29907" author="timmc" created="Wed, 7 Nov 2012 20:50:49 -0600"  >&lt;p&gt;The with-redefs doc (v1.4.0) says &quot;These temporary changes will be visible in all threads.&quot; That sounds non-thread-safe to me.&lt;/p&gt;

&lt;p&gt;In general, changes to var root bindings are not thread safe.&lt;/p&gt;</comment>
                    <comment id="29908" author="bendlas" created="Thu, 8 Nov 2012 09:17:31 -0600"  >&lt;p&gt;As I understand it, with-redefs is mainly used in test suites to mock out vars. It was introduced when vars became static by default and a lot of testsuites had been using binding for mocking. Maybe the docstring should be amended with something along the lines of: When using this you have to ensure that only a single thread is interacting with redef&apos;d vars.&lt;/p&gt;</comment>
                    <comment id="30030" author="stu" created="Sun, 25 Nov 2012 18:41:17 -0600"  >&lt;p&gt;Behavior find as is, doc string change would be fine.&lt;/p&gt;</comment>
                    <comment id="30032" author="jafingerhut" created="Sun, 25 Nov 2012 18:57:16 -0600"  >&lt;p&gt;Patch clj-1104-doc-unsafety-of-concurrent-with-redefs-v1.txt dated Nov 25 2012 updates doc string of with-redefs to make it clear that concurrent use is unsafe.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11708" name="clj-1104-doc-unsafety-of-concurrent-with-redefs-v1.txt" size="1091" author="jafingerhut" created="Sun, 25 Nov 2012 18:57:16 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1134] star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1134</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The star-directive in &lt;tt&gt;clojure.pprint/cl-format&lt;/tt&gt; with an at-prefix (&lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt;) does not obey its specifications according to &lt;a href=&quot;http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node200.html#SECTION002633000000000000000&quot;&gt;Common Lisp the Language, 2nd Edition&lt;/a&gt;. There are two bugs within &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; as of right now:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; is supposed to jump forward over more than one argument, it jumps one step backward as if it had seen &lt;tt&gt;&amp;#126;:&amp;#42;&lt;/tt&gt;. For instance, &lt;tt&gt;(cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)&lt;/tt&gt; will return &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and not &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; as expected.&lt;/li&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt; is seen, the formatter is supposed to jump to the first argument (as &lt;tt&gt;n&lt;/tt&gt; defaults to &lt;tt&gt;0&lt;/tt&gt;, see specification linked above). However, whenever a &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt;-directive is seen, the formatter jumps to the second argument instead.&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;What%28smallsetof%29stepswillreproducetheproblem%3F&quot;&gt;&lt;/a&gt;What (small set of) steps will reproduce the problem?&lt;/h4&gt;

&lt;p&gt;Inside a clean Clojure repl, perform these steps:&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;user=&amp;gt; (require &apos;[clojure.pprint :refer [cl-format]])
nil
user=&amp;gt; (cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)
&quot;0 0&quot;                                           ;; Expected: &quot;0 3&quot;
user=&amp;gt; (cl-format nil &quot;~D~D~D~D ~@*~D&quot; 0 1 2 3)
&quot;0123 1&quot;                                        ;; Expected: &quot;0123 0&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;Whatistheexpectedoutput%3FWhatdoyouseeinstead%3F&quot;&gt;&lt;/a&gt;What is the expected output? What do you see instead?&lt;/h4&gt;

&lt;p&gt;The expected output is &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 0&quot;&lt;/tt&gt;, but is &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 1&quot;&lt;/tt&gt; as shown above.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Whatversionareyouusing%3F&quot;&gt;&lt;/a&gt;What version are you using?&lt;/h4&gt;

&lt;p&gt;Tested on both &lt;tt&gt;1.4.0&lt;/tt&gt; and &lt;tt&gt;1.5.0-beta2&lt;/tt&gt;, both have the defect described.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Pleaseprovideanyadditionalinformationbelow.&quot;&gt;&lt;/a&gt;Please provide any additional information below.&lt;/h4&gt;

&lt;p&gt;The format strings which reproduces the problem has been compared with the &lt;tt&gt;format&lt;/tt&gt; function from the Common Lisp implementations SBCL, CLisp and Clozure. All of them print the expected output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15907">CLJ-1134</key>
            <summary>star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hypirion">Jean Niklas L&apos;orange</reporter>
                        <labels>
                        <label>bug</label>
                        <label>pprint</label>
                    </labels>
                <created>Tue, 18 Dec 2012 20:34:25 -0600</created>
                <updated>Wed, 26 Dec 2012 19:57:30 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30261" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600"  >&lt;p&gt;Patch attached.&lt;/p&gt;

&lt;p&gt;It may be easier to read the changes the patch does from within JIRA instead from the commit message, so I&apos;ve added it here:&lt;/p&gt;

&lt;p&gt;This solves two issues as specified by #&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1134&quot; title=&quot;star-directive in clojure.pprint/cl-format with an at-prefix (&amp;quot;~n@*&amp;quot;) do not obey its specifications&quot;&gt;CLJ-1134&lt;/a&gt;. Issue #1 is solved by doing a&lt;br/&gt;
relative jump forward within &lt;tt&gt;absolute-reposition&lt;/tt&gt; in &lt;tt&gt;cl_format.clj&lt;/tt&gt;, line 114 by&lt;br/&gt;
switching &lt;tt&gt;(- (:pos navigator) position)&lt;/tt&gt; with &lt;tt&gt;(- position (:pos navigator))&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Issue #2 is handled by changing the default &lt;tt&gt;n&lt;/tt&gt;-parameter to &lt;tt&gt;*&lt;/tt&gt; depending on&lt;br/&gt;
whether the &lt;tt&gt;@&lt;/tt&gt;-prefix is placed or not. If it is placed, then &lt;tt&gt;n&lt;/tt&gt; defaults to&lt;br/&gt;
0, otherwise it defaults to 1.&lt;/p&gt;

&lt;p&gt;In addition, new tests have been appended to &lt;tt&gt;test_cl_format.clj&lt;/tt&gt; to ensure the&lt;br/&gt;
correctness of this patch. The tests have been tested on the Common Lisp&lt;br/&gt;
implementation GNU CLISP 2.49, which presumably handle the &lt;tt&gt;~n@*&lt;/tt&gt;&lt;br/&gt;
correctly. This patch and GNU CLISP returns the same output for each format&lt;br/&gt;
call, sans case for printed symbols; Common Lisp has case-insensitive symbols,&lt;br/&gt;
whereas Clojure has not.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11767" name="clj-1134-star-directive-in-cl-format.txt" size="4067" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1010] A left-to-right-variant of `comp`</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1010</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The function composition function `comp` is quite inefficient in cases like `(apply comp large-seq-of-fns)`, because its arity-greater-than-3 version reverses the seq.&lt;/p&gt;

&lt;p&gt;I would be great if there was an alternative `comp*` (or whatever) function which is just like `comp` but composes left-to-right.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15524">CLJ-1010</key>
            <summary>A left-to-right-variant of `comp`</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                    </labels>
                <created>Mon, 11 Jun 2012 04:57:55 -0500</created>
                <updated>Thu, 14 Jun 2012 18:27:23 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28772" author="tsdh" created="Mon, 11 Jun 2012 05:16:50 -0500"  >&lt;p&gt;Here&apos;s an implementation.&lt;/p&gt;</comment>
                    <comment id="28776" author="tsdh" created="Mon, 11 Jun 2012 12:41:07 -0500"  >&lt;p&gt;There&apos;s something strange with my patch.  The creation of a composition of a huge seq of functions is much faster with `comp*` than with `comp`, which is expected, because the seq doesn&apos;t need to be reversed.&lt;/p&gt;

&lt;p&gt;The strange thing however is that the compositions created with `comp` evaluate about 10-20% faster than those created with `comp*` although the arbitrary-arity version of `comp` is defined in terms of `comp*`: `(apply comp* (reverse (list* f1 f2 f3 fs)))`.&lt;/p&gt;

&lt;p&gt;For some benchmarking details, see: &lt;a href=&quot;https://groups.google.com/d/msg/clojure/MizwTxHwLE4/hGLrMfetlP8J&quot;&gt;https://groups.google.com/d/msg/clojure/MizwTxHwLE4/hGLrMfetlP8J&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28802" author="tsdh" created="Thu, 14 Jun 2012 02:32:38 -0500"  >&lt;p&gt;Here&apos;s some benchmark:&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;user&amp;gt; (use &apos;criterium.core)
nil
user&amp;gt; (let [coll (doall (take 1000000 (repeat inc)))
	   f1 (apply comp* coll) 
	   f2 (apply comp coll)] 
	   (bench (f1 0) :verbose) 
	   (println &quot;---------------------------------------&quot;)
	   (bench (f2 0) :verbose))
amd64 Linux 3.4.2-gentoo 2 cpu(s)
OpenJDK 64-Bit Server VM 22.0-b10
Runtime arguments: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -XX:+TieredCompilation -Xmx1G -Dclojure.compile.path=/home/horn/Repos/clj/testi/target/classes -Dtesti.version=0.1.0-SNAPSHOT -Dclojure.debug=false
Evaluation count             : 600
             Execution time mean : 112.324465 ms  95.0% CI: (112.247218 ms, 112.380682 ms)
    Execution time std-deviation : 6.513809 ms  95.0% CI: (6.477450 ms, 6.553029 ms)
         Execution time lower ci : 105.609401 ms  95.0% CI: (105.609401 ms, 105.622918 ms)
         Execution time upper ci : 122.353763 ms  95.0% CI: (122.353763 ms, 122.405315 ms)
---------------------------------------
amd64 Linux 3.4.2-gentoo 2 cpu(s)
OpenJDK 64-Bit Server VM 22.0-b10
Runtime arguments: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -XX:+TieredCompilation -Xmx1G -Dclojure.compile.path=/home/horn/Repos/clj/testi/target/classes -Dtesti.version=0.1.0-SNAPSHOT -Dclojure.debug=false
Evaluation count             : 1440
             Execution time mean : 43.519663 ms  95.0% CI: (43.516732 ms, 43.524062 ms)
    Execution time std-deviation : 492.299089 us  95.0% CI: (490.829889 us, 494.198137 us)
         Execution time lower ci : 42.781398 ms  95.0% CI: (42.781398 ms, 42.781398 ms)
         Execution time upper ci : 44.157311 ms  95.0% CI: (44.157311 ms, 44.158513 ms)
nil
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="28803" author="tsdh" created="Thu, 14 Jun 2012 03:40:08 -0500"  >&lt;p&gt;Ok, I&apos;ve tracked down the performance difference.  This comes from the fact that `reverse` creates a clojure.lang.PersistentList which can be iterated much faster than a (fully realized) LazySeq.  If you provide your fncoll in `(apply comp* fncoll)` as vector or list, the application of the created composition is as fast as for `comp`.&lt;/p&gt;

&lt;p&gt;So for me, the patch is good and makes sense.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11307" name="0001-CLJ-1010-Add-a-left-to-right-version-of-comp-comp.patch" size="2569" author="tsdh" created="Mon, 11 Jun 2012 05:16:50 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1094] Zero-arity versions of every-pred and some-fn</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1094</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This patch adds zero-arity versions of every-pred and some-fn with these semantics.&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;(every-pred) === (constantly true)
(some-fn)    === (constantly nil)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These variants are useful in situations like the following:&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;;; compute-preds-for may return zero or many predicate fns
(let [preds (compute-preds-for something)]
  (filter (apply every-pred preds) some-coll))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15780">CLJ-1094</key>
            <summary>Zero-arity versions of every-pred and some-fn</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>patch</label>
                        <label>test</label>
                    </labels>
                <created>Thu, 25 Oct 2012 07:08:28 -0500</created>
                <updated>Thu, 25 Oct 2012 07:12:35 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29799" author="tsdh" created="Thu, 25 Oct 2012 07:12:35 -0500"  >&lt;p&gt;This is the thread where Max Penet suggested to have 0-arity versions of the two fns:&lt;/p&gt;

&lt;p&gt;  &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/IRlN-4LH_U0&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/IRlN-4LH_U0&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11611" name="0001-Add-zero-arity-variants-for-every-pred-and-some-fn.patch" size="3462" author="tsdh" created="Thu, 25 Oct 2012 07:08:28 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1112] Var *loading-verbosely* should initialize from a JVM system property</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1112</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I often find myself adding :verbose to a (require) or (use) clause of my (ns) in order to debug problems (especially macros, or bad namespace declarations). It would be very nice if I could define a JVM system property (say -Dclojure.load-verbosely=true) to default &lt;b&gt;loading-verbosely&lt;/b&gt; to true for a REPL session, or as part of a build. &lt;/p&gt;

&lt;p&gt;Sometimes I just like to see that namespaces load as a measure of progress, when starting an application, or when running a set of tests.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15845">CLJ-1112</key>
            <summary>Var *loading-verbosely* should initialize from a JVM system property</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Wed, 21 Nov 2012 13:19:20 -0600</created>
                <updated>Thu, 22 Nov 2012 02:14:32 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30006" author="tsdh" created="Thu, 22 Nov 2012 02:12:02 -0600"  >&lt;p&gt;This patch implements the suggested feature.&lt;/p&gt;

&lt;p&gt;The new system property is called &lt;tt&gt;clojure.core.loading-verbosely&lt;/tt&gt; in analogy to the existing &lt;tt&gt;clojure.compile.warn-on-reflection&lt;/tt&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11697" name="0001-Allow-setting-loading-verbosely-by-system-property.patch" size="1456" author="tsdh" created="Thu, 22 Nov 2012 02:12:02 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1130] Invoking a static method with the wrong number of arguments results in a NoSuchFieldException, rather than a proper message that the arguments could not be matched to the method</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1130</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;My code inadventently invoked a method that expected a single parameter, but passed no parameters.&lt;/p&gt;

&lt;p&gt;The exception:&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;Exception in thread &quot;main&quot; java.lang.NoSuchFieldException: getService, compiling:(com/annadaletech/nexus/services/registry.clj:168)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)
	at clojure.lang.Compiler.analyze(Compiler.java:6262)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
	at clojure.lang.Compiler.analyze(Compiler.java:6262)
	at clojure.lang.Compiler.access$100(Compiler.java:37)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5883)
....
Caused by: java.lang.NoSuchFieldException: getService
	at java.lang.Class.getField(Class.java:1520)
	at clojure.lang.Compiler$StaticFieldExpr.&amp;lt;init&amp;gt;(Compiler.java:1180)
	at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:923)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
	... 78 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That threw me for a bit; really, it looks like the compiler is attempting to access a field and invoke it as an IFn.  However, a proper message would be &quot;getService() requires 1 parameter, not 0&quot; (or something to that effect).  Even &quot;invalid number of parameters for SmashRuntime/getService()&quot; would be better.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15898">CLJ-1130</key>
            <summary>Invoking a static method with the wrong number of arguments results in a NoSuchFieldException, rather than a proper message that the arguments could not be matched to the method</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>feedback</label>
                    </labels>
                <created>Mon, 17 Dec 2012 17:57:44 -0600</created>
                <updated>Sun, 6 Jan 2013 18:44:47 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30382" author="michael-drogalis" created="Sun, 6 Jan 2013 18:44:47 -0600"  >&lt;p&gt;It looks like it&apos;s first trying to resolve a field by name, since field access with &lt;tt&gt;/&lt;/tt&gt; is legal. For example:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;user=&amp;gt; (Integer/parseInt)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;CompilerException java.lang.NoSuchFieldException: parseInt, compiling:(NO_SOURCE_PATH:1)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;user=&amp;gt; (Integer/MAX_VALUE)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;2147483647&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Would trying to resolve a method before a field fix this?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1030] Misleading ClassCastException when coercing a String to int</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1030</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Observed behaviour&lt;/p&gt;

&lt;p&gt;(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character&lt;/p&gt;

&lt;p&gt;Expected behaviour&lt;br/&gt;
(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer&lt;br/&gt;
or &lt;br/&gt;
IllegalArgumentException&lt;/p&gt;</description>
                <environment></environment>
            <key id="15591">CLJ-1030</key>
            <summary>Misleading ClassCastException when coercing a String to int</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ordnungswidrig">Philipp Meier</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 25 Jul 2012 06:13:21 -0500</created>
                <updated>Sun, 6 Jan 2013 20:52:40 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29532" author="jafingerhut" created="Mon, 24 Sep 2012 11:20:07 -0500"  >&lt;p&gt;If someone wants to improve the behavior of int in this case, they should also consider similar improvements to the error messages for unchecked-int, char, and unchecked-char.&lt;/p&gt;</comment>
                    <comment id="30383" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600"  >&lt;p&gt;Patch improved-int-char-casting-error-messages.diff on January 6, 2013.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11793" name="improved-int-char-casting-error-messages.diff" size="3855" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-891] make (symbol foo &quot;bar&quot;) work with foo being a namespace</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-891</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve run across the need to do (symbol &lt;b&gt;ns&lt;/b&gt; &quot;bar&quot;) a few times, and the existing approach (symbol (name (ns-name &lt;b&gt;ns&lt;/b&gt;)) &quot;bar&quot;) just doesn&apos;t seem like it ought to be the only way to do the job.  Includes a patch to make this work, by adding a new arity to Symbol.intern().&lt;/p&gt;

&lt;p&gt;Some discussion on this idea, here: &lt;a href=&quot;https://groups.google.com/forum/#!topic/clojure/n25aZ5HA7hc/discussion&quot;&gt;https://groups.google.com/forum/#!topic/clojure/n25aZ5HA7hc/discussion&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15047">CLJ-891</key>
            <summary>make (symbol foo &quot;bar&quot;) work with foo being a namespace</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="joegallo">Joe Gallo</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Dec 2011 10:13:58 -0600</created>
                <updated>Fri, 2 Mar 2012 16:53:07 -0600</updated>
                                                    <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="27439" author="stu" created="Fri, 9 Dec 2011 09:39:43 -0600"  >&lt;p&gt;I am not sure I like this, but I would like a rethink of names and namespaces. Doing a lot of cross language work, it would be great to have protocols for &quot;I have a name&quot; and for &quot;I have a namespace&quot;.&lt;/p&gt;

&lt;p&gt;With such protocols in place, it would also be possible to separately consider implementing symbol et al in terms of them. &lt;/p&gt;</comment>
                    <comment id="27443" author="hiredman" created="Fri, 9 Dec 2011 12:24:06 -0600"  >&lt;p&gt;Named being a protocol or an interface seems orthogonal to being able to create a symbol qualified with a namespace when you have a namespace in hand.&lt;/p&gt;

&lt;p&gt;I don&apos;t think the patch goes far enough, not only should (symbol &lt;b&gt;ns&lt;/b&gt; &quot;foo&quot;) be supported, but also (symbol &lt;b&gt;ns&lt;/b&gt; &apos;foo), given that (symbol &apos;foo) works and (symbol &quot;foo&quot;) works, (symbol &apos;bar &apos;foo) should also work, but doesn&apos;t.&lt;/p&gt;

&lt;p&gt;if Named is a protocol, and if you extend it to String, and if you make the symbol function create symbols from one or two Named things you still end up having to do (symbol (ns-name &lt;b&gt;ns&lt;/b&gt;) &apos;foo) or (symbol (ns-name &lt;b&gt;ns&lt;/b&gt;) &quot;foo&quot;)&lt;/p&gt;</comment>
                    <comment id="27480" author="joegallo" created="Fri, 16 Dec 2011 16:18:02 -0600"  >&lt;p&gt;Stuart, I&apos;m not opposed to the idea of separate protocols for Named and Namespaced.  Where should I go about creating a proposal to create those protocols and get them into clojure?  I&apos;m interested in doing the leg-work, or being a part of it.  But as an outsider, I don&apos;t know what to do next &amp;#8211; creating a ticket in Jira exhausted my knowledge of the process.&lt;/p&gt;</comment>
                    <comment id="27901" author="franks" created="Fri, 2 Mar 2012 16:53:07 -0600"  >&lt;p&gt;The same enhancement that joe suggests for symbol, would also apply to keyword.&lt;/p&gt;

&lt;p&gt;See: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/222e4abc16df8b20&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/222e4abc16df8b20&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Probably same/similar solution applies to both issues.&lt;/p&gt;

&lt;p&gt;-FrankS.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10732" name="0001-add-Symbol.intern-arity-for-a-Namespace-and-String.patch" size="7437" author="joegallo" created="Mon, 5 Dec 2011 10:13:58 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1086] Support arity-1 for -&gt;&gt;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1086</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently (as of Clojure 1.4) -&amp;gt;&amp;gt; doesn&apos;t support arity-1, though -&amp;gt; does. Arity-1 for -&amp;gt;&amp;gt; would be useful to let somebody comment out forms as follows:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(-&amp;gt;&amp;gt; foo
  #_(bar baz)
  #_quux)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Discussion: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/_IVl0Tb7Au4&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/_IVl0Tb7Au4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My name on contributor list page &lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt; is: Shantanu Kumar&lt;/p&gt;</description>
                <environment>Clojure and ClojureScript</environment>
            <key id="15748">CLJ-1086</key>
            <summary>Support arity-1 for -&gt;&gt;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kumarshantanu">Shantanu Kumar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Oct 2012 13:39:09 -0500</created>
                <updated>Sat, 12 Jan 2013 18:48:06 -0600</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29909" author="jafingerhut" created="Thu, 8 Nov 2012 13:37:03 -0600"  >&lt;p&gt;Shantanu, you give your name on the contributing page, but I don&apos;t see it there.  Is your CA in transit, perhaps?&lt;/p&gt;</comment>
                    <comment id="29910" author="kumarshantanu" created="Thu, 8 Nov 2012 13:43:15 -0600"  >&lt;p&gt;@Andy I can see my name on the contributors page when I search for the text &quot;Shantanu&quot;. My CA was submitted more than a year ago.&lt;/p&gt;</comment>
                    <comment id="29911" author="jafingerhut" created="Thu, 8 Nov 2012 13:53:45 -0600"  >&lt;p&gt;Right you are.  I somehow accidentally got my browser to enable case matching, and was expecting it to search case insensitively.  Sorry for the noise.&lt;/p&gt;</comment>
                    <comment id="30427" author="vemv" created="Sat, 12 Jan 2013 18:48:06 -0600"  >&lt;p&gt;Just for the record, the patch provided at &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1121&lt;/a&gt; addresses this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11556" name="thread-last-arity-1.diff" size="835" author="kumarshantanu" created="Fri, 12 Oct 2012 13:39:09 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1033] pr-str and read-string don&apos;t handle @ symbols inside keywords properly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1033</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (read-string (pr-str {(keyword &lt;span class=&quot;code-quote&quot;&gt;&quot;key@other&quot;&lt;/span&gt;) :stuff}))
RuntimeException Map literal must contain an even number of forms  clojure.lang.Util.runtimeException (Util.java:170)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;pr-str emits &quot;{:key@other :stuff}&quot;, which read-string fails to interpret correctly. Either pr-str needs to escape the @ symbol, or read-string needs to handle the symbol inside a keyword.&lt;/p&gt;

&lt;p&gt;Background: I&apos;m passing a map with email addresses as keys through Storm bolts, which require a thrift-serializable form. Using the pr-str/read-string combo fails on these keys, so I&apos;ve fallen back to JSON serialization. &lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS; Java 1.7.0_05 Java HotSpot(TM) Client VM</environment>
            <key id="15600">CLJ-1033</key>
            <summary>pr-str and read-string don&apos;t handle @ symbols inside keywords properly</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stevenruppert">Steven Ruppert</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Thu, 26 Jul 2012 11:25:38 -0500</created>
                <updated>Sun, 13 Jan 2013 22:58:37 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29101" author="stu" created="Fri, 10 Aug 2012 12:51:33 -0500"  >&lt;p&gt;The &apos;@&apos; character is not a legal character for keywords or symbols (see &lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt;). Recategorized as enhancement request.&lt;/p&gt;</comment>
                    <comment id="29102" author="stevenruppert" created="Fri, 10 Aug 2012 13:04:23 -0500"  >&lt;p&gt;Then why doesn&apos;t (keyword &quot;keywith@&quot;) throw an exception? It seems inconsistent with your statement.&lt;/p&gt;</comment>
                    <comment id="29435" author="jafingerhut" created="Thu, 13 Sep 2012 14:23:29 -0500"  >&lt;p&gt;It is a long standing property of Clojure that it does not throw exceptions for everything that is illegal.&lt;/p&gt;</comment>
                    <comment id="29468" author="stevenruppert" created="Mon, 17 Sep 2012 14:16:01 -0500"  >&lt;p&gt;Yeah, but read-string clearly does. Is there a good reason that the &quot;keyword&quot; function &lt;em&gt;can&apos;t&lt;/em&gt; throw an exception? With the other special rules on namespaces within symbol names, the &quot;keyword&quot; function really should be doing validation.&lt;/p&gt;

&lt;p&gt;Another solution would be to allow a ruby-like :&quot;symbol with disallowed characters&quot; literal, but that would also be confusing with how the namespace is handled.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Ct5v9w0yNAE&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Ct5v9w0yNAE&lt;/a&gt; has some older discussion on this topic. &lt;/p&gt;</comment>
                    <comment id="29471" author="jafingerhut" created="Mon, 17 Sep 2012 19:43:54 -0500"  >&lt;p&gt;Disclaimer: I&apos;m not a Clojure/core member, just an interested contributor who doesn&apos;t know all the design decisions that were made here.&lt;/p&gt;

&lt;p&gt;Steven, I think perhaps a couple of concerns are: (1) doing such checks would be slower than not doing them, and (2) implementing such checks means having to update them if/when the rules for legal symbols, keywords, namespace names, etc. change.&lt;/p&gt;

&lt;p&gt;Would you be interested in writing strict versions of functions like symbol and keyword for addition to a contrib library?  And test suites that try to hit a significant number of corner cases in the rules for what is legal and what is not?  I mean those as serious questions, not rhetorical ones.  This would permit people that want to use the strict versions of these functions to do so, and at the same time make it easy to measure performance differences between the strict and loose versions.&lt;/p&gt;</comment>
                    <comment id="30435" author="stevenruppert" created="Sun, 13 Jan 2013 22:58:37 -0600"  >&lt;p&gt;Looking back at this, the root cause of the problem is that the {pr} function, although it by default &quot;print&lt;span class=&quot;error&quot;&gt;&amp;#91;s&amp;#93;&lt;/span&gt; in a way that objects can be read by the reader&quot; &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;, doesn&apos;t always do so. Thus, the easiest &quot;fix&quot; is to change its docstring to warn that not all keywords can be read back.&lt;/p&gt;

&lt;p&gt;The deeper problem is that symbol don&apos;t have a reader form that can represent all actually possible keywords (in this case, those with &quot;@&quot; in them). Restricting the actually-possible keywords to match the reader form, i.e. writing a strict &quot;keyword&quot; &lt;b&gt;function&lt;/b&gt; actually seems like a worse solution overall to me. The better solution would be to somehow extend the keyword reader form to allow it to express all possible keywords, possibly ruby&apos;s :&quot;keyword&quot; syntax. Plus, that solution would avoid having to keep hypothetical strict keyword/symbol functions in sync with reader operation, and write test cases for that, and so on.&lt;/p&gt;

&lt;p&gt;Thus, the resolution of this bug comes down to how far we&apos;re willing to go. Changing the docstring would be the easiest, but extending the keyword form would be the &quot;best&quot; resolution, IMO.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://clojuredocs.org/clojure_core/clojure.core/pr&quot;&gt;http://clojuredocs.org/clojure_core/clojure.core/pr&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1149] Unhelpful error message from :use (and use function) when arguments are malformed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1149</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;the following exception happens when you have something like this(bad):&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
  (:use &lt;span class=&quot;error&quot;&gt;&amp;#91;midje.sweet :reload-all&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;as opposed to any of these(correct):&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
  (:use midje.sweet :reload-all))&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
(:use &lt;span class=&quot;error&quot;&gt;&amp;#91;midje.sweet&amp;#93;&lt;/span&gt; :reload-all))&lt;/p&gt;

&lt;p&gt;and the exception is:&lt;br/&gt;
Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: No value supplied for key: true&lt;br/&gt;
        at clojure.lang.PersistentHashMap.create(PersistentHashMap.java:77)&lt;br/&gt;
        at clojure.core$hash_map.doInvoke(core.clj:365)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:617)&lt;br/&gt;
        at clojure.core$load_lib.doInvoke(core.clj:5352)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:142)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:619)&lt;br/&gt;
        at clojure.core$load_libs.doInvoke(core.clj:5403)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:621)&lt;br/&gt;
        at clojure.core$use.doInvoke(core.clj:5497)&lt;/p&gt;

&lt;p&gt;Note that this is similar to the equally unhelpful message shown in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1140&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1140&lt;/a&gt; although that is a different root cause.&lt;/p&gt;

&lt;p&gt;Probably best to enhance the `use` function to validate its arguments before trying to apply hash-map?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15967">CLJ-1149</key>
            <summary>Unhelpful error message from :use (and use function) when arguments are malformed</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jan 2013 18:37:27 -0600</created>
                <updated>Thu, 17 Jan 2013 18:37:27 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-764] (partition 0 seq) and (parition-all 0 seq) are infinite sequences of empty sequences</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-764</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(partition n seq) and (partition-all n seq) are implemented by taking n and dropping n from seq.  When n=0 this becomes an infinite sequence of empty sequences.&lt;/p&gt;

&lt;p&gt;While conceptionally this makes sense, I think practically it may surprise people, and perhaps it should return an empty sequence or a sequence of a single empty sequence.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14380">CLJ-764</key>
            <summary>(partition 0 seq) and (parition-all 0 seq) are infinite sequences of empty sequences</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="pjstadig">Paul Stadig</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Mar 2011 09:20:57 -0500</created>
                <updated>Mon, 21 Jan 2013 05:40:07 -0600</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26324" author="pjstadig" created="Mon, 21 Mar 2011 09:22:32 -0500"  >&lt;p&gt;Ugh!  I didn&apos;t mean for this to be major priority, and I can&apos;t seem to edit it after the fact.&lt;/p&gt;</comment>
                    <comment id="30466" author="mikera" created="Mon, 21 Jan 2013 05:40:07 -0600"  >&lt;p&gt;I think the current behaviour is logically more correct than returning a empty sequence or a single empty sequence.&lt;/p&gt;

&lt;p&gt;In particular, I would expect (partition n infinite-seq) to return an infinite sequence of sequences of length n, for any value of n &amp;gt;= 0. Anything else would be very surprising.&lt;/p&gt;

&lt;p&gt;The only other sensible option would be throwing an exception, on the philosophical grounds that it isn&apos;t possible to partition a non-empty sequence into sub-sequences of length 0. But I think that changing behaviour in this way would break backwards compatibility for no obvious gain.&lt;/p&gt;

&lt;p&gt;I suggest closing this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1148] adds docstring support to defonce, and stops it from stomping existing metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1148</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Two issues here:&lt;/p&gt;

&lt;p&gt;1) defonce doesn&apos;t support docstrings, although def does, so it would be nice to bring the two in line with each other&lt;/p&gt;

&lt;p&gt;2) defonce can stomp metadata, like this:&lt;/p&gt;

&lt;p&gt;(defonce ^:private foo 5)&lt;br/&gt;
#&apos;user/foo&lt;br/&gt;
(meta #&apos;foo) --&amp;gt; the private is there&lt;br/&gt;
(defone foo 10)&lt;br/&gt;
foo is still 5&lt;br/&gt;
(meta #&apos;foo) --&amp;gt; the private has been lost&lt;/p&gt;</description>
                <environment></environment>
            <key id="15966">CLJ-1148</key>
            <summary>adds docstring support to defonce, and stops it from stomping existing metadata</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="joegallo">Joe Gallo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jan 2013 17:16:40 -0600</created>
                <updated>Thu, 17 Jan 2013 17:16:40 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11805" name="0001-new-defonce-hotness.patch" size="1226" author="joegallo" created="Thu, 17 Jan 2013 17:16:40 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1082] Subvecs of primitive vectors cannot be reduced</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1082</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I could reproduce on current 10/05 git.&lt;/p&gt;

&lt;p&gt;Reduce doesn&apos;t work on subvecs of primitive vectors.&lt;br/&gt;
Root cause seems to be that RT/subvec and APersistentVector$SubVector make assumptions about implementation&lt;/p&gt;

&lt;p&gt;If reduce on a subvec doesn&apos;t work then neither will nice ops like fold.&lt;/p&gt;

&lt;p&gt;How to cause: &lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;prim-vec (into (vector-of :long) (range 10000))&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (reduce + (subvec prim-vec 1 500)))&lt;/p&gt;

&lt;p&gt;-&amp;gt;&amp;gt; ClassCastException clojure.core.Vec cannot be cast to clojure.lang.PersistentVector  clojure.lang.APersistentVector$SubVector.iterator (APersistentVector.java:523)&lt;/p&gt;
</description>
                <environment>1.7.0-08, OS X 10.8</environment>
            <key id="15733">CLJ-1082</key>
            <summary>Subvecs of primitive vectors cannot be reduced</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gshayban">Ghadi Shayban</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Oct 2012 18:49:21 -0500</created>
                <updated>Sat, 26 Jan 2013 07:29:55 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30056" author="halgari" created="Tue, 27 Nov 2012 11:52:48 -0600"  >&lt;p&gt;Confirmed to be broken on master. Vetting. Not sure what it&apos;s going to take to fix this, however. If this is of intrest for you, you might want to help push it along by providing a patch. &lt;/p&gt;</comment>
                    <comment id="30058" author="jafingerhut" created="Tue, 27 Nov 2012 12:09:26 -0600"  >&lt;p&gt;There is no code or ticket for this yet, but I wanted to mention that I&apos;ve begun working on an implementation of RRB-Tree (Relaxed Radix Balanced Tree) vectors for Clojure (see discussion at &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/xnbtzTVEK9A&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/xnbtzTVEK9A&lt;/a&gt;).  Assuming it is no big deal to get reducers to work on such vectors, subvec could be implemented in O(log n) time in such a way that the result was the same concrete type of vector as you started with, and thus reducers would work on them, too.&lt;/p&gt;

&lt;p&gt;It would mean O(log n) time for subvec instead of today&apos;s O(1), but this would likely fix other limitations that exist today with subvec&apos;s, e.g. &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-761&quot; title=&quot;print-dup generates call to nonexistent method for APersistentVector$SubVector&quot;&gt;CLJ-761&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="30461" author="mikera" created="Sun, 20 Jan 2013 05:14:04 -0600"  >&lt;p&gt;I have a fix for this and a regression test in the tree below:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mikera/clojure/tree/winfix&quot;&gt;https://github.com/mikera/clojure/tree/winfix&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not sure how best to make this into a patch though - I also have the pprint fix in here (&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt;)&lt;/p&gt;</comment>
                    <comment id="30462" author="mikera" created="Sun, 20 Jan 2013 18:41:50 -0600"  >&lt;p&gt;Attached a patch that I created with: &lt;/p&gt;

&lt;p&gt;git format-patch winfix --stdout HEAD~3..HEAD &amp;gt; clj-1082.patch&lt;/p&gt;

&lt;p&gt;Does this do the trick? I had to use the HEAD~3..HEAD to just get the most recent 3 commits and exclude the pprint changes that I needed in order to build on Windows.&lt;/p&gt;</comment>
                    <comment id="30463" author="mikera" created="Sun, 20 Jan 2013 18:42:24 -0600"  >&lt;p&gt;Patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1082&quot; title=&quot;Subvecs of primitive vectors cannot be reduced&quot;&gt;CLJ-1082&lt;/a&gt;, containing 3 commits&lt;/p&gt;</comment>
                    <comment id="30465" author="jafingerhut" created="Mon, 21 Jan 2013 01:11:04 -0600"  >&lt;p&gt;Mike, your patch clj-1082.patch applies cleanly to latest master for me, so looks like you found one way to do it.&lt;/p&gt;

&lt;p&gt;Another would be as follows, and closer to the directions on the JIRA workflow page: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; (but not identical).  Note that these commands would work on Mac OS X or Linux.  I&apos;m not sure what the correct corresponding command would be on Windows for the &quot;git am&quot; step below, unless that just happens to work because Windows and/or git implement the input redirection with &quot;&amp;lt;&quot; somehow.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Check out a fresh repo&lt;br/&gt;
$ git clone git://github.com/clojure/clojure.git&lt;br/&gt;
$ cd clojure&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Apply the patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt; to the master branch.  This step isn&apos;t on the JIRA workflow page.&lt;br/&gt;
$ git am --keep-cr -s &amp;lt; clj-1076-fix-tests-on-windows-patch-v1.txt&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Create a branch for yourself&lt;br/&gt;
$ git checkout -b fix-clj-1082&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;After editing to make your changes, commit them to the current fix-clj-1082 branch&lt;br/&gt;
$ git commit -a -m &quot;fixed annoying bug, refs #42&quot;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;From there on down it is the same as the instructions on the JIRA workflow page.  The &quot;git format-patch master --stdout &amp;gt; file.patch&quot; will create a patch for the changes you have made in the current branch fix-clj-1082 starting from the master branch, which has the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt; fix because of the &apos;git am&apos; command above.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11807" name="clj-1082.patch" size="3892" author="mikera" created="Sun, 20 Jan 2013 18:42:24 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1080] Eliminate many uses of reflection in Clojure code</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1080</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There are dozens of uses of reflection in Clojure code that can be eliminated by adding suitable type hints.  This patch adds the necessary type hints for most of those.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15729">CLJ-1080</key>
            <summary>Eliminate many uses of reflection in Clojure code</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 30 Sep 2012 11:36:18 -0500</created>
                <updated>Thu, 7 Feb 2013 08:54:50 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29581" author="jafingerhut" created="Sun, 30 Sep 2012 11:39:03 -0500"  >&lt;p&gt;Patch clj-1080-eliminate-many-reflection-warnings-patch-v1.txt dated Sep 30 2012 adds type hints to eliminate many uses of reflection in Clojure core code.&lt;/p&gt;</comment>
                    <comment id="29945" author="jafingerhut" created="Wed, 14 Nov 2012 13:26:02 -0600"  >&lt;p&gt;clj-1080-eliminate-many-reflection-warnings-patch-v2.txt dated Nov 14 2012 is identical to the previous patch (to be removed soon), except it applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="30563" author="jafingerhut" created="Thu, 7 Feb 2013 08:54:33 -0600"  >&lt;p&gt;clj-1080-eliminate-many-reflection-warnings-patch-v3.txt dated Feb 7 2013 is identical to the previous patch (to be removed soon), except it applies cleanly to latest master.  One type hint in the patch was added due to a different change, and was no longer needed in the patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11841" name="clj-1080-eliminate-many-reflection-warnings-patch-v3.txt" size="19090" author="jafingerhut" created="Thu, 7 Feb 2013 08:54:33 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1159] clojure.java.io/delete-file doesn&apos;t return the status of the deletion(true/false)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1159</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;initially reported it here(somehow):&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/d/msg/clojure/T9Kvr0IL0kg/wcKBfR9w_1sJ&quot;&gt;https://groups.google.com/d/msg/clojure/T9Kvr0IL0kg/wcKBfR9w_1sJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically clojure.java.io/delete-file doesn&apos;t ever return false (even when silently is true, it returns the value of silently), it&apos;s due to how it&apos;s implemented - but it&apos;s obvious from the code, so I&apos;ll stop here.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;PS: this is what I&apos;m using as my current workaround:&lt;br/&gt;
(defn delete-file&lt;br/&gt;
&quot;&lt;br/&gt;
an implementation that returns the true/false status&lt;br/&gt;
which clojure.java.io/delete-file doesn&apos;t do(tested in 1.5.0-RC14)&lt;br/&gt;
&quot;&lt;br/&gt;
  [f &amp;amp; &lt;span class=&quot;error&quot;&gt;&amp;#91;silently&amp;#93;&lt;/span&gt;]&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;ret (.delete (clojure.java.io/file f))&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (cond (or ret silently)&lt;br/&gt;
      ret&lt;br/&gt;
      :else&lt;br/&gt;
      (throw (java.io.IOException. (str &quot;Couldn&apos;t delete &quot; f)))&lt;br/&gt;
      )&lt;br/&gt;
    )&lt;br/&gt;
  )&lt;/p&gt;

&lt;p&gt;I&apos;m sure you guys can find a better way, but as a clojure newbie(really!) that&apos;s what I have.&lt;/p&gt;</description>
                <environment>any</environment>
            <key id="15999">CLJ-1159</key>
            <summary>clojure.java.io/delete-file doesn&apos;t return the status of the deletion(true/false)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="atkaaz">AtKaaZ</reporter>
                        <labels>
                        <label>delete-file</label>
                        <label>evil</label>
                        <label>or</label>
                    </labels>
                <created>Sun, 10 Feb 2013 13:55:52 -0600</created>
                <updated>Sun, 10 Feb 2013 14:21:28 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30575" author="atkaaz" created="Sun, 10 Feb 2013 14:01:08 -0600"  >&lt;p&gt;I kinda just realized it affects all versions since and including 1.2, because it appears that its implementation was the same since then.&lt;/p&gt;

&lt;p&gt;If it&apos;s not meant to return the result of the delete, maybe it should specifically return nil and/or the doc say something?&lt;/p&gt;</comment>
                    <comment id="30576" author="seancorfield" created="Sun, 10 Feb 2013 14:21:28 -0600"  >&lt;p&gt;As noted in a thread on the Clojure ML, you can pass a known value in the second argument position to detect a delete that failed:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(clojure.java.io/delete-file some-file :not-deleted)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;This returns true on success and :not-deleted on failure.&lt;/p&gt;

&lt;p&gt;However the docstring could be better worded to make that intention clear. Perhaps:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Delete file f. Return true if it succeeds. If silently is nil or false, raise an exception if it fails, else return the value of silently.&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;This allows you to detect whether the delete succeeded without catching an exception by passing a non-true truthy value as the second argument.&lt;/tt&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-706] make use of deprecated namespaces/vars easier to spot</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-706</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;From the mailing list &lt;a href=&quot;http://groups.google.com/group/clojure/msg/c41d909bd58e4534&quot;&gt;http://groups.google.com/group/clojure/msg/c41d909bd58e4534&lt;/a&gt;. It is easy to use deprecated namespaces without knowing you are doing so. The documentation warnings are small, and there is no compiler warning.&lt;/p&gt;

&lt;p&gt;Some possibilities include:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;much more visible deprecation styling in the documentation&lt;/li&gt;
	&lt;li&gt;stderr warnings when referencing a deprecated thing.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I don&apos;t love the idea of stderr warnings on all the time. Rich: is there an approach to this that you would like to see a patch for?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14315">CLJ-706</key>
            <summary>make use of deprecated namespaces/vars easier to spot</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jan 2011 20:39:01 -0600</created>
                <updated>Wed, 13 Feb 2013 00:38:18 -0600</updated>
                                                                            <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26099" author="richhickey" created="Fri, 7 Jan 2011 09:38:32 -0600"  >&lt;p&gt;I don&apos;t mind warning to stderr&lt;/p&gt;</comment>
                    <comment id="29815" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500"  >&lt;p&gt;706-deprecated-var-warning.diff adds warnings when using deprecated vars. The other three patches clean up deprecation warnings.&lt;/p&gt;</comment>
                    <comment id="29816" author="jafingerhut" created="Fri, 26 Oct 2012 14:23:20 -0500"  >&lt;p&gt;Great stuff.  I looked through the first patch, and didn&apos;t see anything in there that lets someone disable deprecation warnings from the command line, the way that &lt;b&gt;warn-on-reflection&lt;/b&gt; can today be set to true with a command line option.&lt;/p&gt;

&lt;p&gt;Is that something important to have for deprecation warnings?&lt;/p&gt;</comment>
                    <comment id="29835" author="jafingerhut" created="Sun, 28 Oct 2012 16:57:00 -0500"  >&lt;p&gt;I was hoping it would be quick and easy to add source file, line, and column info to the deprecation warning messages.  It isn&apos;t as easy as adding them to the format() call, because the method analyzeSymbol doesn&apos;t receive these values as args.  Is this deprecation check being done in a place where it is not easy to relate it to the source file, line, and column?  Could it be done in a place where that info is easily available?&lt;/p&gt;</comment>
                    <comment id="29864" author="gshayban" created="Mon, 29 Oct 2012 01:02:25 -0500"  >&lt;p&gt;Another patch - this time to warn on loading deprecated namespaces, instead of vars. This patch requires the first one.&lt;/p&gt;

&lt;p&gt;Re: line/column, I&apos;ll figure out how to thread the compile context through if it&apos;s desired.&lt;/p&gt;

&lt;p&gt;Re: Compile flag.  I have a patch for this also, but I&apos;m still verifying how to invoke.  How is warn-on-reflection set by command line?&lt;/p&gt;</comment>
                    <comment id="29865" author="jafingerhut" created="Mon, 29 Oct 2012 01:43:58 -0500"  >&lt;p&gt;Re: Compile flag.  Don&apos;t hold off on implementing a flag if you want to, but it might be worth hearing from others whether such a command line option is even desired.  I was asking in hopes of eliciting such a response.&lt;/p&gt;

&lt;p&gt;For the way that it is handled in the Clojure compiler, search for REFLECTION_WARNING_PROP and related code in Compile.java.  If you invoke the Clojure compiler directly via a Java command line, use -Dclojure.compile.warn-on-reflection=true (default is false).  See the recent email thread sent to Clojure Dev Google group if you want to know how to do it via ant or Maven.  Link: &lt;a href=&quot;https://mail.google.com/mail/?shva=1#label/clojure-dev/13aa0e34530196c3&quot;&gt;https://mail.google.com/mail/?shva=1#label/clojure-dev/13aa0e34530196c3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is also a separate command-line flag called &lt;b&gt;compiler-options&lt;/b&gt; (see Compile.java) that is implemented as a map inside the compiler.  It was added more recently than &lt;b&gt;warn-on-reflection&lt;/b&gt;, and might be the preferred method to add more such options, to avoid having to continue to add more arguments to the pushThreadBindings calls done in several places.&lt;/p&gt;</comment>
                    <comment id="29867" author="gshayban" created="Mon, 29 Oct 2012 10:36:00 -0500"  >&lt;p&gt;Thanks, Andy.&lt;/p&gt;

&lt;p&gt;Alternately for the last ns patch, it is equivalent to call (print-method msg &lt;b&gt;err&lt;/b&gt;), rather than binding &lt;b&gt;out&lt;/b&gt; to &lt;b&gt;err&lt;/b&gt;, may be more readable.  I&apos;ll be glad to send that in if it&apos;s preferable.&lt;/p&gt;</comment>
                    <comment id="30581" author="jafingerhut" created="Wed, 13 Feb 2013 00:38:18 -0600"  >&lt;p&gt;706-deprecated-var-warning-patch-v2.txt dated Feb 12 2013 is identical to 706-deprecated-var-warning.diff dated Oct 26 2012, except it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11617" name="706-deprecated-var-warning.diff" size="6119" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11851" name="706-deprecated-var-warning-patch-v2.txt" size="6099" author="jafingerhut" created="Wed, 13 Feb 2013 00:38:18 -0600" />
                    <attachment id="11619" name="706-fix-deprecation-warnings-agents.diff" size="1106" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11620" name="706-fix-deprecation-warnings-on-replicate.diff" size="3031" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11618" name="706-fix-deprecation-warning-test-junit.diff" size="2669" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11638" name="706-warning-on-deprecated-ns.diff" size="942" author="gshayban" created="Mon, 29 Oct 2012 01:02:25 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1138] data-reader returning nil causes exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1138</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If a data-reader returns nil, the reader throws java.lang.RuntimeException: No dispatch macro...  The error message implies that there is no dispatch macro for whatever the first character of the tag happens to be.&lt;/p&gt;

&lt;p&gt;Here&apos;s a simple example:&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;f/ignore (constantly nil)}&amp;#93;&lt;/span&gt; (read-string &quot;#f/ignore 42 10&quot;))&lt;/p&gt;

&lt;p&gt;RuntimeException No dispatch macro for: f  clojure.lang.Util.runtimeException (Util.java:219)&lt;/p&gt;</description>
                <environment>clojure 1.5 beta2, Mac OS X 10.8.2, java version &amp;quot;1.6.0_37&amp;quot;</environment>
            <key id="15916">CLJ-1138</key>
            <summary>data-reader returning nil causes exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Sat, 22 Dec 2012 08:41:18 -0600</created>
                <updated>Thu, 14 Feb 2013 15:06:47 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30289" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 09:43:27 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch allows a data-reader to return nil instead of throwing.  Does sanity check that possible tag or record isJavaIdentifierStart().  Gives better error message for special characters that might actually be dispatch macros (rather than assuming it&apos;s a tagged literal).&lt;/p&gt;</comment>
                    <comment id="30291" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:06:06 -0600"  >&lt;p&gt;clj-1138-data-reader-return-nil-for-no-op.patch allows a data-reader returning nil to be treated as a no-op by the reader (like #_).  nil is not normally a useful value (actually it causes an exception in Clojure 1.4 through 1.5 beta2) for a data-reader to return.  With this patch, one could get something like a conditional feature reader using data-readers.&lt;/p&gt;</comment>
                    <comment id="30292" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:26:43 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch is the first patch to consider.  It merely allows nil as a value from a data-reader and returns nil as the final value.  I think it does what was originally intended for dispatch macros, and gives a better error message in many cases (mostly typos).&lt;/p&gt;

&lt;p&gt;The second patch, clj-1138-data-reader-return-nil-for-no-op.patch, depends on the other being applied first.  It takes an extra step to treat a nil value returned from a data-reader as a no-op for the reader (like #_).&lt;/p&gt;</comment>
                    <comment id="30310" author="steveminer@gmail.com" created="Sun, 23 Dec 2012 11:52:28 -0600"  >&lt;p&gt;It turns out that you can work around the original problem by having your data-reader return &apos;(quote nil) instead of plain nil.  That expression conveniently evaluates to nil so you can get a nil if necessary.  This also works after applying the patches so there&apos;s still a way to return nil if you really want it.&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;x/nil (constantly &apos;(quote nil))}&amp;#93;&lt;/span&gt; (read-string &quot;#x/nil 42&quot;))&lt;br/&gt;
    ;=&amp;gt; (quote nil)&lt;/p&gt;</comment>
                    <comment id="30565" author="jafingerhut" created="Thu, 7 Feb 2013 09:20:27 -0600"  >&lt;p&gt;Patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch dated Dec 22 2012 still applies cleanly to latest master if you use the following command:&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch&lt;/p&gt;

&lt;p&gt;Without the --ignore-whitespace option, the patch fails only because some whitespace was changed in Clojure master recently.&lt;/p&gt;</comment>
                    <comment id="30584" author="jafingerhut" created="Wed, 13 Feb 2013 11:24:11 -0600"  >&lt;p&gt;OK, now with latest master (1.5.0-RC15 at this time), patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch no longer applies cleanly, not even using --ignore-whitespace in the &apos;git am&apos; command given above.  Steve, if you could see what needs to be updated, that would be great.  Using the patch command as suggested in the &quot;Updating stale patches&quot; section of &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; wasn&apos;t enough, so it should probably be carefully examined by hand to see what needs updating.&lt;/p&gt;</comment>
                    <comment id="30599" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:21:27 -0600"  >&lt;p&gt;I removed my patches.  Things have changes recently with the LispReader and new EdnReader.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-394] Add marker Interfaces for defrecords and deftypes plus boolean test fns</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-394</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Sometimes one would like to know if an object is an instance of a deftype or a defrecord.&lt;br/&gt;
Add (possibly empty) marker Interfaces that allow an efficient test, plus test fns&lt;br/&gt;
&apos;record?&apos; and &apos;deftype?&apos;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13791">CLJ-394</key>
            <summary>Add marker Interfaces for defrecords and deftypes plus boolean test fns</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Jul 2010 09:58:00 -0500</created>
                <updated>Fri, 1 Mar 2013 09:41:09 -0600</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="24084" author="importer" created="Tue, 24 Aug 2010 00:04:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/394&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/394&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28193" author="steveminer@gmail.com" created="Fri, 20 Apr 2012 13:55:05 -0500"  >&lt;p&gt;As of Clojure 1.3, there are marker interfaces named clojure.lang.IType and clojure.lang.IRecord.  You can use instance? with those interfaces.  I&apos;m not sure if they&apos;re actually documented for public use, but they seem to work as expected in 1.3 and 1.4.  If you want record?, you can try this:&lt;/p&gt;

&lt;p&gt;(defn record? &lt;span class=&quot;error&quot;&gt;&amp;#91;rec&amp;#93;&lt;/span&gt; (instance? clojure.lang.IRecord rec))&lt;/p&gt;</comment>
                    <comment id="29734" author="devn" created="Sat, 20 Oct 2012 18:38:30 -0500"  >&lt;p&gt;See attached code and test. I&apos;m unsure as to whether or not the location of the tests and predicates make sense. Please let me know if I should move them elsewhere.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11590" name="clj-394-add-predicates-for-type-and-record.diff" size="2391" author="devn" created="Sat, 20 Oct 2012 18:38:30 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-669] clojure.java.io/do-copy: use java.nio  for Files</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-669</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;NIO Channels reduce CPU/Disk load when copying Files (by using&lt;br/&gt;
syscalls like sendfile internally on Linux/Solaris).&lt;/p&gt;

&lt;p&gt;CPU-Load goes from 100% to 0% on my system when copying large files, because no userspace-copying is involved:&lt;/p&gt;

&lt;p&gt;Patch: &lt;a href=&quot;http://github.com/juergenhoetzel/clojure/commit/2b5ab103cbcfe6c49236ac6966c032d3c922233d&quot;&gt;http://github.com/juergenhoetzel/clojure/commit/2b5ab103cbcfe6c49236ac6966c032d3c922233d&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14271">CLJ-669</key>
            <summary>clojure.java.io/do-copy: use java.nio  for Files</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Nov 2010 16:03:16 -0500</created>
                <updated>Fri, 1 Mar 2013 09:47:45 -0600</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="25965" author="juergenhoetzel" created="Sat, 27 Nov 2010 05:05:14 -0600"  >&lt;p&gt;Patch instead of linking to github&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10032" name="0001-use-java.nio-in-do-copy-method-for-Files.patch" size="1158" author="juergenhoetzel" created="Sat, 27 Nov 2010 05:05:14 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-1073] Make print-sequential interruptible</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1073</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This allows print-sequential to be interrupted by Thread.interrupt(), rather than requiring clients to resort to Thread.stop(). This is especially helpful when printing very large sequences.&lt;/p&gt;

&lt;p&gt;See also clojure-dev discussion at &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/vs0RNUQXiYE/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/vs0RNUQXiYE/discussion&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15713">CLJ-1073</key>
            <summary>Make print-sequential interruptible</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Fri, 21 Sep 2012 16:10:46 -0500</created>
                <updated>Fri, 1 Mar 2013 10:18:01 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29522" author="jafingerhut" created="Fri, 21 Sep 2012 19:04:21 -0500"  >&lt;p&gt;In a quickly hacked up performance test on Mac OS X 10.6.8 + Oracle/Apple JDK 1.6.0_35 which I can attach, I saw about a 9% to 10% slowdown for Colin&apos;s patch in printing large vectors.&lt;/p&gt;

&lt;p&gt;I have a modified patch that only calls Thread/interrupted after every 20 items are printed, and with that version the slowdown versus the original code was about 3% to 4%.&lt;/p&gt;

&lt;p&gt;Colin, would there be any down side to checking Thread/interrupted less often for your purposes?&lt;/p&gt;

&lt;p&gt;To run performance test, edit attachment compile.sh to point at your clojure.jar, put file perftest-print.clj in the same directory, and run ./compile.sh    It should work on Mac or Linux.&lt;/p&gt;</comment>
                    <comment id="29523" author="jafingerhut" created="Sat, 22 Sep 2012 10:47:08 -0500"  >&lt;p&gt;clj-1073-allow-thread-interrupt-in-print-sequential-patch.txt dated Sep 22 2012 is similar to Colin&apos;s patch 0001-Allow-thread-interruption-in-print-sequential.patch dated Sep 21 2012, except it only checks interrupted status every 20 (or maybe 21?) times through the loop in print-sequential.  It is the one that is 3-4% slower than the current latest master Clojure code in my performance test mentioned above, versus Colin&apos;s patch which is about 9-10% slower on that test.&lt;/p&gt;</comment>
                    <comment id="29700" author="stu" created="Fri, 19 Oct 2012 15:31:32 -0500"  >&lt;p&gt;Is this primarily intended for dev-time use? I wouldn&apos;t want to lose performance for this if there is any way to implement it as a dev-time feature.&lt;/p&gt;</comment>
                    <comment id="29701" author="trptcolin" created="Fri, 19 Oct 2012 16:27:09 -0500"  >&lt;p&gt;Andy: The only caveat I can think of with checking Thread/interrupted less often is in the case of deeply nested collections.&lt;/p&gt;

&lt;p&gt;Stu: Dev-time use was the original reason for opening this, yes. But I can imagine it being needed for anytime a thread can be interrupted, whether that&apos;s by ctrl-c or other means.&lt;/p&gt;

&lt;p&gt;My original thinking, performance-wise, was that once we&apos;re already doing IO, we&apos;re probably not too concerned with CPU-bound checks like this, so I didn&apos;t bother with it. I guess with an SSD that&apos;s not as likely to be true.&lt;/p&gt;

&lt;p&gt;Locally (w/ my SSD), I&apos;m seeing that Andy&apos;s benchmark of printing a million numbers is about a second slower than the baseline with my original patch (12.08s -&amp;gt; 13.10s), and about the same with Andy&apos;s patch (12.08s -&amp;gt; 11.75s). Decreasing to a thousand numbers doesn&apos;t really show any difference (every version completes in ~1.3s). Bumping to 2 million adds 2 seconds above the baseline with my patch, and Andy&apos;s is again just a bit faster than the baseline (somehow). Bumping to 5 million runs me out of heap space &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="29913" author="jafingerhut" created="Thu, 8 Nov 2012 16:16:24 -0600"  >&lt;p&gt;clj-1073-add-print-interruptibly-patch-v1.txt dated Nov 8 2012 is the same idea as Colin&apos;s patch 0001-Allow-thread-interruption-in-print-sequential.patch dated Sep 21 2012, except it only checks (Thread/interrupted) if a new var &lt;b&gt;print-interruptibly&lt;/b&gt; is true.  Its default value is false.&lt;/p&gt;

&lt;p&gt;Performance results of the perftest-print.clj program, as driven by the test.sh script, for Clojure 1.5-beta1 and with two different patches.  All run times are elapsed, in seconds, and sorted in increasing order for easier comparison.&lt;/p&gt;

&lt;p&gt;Executive summary: Performance results when &lt;b&gt;print-interruptibly&lt;/b&gt; is left at default false value are pretty much same as today.  With &lt;b&gt;print-interruptibly&lt;/b&gt; bound to true, performance results are slower, as expected, and about the same as with Colin&apos;s patch.&lt;/p&gt;

&lt;p&gt;Original 1.5-beta1 unchanged:&lt;br/&gt;
13.75 13.80 13.83 13.87 13.93&lt;/p&gt;

&lt;p&gt;With this new &lt;b&gt;print-interruptibly&lt;/b&gt; patch, with &lt;b&gt;print-interruptibly&lt;/b&gt;&lt;br/&gt;
at default false value:&lt;br/&gt;
13.86 13.91 14.01 14.08 14.14&lt;/p&gt;

&lt;p&gt;With this new &lt;b&gt;print-interruptibly&lt;/b&gt; patch, with &lt;b&gt;print-interruptibly&lt;/b&gt;&lt;br/&gt;
bound to true while printing (so a slightly modified version of&lt;br/&gt;
perftest-print.clj that does (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*print-interruptibly* true&amp;#93;&lt;/span&gt;&lt;br/&gt;
...) around the heart of the code):&lt;br/&gt;
15.29 15.44 15.45 15.62 15.63&lt;/p&gt;

&lt;p&gt;With patch 0001-Allow-thread-interruption-in-print-sequential.patch&lt;br/&gt;
applied:&lt;br/&gt;
15.38 15.46 15.48 15.49 15.50&lt;/p&gt;</comment>
                    <comment id="29933" author="trptcolin" created="Mon, 12 Nov 2012 13:37:10 -0600"  >&lt;p&gt;Andy&apos;s latest patch looks good &amp;amp; makes it easy for the REPL and other interruptible scenarios to opt into the &quot;safe&quot; behavior. I would personally have preferred to have the &quot;safe&quot; behavior on by default, but can understand the performance concerns, and this gets me what I really wanted.&lt;/p&gt;</comment>
                    <comment id="30122" author="halgari" created="Fri, 30 Nov 2012 15:09:07 -0600"  >&lt;p&gt;Vetting as it sounds like the performance issues are taken care of. &lt;/p&gt;</comment>
                    <comment id="30580" author="jafingerhut" created="Wed, 13 Feb 2013 00:28:34 -0600"  >&lt;p&gt;clj-1073-add-print-interruptibly-patch-v2.txt dated Feb 12 2013 is identical to clj-1073-add-print-interruptibly-patch-v1.txt dated Nov 8 2012 (soon to be removed) except that it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11517" name="0001-Allow-thread-interruption-in-print-sequential.patch" size="1260" author="trptcolin" created="Fri, 21 Sep 2012 16:10:46 -0500" />
                    <attachment id="11850" name="clj-1073-add-print-interruptibly-patch-v2.txt" size="3902" author="jafingerhut" created="Wed, 13 Feb 2013 00:28:34 -0600" />
                    <attachment id="11519" name="perftest-print.clj" size="284" author="jafingerhut" created="Fri, 21 Sep 2012 19:05:46 -0500" />
                    <attachment id="11518" name="test.sh" size="298" author="jafingerhut" created="Fri, 21 Sep 2012 19:05:34 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</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>

<item>
            <title>[CLJ-1162] Error Message when calling deref on a non-IDeref is unhelpful</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1162</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you just type &quot;@1&quot; is the repl, on previous versions you&apos;ll get an error that Long cannot be cast to IDeref.  In 1.5, the error message is that it cannot be cast to java.util.concurrent.Future.  This is because it assumes that anything that isn&apos;t an IDeref is automatically a Future.  The deref method should generate a custom error stating that the type you&apos;ve passed in is neither an IDeref nor a Future. &lt;/p&gt;</description>
                <environment>Found this on ubuntu, lein 2, Clojure 1.5 snapshot, but it&amp;#39;s obvious from inspection</environment>
            <key id="16003">CLJ-1162</key>
            <summary>Error Message when calling deref on a non-IDeref is unhelpful</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="julian">Julian Birch</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Feb 2013 03:01:23 -0600</created>
                <updated>Fri, 1 Mar 2013 10:18:22 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-348] reify allows use of qualified name as method parameter</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-348</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This should complain about using a fully-qualified name as a parameter:&lt;/p&gt;

&lt;p&gt;(defmacro lookup []&lt;br/&gt;
  `(reify clojure.lang.ILookup&lt;br/&gt;
          (valAt &lt;span class=&quot;error&quot;&gt;&amp;#91;_ key&amp;#93;&lt;/span&gt;)))&lt;/p&gt;

&lt;p&gt;Instead it simply ignores that parameter in the method body in favour of clojure.core/key.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13745">CLJ-348</key>
            <summary>reify allows use of qualified name as method parameter</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 May 2010 14:30:00 -0500</created>
                <updated>Fri, 1 Mar 2013 12:33:02 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23886" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/348&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/348&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
0001-Add-a-test-for-348-reify-shouldn-t-accept-qualified-.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/d2xUJIxTyr36fseJe5cbLA/download/d2xUJIxTyr36fseJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/d2xUJIxTyr36fseJe5cbLA/download/d2xUJIxTyr36fseJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23887" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;technomancy said: [&lt;a href=&quot;file:d2xUJIxTyr36fseJe5cbLA&quot;&gt;file:d2xUJIxTyr36fseJe5cbLA&lt;/a&gt;]: A test to expose the unwanted behaviour&lt;/p&gt;</comment>
                    <comment id="23888" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;richhickey said: I&apos;m not sure the bug is what you say it is, or the resolution should be what you suggest. The true problem is the resolution of key when qualified. Another possibility is to ignore the qualifier there.&lt;/p&gt;</comment>
                    <comment id="23889" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;technomancy said: Interesting. So it&apos;s not appropriate to require auto-gensym here? Why are the rules different for reify methods vs proxy methods?&lt;/p&gt;

&lt;p&gt;&amp;gt; (defmacro lookup []&lt;br/&gt;
  `(proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.lang.ILookup&amp;#93;&lt;/span&gt; []&lt;br/&gt;
          (valAt &lt;span class=&quot;error&quot;&gt;&amp;#91;key&amp;#93;&lt;/span&gt; key)))&lt;br/&gt;
&amp;gt; (lookup)&lt;/p&gt;

&lt;p&gt;Can&apos;t use qualified name as parameter: clojure.core/key&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;Thrown class java.lang.Exception&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-991] partition-by reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-991</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description></description>
                <environment></environment>
            <key id="15428">CLJ-991</key>
            <summary>partition-by reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                        <label>patch,</label>
                    </labels>
                <created>Thu, 10 May 2012 20:08:20 -0500</created>
                <updated>Mon, 4 Mar 2013 14:49:42 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29140" author="richhickey" created="Tue, 14 Aug 2012 13:52:39 -0500"  >&lt;p&gt;I&apos;d like to see something much faster than this.&lt;/p&gt;</comment>
                    <comment id="29161" author="hiredman" created="Wed, 15 Aug 2012 01:58:59 -0500"  >&lt;p&gt;For reference here is a benchmark of a non-reducers (seq based) process that uses partition-by&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;user=&amp;gt; (def x (vec (range 1e6)))
#&apos;user/x
user=&amp;gt; (bench (reduce + (map count (partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 60
             Execution time mean : 1.072157 sec  95.0% CI: (1.070606 sec, 1.073381 sec)
    Execution time std-deviation : 165.818282 ms  95.0% CI: (163.873585 ms, 168.271261 ms)
         Execution time lower ci : 972.562000 ms  95.0% CI: (972.562000 ms, 973.301850 ms)
         Execution time upper ci : 1.419148 sec  95.0% CI: (1.419148 sec, 1.419148 sec)

Found 7 outliers in 60 samples (11.6667 %)
	low-severe	 2 (3.3333 %)
	low-mild	 5 (8.3333 %)
 Variance from outliers : 85.8489 % Variance is severely inflated by outliers
nil
user=&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Same again using r/partition-by from reducer-partition-by.diff&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;user=&amp;gt; (bench (r/reduce + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 60
             Execution time mean : 1.418350 sec  95.0% CI: (1.417738 sec, 1.418948 sec)
    Execution time std-deviation : 66.736477 ms  95.0% CI: (66.186568 ms, 67.610777 ms)
         Execution time lower ci : 1.370419 sec  95.0% CI: (1.370419 sec, 1.370419 sec)
         Execution time upper ci : 1.544151 sec  95.0% CI: (1.544151 sec, 1.544156 sec)

Found 10 outliers in 60 samples (16.6667 %)
	low-severe	 2 (3.3333 %)
	low-mild	 8 (13.3333 %)
 Variance from outliers : 33.5591 % Variance is moderately inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(using &lt;a href=&quot;https://github.com/hugoduncan/criterium&quot;&gt;https://github.com/hugoduncan/criterium&lt;/a&gt; for benchmarking)&lt;/p&gt;</comment>
                    <comment id="29163" author="hiredman" created="Wed, 15 Aug 2012 02:17:20 -0500"  >&lt;p&gt;same again for r/partition-by from reducers-partition-by2.diff&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;user=&amp;gt; (bench (r/reduce + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 180
             Execution time mean : 307.596806 ms  95.0% CI: (307.271339 ms, 307.961550 ms)
    Execution time std-deviation : 34.060809 ms  95.0% CI: (33.613169 ms, 34.416837 ms)
         Execution time lower ci : 285.339333 ms  95.0% CI: (285.339333 ms, 285.339333 ms)
         Execution time upper ci : 385.087950 ms  95.0% CI: (385.087950 ms, 385.087950 ms)

Found 10 outliers in 60 samples (16.6667 %)
	low-severe	 4 (6.6667 %)
	low-mild	 6 (10.0000 %)
 Variance from outliers : 73.8053 % Variance is severely inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;same again driven using r/fold (for grins) instead of r/reduce&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;user=&amp;gt; (bench (r/fold + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 360
             Execution time mean : 215.214486 ms  95.0% CI: (214.915417 ms, 215.664236 ms)
    Execution time std-deviation : 36.588464 ms  95.0% CI: (36.305548 ms, 36.847846 ms)
         Execution time lower ci : 185.575000 ms  95.0% CI: (185.575000 ms, 185.575000 ms)
         Execution time upper ci : 287.605175 ms  95.0% CI: (286.547833 ms, 287.605175 ms)

Found 6 outliers in 60 samples (10.0000 %)
	low-severe	 3 (5.0000 %)
	low-mild	 3 (5.0000 %)
 Variance from outliers : 87.6303 % Variance is severely inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;reducers-partition-by2.diff is faster, but I am not wild about introducing a type and a protocol. also not sure about the CollFold impl.&lt;/p&gt;</comment>
                    <comment id="29167" author="richhickey" created="Wed, 15 Aug 2012 06:58:45 -0500"  >&lt;p&gt;Let&apos;s leave fold out for this first patch, please.&lt;/p&gt;</comment>
                    <comment id="29184" author="hiredman" created="Wed, 15 Aug 2012 14:34:40 -0500"  >&lt;p&gt;reducer-partition-by3.diff is a cleaned up version of reducer-partition-by2.diff without fold&lt;/p&gt;</comment>
                    <comment id="29736" author="devn" created="Sat, 20 Oct 2012 19:07:00 -0500"  >&lt;p&gt;Per Andy Fingerhut&apos;s email reducer-partition-by3.diff was failing to apply. This patch should apply cleanly to current master.&lt;/p&gt;</comment>
                    <comment id="29886" author="jafingerhut" created="Thu, 1 Nov 2012 18:59:50 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete to None, since the reason for its being marked Incomplete seems to have been addressed with the latest patch.&lt;/p&gt;</comment>
                    <comment id="30697" author="hiredman" created="Mon, 4 Mar 2013 14:49:42 -0600"  >&lt;p&gt;should this be assigned to someone?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11427" name="reducer-partition-by2.diff" size="3061" author="hiredman" created="Wed, 15 Aug 2012 02:11:03 -0500" />
                    <attachment id="11435" name="reducer-partition-by3.diff" size="2636" author="hiredman" created="Wed, 15 Aug 2012 14:34:40 -0500" />
                    <attachment id="11591" name="reducer-partition-by4.diff" size="2647" author="devn" created="Sat, 20 Oct 2012 19:07:00 -0500" />
                    <attachment id="11190" name="reducer-partition-by.diff" size="2657" author="hiredman" created="Thu, 10 May 2012 20:08:20 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-1141] Allow pre and post-conditions in defprotocol and deftype macros</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1141</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The fn special form and the defn macro allow pre- and post-conditions. It would be nice if one could use that conditions also in method declarations of the defprotocol and deftype macro.&lt;/p&gt;

&lt;p&gt;Currently I use the extend function as workaround where one can specify the methods using a map of keyword-name and fn special form.&lt;/p&gt;</description>
                <environment>Dos not matter.</environment>
            <key id="15937">CLJ-1141</key>
            <summary>Allow pre and post-conditions in defprotocol and deftype macros</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="akiel">Alexander Kiel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jan 2013 05:08:13 -0600</created>
                <updated>Mon, 7 Jan 2013 17:28:42 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="30381" author="michael-drogalis" created="Sun, 6 Jan 2013 18:22:35 -0600"  >&lt;p&gt;Using &lt;tt&gt;:pre&lt;/tt&gt; and &lt;tt&gt;:post&lt;/tt&gt;, IMO, isn&apos;t a good idea. Handling assertions is a two part game. The mechanism needs to account for both detection and reaction, and the latter is missing.&lt;/p&gt;

&lt;p&gt;This isn&apos;t a perfect work-around, as it&apos;s a little verbose, but using &lt;a href=&quot;https://github.com/MichaelDrogalis/dire&quot;&gt;Dire&lt;/a&gt; might work better than using extend. In addition, you get the &quot;reaction&quot; functionality that&apos;s missing from &lt;tt&gt;:pre&lt;/tt&gt; and &lt;tt&gt;:post&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Example for protocol preconditions: &lt;a href=&quot;https://gist.github.com/4471276&quot;&gt;https://gist.github.com/4471276&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30396" author="akiel" created="Mon, 7 Jan 2013 11:52:08 -0600"  >&lt;p&gt;@Michael I read your &lt;a href=&quot;https://gist.github.com/4471276&quot;&gt;gist&lt;/a&gt; and the README of &lt;a href=&quot;https://github.com/MichaelDrogalis/dire&quot;&gt;Dire&lt;/a&gt;. I think the supervision concept of Erlang has it&apos;s places but I don&apos;t like it for pre- and post-conditions. For me, such conditions have two proposes: &lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;they should document the code and&lt;/li&gt;
	&lt;li&gt;they should fail fast to detect failures early.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;To support my first point, your pre- and post-conditions are just lexical too far away from the actual function definition. For the second point: I think in the case of violations the program should just crash. One could maybe wrap some part of the program with one of your exception supervisors handling an AssertionError. But I don&apos;t think that handling pre- and post-condition violations for individual functions is a good thing.&lt;/p&gt;</comment>
                    <comment id="30402" author="michael-drogalis" created="Mon, 7 Jan 2013 17:28:42 -0600"  >&lt;p&gt;@Alexander Indeed, your points are correct. Dire is meant to be exactly what you described. Lexically removed from application logic, and opportunity to recover from crashing. That was my best shot at aiding your needs quickly, anyway. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-713] Upgrade ASM to a more current version</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-713</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;Move to the latest ASM (currently 3.3.1)&lt;/li&gt;
	&lt;li&gt;No longer subset-ed&lt;/li&gt;
	&lt;li&gt;Still re-rooted it under clojure.asm&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14322">CLJ-713</key>
            <summary>Upgrade ASM to a more current version</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="aaron">Aaron Bedra</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jan 2011 22:47:00 -0600</created>
                <updated>Mon, 11 Mar 2013 15:43:51 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30720" author="gshayban" created="Sun, 10 Mar 2013 06:34:10 -0500"  >&lt;p&gt;Attached is a patch that externalizes and moves the ASM lib to the latest version (4.1), which has support for invokeDynamic if a brave soul wants to emit that instruction.  Heed fogus&apos;s caveats &lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;ASM in this patch is not re-rooted, but an external Maven dependency. It does have the disadvantage of possibly conflicting with other dependents of ASM, but this is the same approach is used by other JVM langs.&lt;/p&gt;

&lt;p&gt;Can classloaders mitigate that problem?&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; Recent post on clojure-dev, oblivious of &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/iX-ZFPk_zyE/Es3mDOdG3bYJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/iX-ZFPk_zyE/Es3mDOdG3bYJ&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/ahJXBT1vG68/_fEEM6Lc7LcJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/ahJXBT1vG68/_fEEM6Lc7LcJ&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/&quot;&gt;http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30729" author="gshayban" created="Mon, 11 Mar 2013 10:41:22 -0500"  >&lt;p&gt;Ran some of Andy Fingerhut&apos;s expression microbenchmarks on -master with the patch.  There is no difference between performance compared to 1.5.1.&lt;/p&gt;</comment>
                    <comment id="30733" author="jafingerhut" created="Mon, 11 Mar 2013 15:43:51 -0500"  >&lt;p&gt;Ghadi, out of curiosity, if you do AOT compilation of some Clojure class files, does it produce byte-for-byte identical .class files after your changes vs. before your changes?  If so, that would be pretty high assurance of no problems.  If not, it would be good to understand what changed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11903" name="asm-split.txt" size="533589" author="gshayban" created="Sun, 10 Mar 2013 06:34:10 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <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>

<item>
            <title>[CLJ-250] debug builds</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-250</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This ticket includes two patches: &lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;a patch to set  &lt;tt&gt;&lt;b&gt;assert&lt;/b&gt;&lt;/tt&gt; when clojure.lang.RT loads, based on the presence of system property clojure.debug&lt;/li&gt;
	&lt;li&gt;expand error messages in assert to include &lt;tt&gt;local-bindings&amp;lt;/code&amp;gt; (a new macro which wraps the implicit &amp;lt;code&amp;gt;&amp;amp;env&lt;/tt&gt;)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Things to consider before approving these patches:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;should there be an easy Clojure-level way to query if debug is enabled? (checking assert isn&apos;t the same, as debug should eventually drive other features)&lt;/li&gt;
	&lt;li&gt;assertions will now be off by default &amp;#8211; this is a change!&lt;/li&gt;
	&lt;li&gt;is the addition of the name &lt;tt&gt;local-bindings&lt;/tt&gt; to clojure.core cool?&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
            <key id="13647">CLJ-250</key>
            <summary>debug builds</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2010 17:40:00 -0600</created>
                <updated>Thu, 14 Mar 2013 13:28:51 -0500</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23417" author="importer" created="Tue, 24 Aug 2010 06:05:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/250&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/250&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
add-clojure-debug-flag.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aUWn50c64r35E-eJe5aVNr/download/aUWn50c64r35E-eJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aUWn50c64r35E-eJe5aVNr/download/aUWn50c64r35E-eJe5aVNr&lt;/a&gt;&lt;br/&gt;
assert-report-locals.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aUWqLSc64r35E-eJe5aVNr/download/aUWqLSc64r35E-eJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aUWqLSc64r35E-eJe5aVNr/download/aUWqLSc64r35E-eJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26008" author="stu" created="Tue, 7 Dec 2010 20:23:13 -0600"  >&lt;p&gt;Ignore the old patches. Considering the following implementation, please review and then move ticket to waiting on Stu:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;RT will check system property &lt;tt&gt;&quot;clojure.debug&quot;&lt;/tt&gt;, default to false&lt;/li&gt;
	&lt;li&gt;property will set the root binding for the current &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;, plus a new &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; flag. (Debug builds can and will drive other things than just asserts.)&lt;/li&gt;
	&lt;li&gt;does Compile.java need to push &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; or &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; as thread local bindings, or can they be root-bound only when compiling clojure?&lt;/li&gt;
	&lt;li&gt;will add &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; binding to &lt;tt&gt;clojure.main/with-bindings&lt;/tt&gt;. Anywhere else?&lt;/li&gt;
	&lt;li&gt;build.xml should not have to change &amp;#8211; system properties will flow through (and build.xml may not be around much longer anyway)&lt;/li&gt;
	&lt;li&gt;once we agree on the approach, I will ping maven plugin and lein owners so that they flow the setting through&lt;/li&gt;
	&lt;li&gt;better assertion messages will be a separate ticket&lt;/li&gt;
	&lt;li&gt;what is the interaction between &amp;#42;debug&amp;#42; and &amp;#42;unchecked-math&amp;#42;? Change checks to &lt;tt&gt;(and &amp;#42;unchecked-math&amp;#42; (not &amp;#42;debug&amp;#42;))&lt;/tt&gt;}?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26012" author="richhickey" created="Wed, 8 Dec 2010 11:00:04 -0600"  >&lt;p&gt;#3 - root bound only&lt;br/&gt;
#4 - should &lt;b&gt;not&lt;/b&gt; be in with-bindings for same reason as #3 - we don&apos;t want people to set! &amp;#42;debug&amp;#42; nor &amp;#42;assert&amp;#42;&lt;br/&gt;
#8 - yes, wrapping that in a helper fn&lt;/p&gt;

&lt;p&gt;#6 - my biggest reservation is that this isn&apos;t yet informed by maven best practices&lt;/p&gt;</comment>
                    <comment id="26013" author="stuart.sierra" created="Wed, 8 Dec 2010 14:09:49 -0600"  >&lt;p&gt;System properties can be passed through Maven, so I do not anticipate this being a problem.&lt;/p&gt;

&lt;p&gt;However, I would prefer &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; to remain true by default.&lt;/p&gt;</comment>
                    <comment id="26015" author="cemerick" created="Thu, 9 Dec 2010 07:19:33 -0600"  >&lt;p&gt;SS is correct about this approach not posing any issue for Maven.  In addition, the build could easily be set up to always emit two jars, one &quot;normal&quot;, one &quot;debug&quot;.&lt;/p&gt;

&lt;p&gt;I&apos;d suggest that, while &lt;tt&gt;clojure.debug&lt;/tt&gt; might have broad effect, additional properties should be available to provide fine-grained control over each of the additional &quot;debug&quot;-related parameterizations that might become available in the future.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I&apos;d like to raise a couple of potentially tangential concerns (after now thinking about assertions for a bit in the above context), some or all of which may simply be a result of my lack of understanding in various areas.&lt;/p&gt;

&lt;p&gt;Looking at where &lt;tt&gt;assert&lt;/tt&gt; is used in &lt;tt&gt;core.clj&lt;/tt&gt; (only two places AFAICT: validating arguments to &lt;tt&gt;derive&lt;/tt&gt; and checking pre- and post-conditions in &lt;tt&gt;fn&lt;/tt&gt;), it would seem unwise to make it &lt;tt&gt;false&lt;/tt&gt; by default.  i.e. non-&lt;tt&gt;Named&lt;/tt&gt; values would be able to get into hierarchies, and pre- and post-conditions would simply be ignored.&lt;/p&gt;

&lt;p&gt;It&apos;s my understanding that assertions (talking here of the JVM construct, from which Clojure reuses &lt;tt&gt;AssertionError&lt;/tt&gt;) should not be used to validate arguments to public API functions, or used to validate any aspect of a function&apos;s normal operation (i.e. &lt;a href=&quot;http://download.oracle.com/javase/1.4.2/docs/guide/lang/assert.html#usage&quot;&gt;&quot;where not to use assertions&quot;&lt;/a&gt;).  That would imply that &lt;tt&gt;derive&lt;/tt&gt; should throw &lt;tt&gt;IllegalArugmentException&lt;/tt&gt; when necessary, and fn pre- and post-conditions should perhaps throw &lt;tt&gt;IllegalStateException&lt;/tt&gt; &amp;#8211; or, in any case, something other than &lt;tt&gt;AssertionError&lt;/tt&gt; via &lt;tt&gt;assert&lt;/tt&gt;.  This would match up far better with most functions in core using &lt;tt&gt;assert-args&lt;/tt&gt; rather than &lt;tt&gt;assert&lt;/tt&gt;, the former throwing &lt;tt&gt;IllegalArgumentException&lt;/tt&gt; rather than &lt;tt&gt;AssertionError&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;That leads me to the question: is &lt;tt&gt;assert&lt;/tt&gt; (and &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;) intended to be a Clojure construct, or a quasi-interop form?&lt;/p&gt;

&lt;p&gt;If the former, then it can roughly have whatever semantics we want, but then it seems like it should not be throwing &lt;tt&gt;AssertionError&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;If the latter, then &lt;tt&gt;AssertionError&lt;/tt&gt; is appropriate on the JVM, but then we need to take care that assertions can be enabled and disabled at runtime (without having to switch around different builds of Clojure), ideally using the host-defined switches (e.g. &lt;tt&gt;-ea&lt;/tt&gt; and friends) and likely not anything like &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;. I don&apos;t know if this is possible or practical at this point (I presume this would require nontrivial compiler changes).&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Hopefully the above is not water under the bridge at this point.  Thank you in advance for your forbearance. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="26016" author="richhickey" created="Thu, 9 Dec 2010 08:08:07 -0600"  >&lt;p&gt;Thanks for the useful input Chas. Nothing is concluded yet. I think we should step back and look at the objective here, before moving forward with a solution. Being a dynamic language, there are many things we might want to validate about our programs, where the cost of checking is something we are unwilling to pay in production.&lt;/p&gt;

&lt;p&gt;Being a macro, assert has the nice property that, should &amp;#42;assert&amp;#42; not be true during compilation, it generates nil, no conditional test at all. Thus right now it is more like static conditional compilation.&lt;/p&gt;

&lt;p&gt;Java assert does have runtime toggle-ability, via &amp;#45;ea as you say. I haven&apos;t looked at the bytecode generated for Java asserts, but it might be possible for Clojure assert to do something similar, if the runtime overhead is negligible. It is quite likely that HotSpot has special code for eliding the assertion bytecode given a single check of some flag. I&apos;m just not sure that flag is &lt;a href=&quot;http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#desiredAssertionStatus()&quot;&gt;Class.desiredAssertionStatus&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Whether this turns into changes in assert or pre/post conditions, best practices etc is orthogonal and derived. Currently we don&apos;t have a facility to run without the checks. We need to choose between making them disappear during compilation (debug build) or runtime (track &amp;#45;ea) or both. Then we can look at how that is reflected in assert/pre-post and re-examine existing use of both. The &quot;where not to use assertions&quot; doc deals with them categorically, but in not considering their cost, seems unrealistic IMO. &lt;/p&gt;

&lt;p&gt;I&apos;d appreciate it if someone could look into how assert is generated and optimized by Java itself.&lt;/p&gt;</comment>
                    <comment id="26018" author="cemerick" created="Thu, 9 Dec 2010 17:04:52 -0600"  >&lt;p&gt;Bytecode issues continue to be above my pay grade, unfortunately&#8230;&lt;/p&gt;

&lt;p&gt;A few additional thoughts in response that you may or may not be juggling already:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;assert&lt;/tt&gt; being a macro makes total sense for what it&apos;s doing.  Trouble is, &quot;compile-time&quot; is a tricky concept in Clojure: there&apos;s code-loading-time, AOT-compile-time, and transitively-AOT-compile-time.  Given that, it&apos;s entirely possible for an application deployed to a production environment that contains a patchwork of code or no code produced by &lt;tt&gt;assert&lt;/tt&gt; usages in various libraries and namespaces depending upon when those libs and ns&apos; were loaded, AOT-compiled, or their dependents AOT-compiled, and the value of &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; at each of those times.  Of course, this is the case for all such macros whose results are dependent upon context-dependent state (I think this was a big issue with &lt;tt&gt;clojure.contrib.logging&lt;/tt&gt;, making it only usable with log4j for a while).&lt;/p&gt;

&lt;p&gt;What&apos;s really attractive about the JVM assertion mechanism is that it can be parameterized for a given runtime on a per-package basis, if desired.  Reimplementing that concept so that &lt;tt&gt;assert&lt;/tt&gt; can be &lt;tt&gt;&amp;#42;ns&amp;#42;&lt;/tt&gt;-sensitive seems like it&apos;d be straightforward, but the compile-time complexity already mentioned remains, and the idea of having two independently-controlled assertion facilities doesn&apos;t sound fun.&lt;/p&gt;

&lt;p&gt;I know nearly nothing about the CLR, but it would appear that it doesn&apos;t provide for anything like runtime-controllable assertions.&lt;/p&gt;</comment>
                    <comment id="26068" author="stu" created="Wed, 29 Dec 2010 15:17:44 -0600"  >&lt;p&gt;The best (dated) evidence I could find says that the compiler sets a special class static final field &lt;tt&gt;$assertionsDisabled&lt;/tt&gt; based on the return of &lt;tt&gt;desiredAssertionStatus&lt;/tt&gt;. HotSpot doesn&apos;t do anything special with this, dead code elimination simply makes it go away. The code indeed compiles this way:&lt;/p&gt;

&lt;p&gt;   11:	getstatic	#6; //Field $assertionsDisabled:Z&lt;br/&gt;
   14:	ifne	33&lt;br/&gt;
   17:	lload_1&lt;br/&gt;
   18:	lconst_0&lt;br/&gt;
   19:	lcmp&lt;br/&gt;
   20:	ifeq	33&lt;br/&gt;
   23:	new	#7; //class java/lang/AssertionError&lt;br/&gt;
   26:	dup&lt;br/&gt;
   27:	ldc	#8; //String X should be zero&lt;br/&gt;
   29:	invokespecial	#9; //Method java/lang/AssertionError.&quot;&amp;lt;init&amp;gt;&quot;:(Ljava/lang/Object;)V&lt;br/&gt;
   32:	athrow&lt;/p&gt;

&lt;p&gt;Even if we were 100% sure that assertion removal was total, I would still vote for a separate Clojure-level switch, for the following reasons:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;I have a real and pressing need to disable some assertions, and I don&apos;t need the Java interop at all. Arguably others will be in the same boat.&lt;/li&gt;
	&lt;li&gt;there will be multiple debugging facilities over time, and having a top-level &lt;b&gt;debug&lt;/b&gt; switch is convenient for Clojure users.&lt;/li&gt;
	&lt;li&gt;Java dis/enabling via command line flags is still possible as a separate feature. We could add this later as a (small) breaking change to our assert, or have a separate java-assert interop form. I am on the fence about which way to go here.&lt;/li&gt;
	&lt;li&gt;I believe it is perfectly fine to throw an &lt;tt&gt;AssertionError&lt;/tt&gt; from a non-Java-assertion-form. We don&apos;t believe in a world of a static exception hierarchy, and an assertion in production is a critical failure no matter what you call it. Even Scala does it &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;a href=&quot;http://daily-scala.blogspot.com/2010/03/assert-require-assume.html&quot;&gt;http://daily-scala.blogspot.com/2010/03/assert-require-assume.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Rich: awaiting your blessing to move forward on this.&lt;/p&gt;</comment>
                    <comment id="26100" author="richhickey" created="Fri, 7 Jan 2011 09:42:47 -0600"  >&lt;p&gt;The compiler sets $assertionsDisabled when, in static init code? Is there special support in the classloader for it? Is there a link to the best dated evidence you found?&lt;/p&gt;</comment>
                    <comment id="26101" author="stu" created="Fri, 7 Jan 2011 09:51:27 -0600"  >&lt;ol&gt;
	&lt;li&gt;Yes, in static init code&lt;/li&gt;
	&lt;li&gt;There is no special support in the classloader, per Brian Goetz (private correspondence) last week. But dead code elimination is great: &quot;The run-time cost of disabled assertions should indeed be zero for compiled code&quot;&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26102" author="stu" created="Fri, 7 Jan 2011 09:57:17 -0600"  >&lt;p&gt;Link: Google &quot;java assert shirazi&quot;. (Not posting link because I can&apos;t tell in 10 secs whether it includes my session information.)&lt;/p&gt;</comment>
                    <comment id="30760" author="akiel" created="Thu, 14 Mar 2013 13:28:51 -0500"  >&lt;p&gt;Is there anything new on this issue? I also look for a convenient way to disable assertions in production.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</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_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1172] Cross-linking between clojure.lang.Compiler and clojure.lang.RT</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1172</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This is my code (an example):&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;import clojure.lang.Compiler;
import clojure.lang.RT;
import clojure.lang.Var;

Compiler.load(&quot;(+ 5 %)&quot;);
Var foo = RT.var(&quot;bar&quot;, &quot;foo&quot;);
Object result = foo.invoke(10);
assert result.toString().equals(&quot;15&quot;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is what I&apos;m getting:&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;ava.lang.ExceptionInInitializerError
	at clojure.lang.Compiler.&amp;lt;clinit&amp;gt;(Compiler.java:47)
	at foo.main(Main.java:75)
Caused by: java.lang.NullPointerException
	at clojure.lang.RT.baseLoader(RT.java:2043)
	at clojure.lang.RT.load(RT.java:417)
	at clojure.lang.RT.load(RT.java:411)
	at clojure.lang.RT.doInit(RT.java:447)
	at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:329)
	... 36 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The same code worked just fine with version 1.4. Looks like &lt;tt&gt;Compiler&lt;/tt&gt; is using &lt;tt&gt;RT&lt;/tt&gt; and &lt;tt&gt;RT&lt;/tt&gt; is using &lt;tt&gt;Compiler&lt;/tt&gt;, both statically.&lt;/p&gt;</description>
                <environment>version 1.5.0-RC17</environment>
            <key id="16032">CLJ-1172</key>
            <summary>Cross-linking between clojure.lang.Compiler and clojure.lang.RT</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="4" iconUrl="http://dev.clojure.org/jira/images/icons/status_reopened.gif">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="yegor256">Yegor Bugayenko</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Feb 2013 06:30:50 -0600</created>
                <updated>Sat, 23 Mar 2013 10:31:23 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30694" author="yegor256" created="Mon, 4 Mar 2013 11:40:51 -0600"  >&lt;p&gt;I cross-posted this question to SO: &lt;a href=&quot;http://stackoverflow.com/questions/15207596&quot;&gt;http://stackoverflow.com/questions/15207596&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30699" author="yegor256" created="Tue, 5 Mar 2013 00:04:37 -0600"  >&lt;p&gt;calling &lt;tt&gt;RT.init()&lt;/tt&gt; before &lt;tt&gt;Compiler.load()&lt;/tt&gt; solves the problem&lt;/p&gt;</comment>
                    <comment id="30700" author="jafingerhut" created="Tue, 5 Mar 2013 04:17:34 -0600"  >&lt;p&gt;Yegor, do you consider it OK to close this ticket as not being a problem, or at least one with a reasonable workaround?&lt;/p&gt;</comment>
                    <comment id="30702" author="yegor256" created="Tue, 5 Mar 2013 13:11:57 -0600"  >&lt;p&gt;Yes, of course. Let&apos;s close it.&lt;/p&gt;</comment>
                    <comment id="30703" author="jafingerhut" created="Tue, 5 Mar 2013 18:14:13 -0600"  >&lt;p&gt;Ticket submitter agrees that this is not an issue, or that there is a reasonable workaround.&lt;/p&gt;</comment>
                    <comment id="30752" author="jafingerhut" created="Wed, 13 Mar 2013 00:58:46 -0500"  >&lt;p&gt;This issue came up again on the Clojure group.  &lt;a href=&quot;https://groups.google.com/forum/?hl=en_US&amp;amp;fromgroups=#!topic/clojure/2xdLNMb9yyQ&quot;&gt;https://groups.google.com/forum/?hl=en_US&amp;amp;fromgroups=#!topic/clojure/2xdLNMb9yyQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did some testing, and the issue did not exist in Clojure 1.5.0-RC3 and before, and it has existed since 1.5.0-RC4.  There was only one commit between those two points:&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://github.com/clojure/clojure/commit/9b80a552fdabeabdd93951a625b55ae49c2f8d83&quot;&gt;https://github.com/clojure/clojure/commit/9b80a552fdabeabdd93951a625b55ae49c2f8d83&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Maybe this new behavior is an intended consequence of that change.  I don&apos;t know.  In any case, it seems like perhaps the &quot;No need to call RT.init() anymore&quot; message 