<!--
RSS generated by JIRA (4.4#649-r158309) at Tue May 21 17:02:27 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+ORDER+BY+fixVersion+ASC%2C+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+ORDER+BY+fixVersion+ASC%2C+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="290" total="290"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<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-113] GC Issue 109:  RT.load&apos;s &quot;don&apos;t load if already loaded&quot; mechanism breaks &quot;:reload-all&quot;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-113</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 scgilardi, Apr 24, 2009

What (small set of) steps will reproduce the problem?

&lt;span class=&quot;code-quote&quot;&gt;&quot;require&quot;&lt;/span&gt; and &lt;span class=&quot;code-quote&quot;&gt;&quot;use&quot;&lt;/span&gt; support a &lt;span class=&quot;code-quote&quot;&gt;&quot;:reload-all&quot;&lt;/span&gt; flag that is intended to  
cause the specified libs to be reloaded along with all libs on which  
they directly or indirectly depend. This is implemented by temporarily  
binding a &lt;span class=&quot;code-quote&quot;&gt;&quot;loaded-libs&quot;&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; to the empty set and then loading the  
specified libs.

AOT compilation added another &lt;span class=&quot;code-quote&quot;&gt;&quot;already loaded&quot;&lt;/span&gt; mechanism to  
clojure.lang.RT.load() which is currently not sensitive to a &quot;reload-
all&quot; being in progress and breaks its operation in the following &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt;:

        A, B, and C are libs
        A depends on B. (via :require in its ns form)
        B depends on C. (via :require in its ns form)
        B has been compiled (B.class is on classpath)

        At the repl I &lt;span class=&quot;code-quote&quot;&gt;&quot;require&quot;&lt;/span&gt; A which loads A, B, and C (either from
class files or clj files)
        I modify C.clj
        At the repl I &lt;span class=&quot;code-quote&quot;&gt;&quot;require&quot;&lt;/span&gt; A with the :reload-all flag, intending to  
pick up the changes to C
        C is not reloaded because RT.load() skips loading B: B.class
exists, is already loaded, and B.clj hasn&apos;t changed since it was compiled.


What is the expected output? What &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; you see instead?

I expect :reload-all to be effective. It isn&apos;t.

What version are you using?

svn 1354, 1.0.0RC1

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_frm/thread/9bbc290321fd895f/e6a967250021462a#e6a967250021462a
&lt;/span&gt;
Please provide any additional information below.

I&apos;ll upload a patch soon that creates a &lt;span class=&quot;code-quote&quot;&gt;&quot;*reload-all*&quot;&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; with a  
root binding of nil and code to bind it to &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; when the current  
thread has a :reload-all call pending. When *reload-all* is &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,  
RT.load() will (re)load all libs from their &lt;span class=&quot;code-quote&quot;&gt;&quot;.clj&quot;&lt;/span&gt; files even &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;  
they&apos;re already loaded.

The fix &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; may need to be coordinated with a fix &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; issue #3.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13510">CLJ-113</key>
            <summary>GC Issue 109:  RT.load&apos;s &quot;don&apos;t load if already loaded&quot; mechanism breaks &quot;:reload-all&quot;</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="scgilardi">Stephen C. Gilardi</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 14:07:00 -0500</created>
                <updated>Tue, 9 Aug 2011 20:31:28 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22796" 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/113&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/113&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22797" 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>
                    <comment id="22798" 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="26713" author="hiredman" created="Mon, 8 Aug 2011 19:40:02 -0500"  >&lt;p&gt;seems like the code that is emitted in the static init for namespace classes could be emitted into a init_ns() static method and the static init could call init_ns(). then RT.load could call init_ns() to get the behavior of reloading an AOT compiled namespace. &lt;/p&gt;</comment>
                    <comment id="26715" author="hiredman" created="Tue, 9 Aug 2011 20:31:28 -0500"  >&lt;p&gt;looking at the compiler it looks like most of what I mentioned above is already implemented, just need RT to reflectively call load() on the namespace class in the right place&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-270] defn-created fns inherit old metadata from the Var they are assigned to</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-270</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;What (small set of) steps will reproduce the problem?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;user&amp;gt; (def #^{:foo &quot;bar&quot;} x 5)&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user&amp;gt; (meta #&apos;x)&lt;br/&gt;
{:ns #&amp;lt;Namespace user&amp;gt;, :name x, :file &quot;NO_SOURCE_FILE&quot;, :line 1, :foo &quot;bar&quot;}&lt;br/&gt;
user&amp;gt; (defn x [] 5)&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user&amp;gt; (meta #&apos;x)&lt;br/&gt;
{:ns #&amp;lt;Namespace user&amp;gt;, :name x, :file &quot;NO_SOURCE_FILE&quot;, :line 1, :arglists ([])}&lt;br/&gt;
user&amp;gt; (meta x)&lt;br/&gt;
{:ns #&amp;lt;Namespace user&amp;gt;, :name x, :file &quot;NO_SOURCE_FILE&quot;, :line 1, :foo &quot;bar&quot;}&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;What is the expected output? What do you see instead?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I expect (meta #&apos;x) to evaluate to the value of the final (meta x) in the above.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;What version are you using?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Current master (commit 61202d2ff6925002400a9843e8fbd080f3bef3a5).&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Was this discussed on the group? If so, please provide a link to the discussion.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/4c7151aa9c4d919c/d1b033ef5a13dd89?lnk=gst&amp;amp;q=off-by-one#d1b033ef5a13dd89&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/4c7151aa9c4d919c/d1b033ef5a13dd89?lnk=gst&amp;amp;q=off-by-one#d1b033ef5a13dd89&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prompted by discussion at&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/6553d48c981019eb/3c55b0bd43a5d8e9?lnk=gst&amp;amp;q=off-by-one#3c55b0bd43a5d8e9&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/6553d48c981019eb/3c55b0bd43a5d8e9?lnk=gst&amp;amp;q=off-by-one#3c55b0bd43a5d8e9&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Initial attempt at a diagnosis:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think this is due to DefExpr&apos;s eval method binding the Var to init.eval() first and attaching the supplied metadata to the Var later &amp;#8211; see Compiler.java lines 341-352. (Note the Var is always already in place when init.eval() is called, regardless of whether it existed prior to the evaluation of the def / defn.) Thus the init expression supplied by defn sees the old (and wrong) metadata on the Var.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13667">CLJ-270</key>
            <summary>defn-created fns inherit old metadata from the Var they are assigned to</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="richhickey">Rich Hickey</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Feb 2010 19:05:00 -0600</created>
                <updated>Tue, 24 Aug 2010 06:23:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23509" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/270&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/270&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
dont-copy-val-metadata-onto-new-var-value-in-defn.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/dwK4yssayr37y_eJe5d-aX/download/dwK4yssayr37y_eJe5d-aX&quot;&gt;https://www.assembla.com/spaces/clojure/documents/dwK4yssayr37y_eJe5d-aX/download/dwK4yssayr37y_eJe5d-aX&lt;/a&gt;&lt;br/&gt;
0001-set-meta-on-vars-before-evaluating-their-init-see-27.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/arrhbiAI4r35lQeJe5cbLr/download/arrhbiAI4r35lQeJe5cbLr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/arrhbiAI4r35lQeJe5cbLr/download/arrhbiAI4r35lQeJe5cbLr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23510" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;stu said: [&lt;a href=&quot;file:dwK4yssayr37y_eJe5d-aX&quot;&gt;file:dwK4yssayr37y_eJe5d-aX&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23511" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;stu said: The problem happens with defn, but not with def+fn, so I think the original diagnosis is incorrect. &lt;/p&gt;

&lt;p&gt;Another stab at diagnosis: The defn macro copies metadata from a var onto its new value, so if you defn a var that already exists, the old var metadata becomes metadata on the new value. I don&apos;t know why this would be the right thing to do, and if you eliminate this behavior (see patch) all the Clojure and Contrib tests still pass.&lt;/p&gt;

&lt;p&gt;If this is correct, please assign back to me and I will write tests. If this is wrong, please tell me what&apos;s going on here so I know how to write the tests.&lt;/p&gt;</comment>
                    <comment id="23512" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: &lt;b&gt;Child&lt;/b&gt; association with ticket #363 was added&lt;/p&gt;</comment>
                    <comment id="23513" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: I think the original diagnosis is correct. Note that the behavior differ when def iscompiled:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (def #^{:foo &quot;bar&quot;} x 5)&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user=&amp;gt; (let [] (defn x [] 5))&lt;br/&gt;
#&apos;user/x&lt;br/&gt;
user=&amp;gt; (meta x)&lt;br/&gt;
{:ns #&amp;lt;Namespace user&amp;gt;, :name x, :file &quot;NO_SOURCE_PATH&quot;, :line 83, :arglists ([])}&lt;br/&gt;
user=&amp;gt; (meta #&apos;x)&lt;br/&gt;
{:ns #&amp;lt;Namespace user&amp;gt;, :name x, :file &quot;NO_SOURCE_PATH&quot;, :line 83, :arglists ([])}&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/6afd81896ca368b2#&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/6afd81896ca368b2#&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23514" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: [&lt;a href=&quot;file:arrhbiAI4r35lQeJe5cbLr&quot;&gt;file:arrhbiAI4r35lQeJe5cbLr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23515" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: My patch aligns DefExpr.eval with DefExpr.emit (first set meta then eval the init value).&lt;/p&gt;</comment>
                    <comment id="23516" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: Forget it, my current patch is broken.&lt;/p&gt;</comment>
                    <comment id="23517" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: My current patch is broken because of #352, what is the rational for #352?&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-326] add :as-of option to refer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-326</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Discussed here: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/msg/74af612909dcbe56&quot;&gt;http://groups.google.com/group/clojure-dev/msg/74af612909dcbe56&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;:as-of allows library authors to specify a known subset of vars to refer from clojure (or &lt;b&gt;any other library&lt;/b&gt; which would use :added metadata).&lt;/p&gt;

&lt;p&gt;(ns foo (:refer-clojure :as-of &quot;1.1&quot;)) is equivalent to (ns foo (:refer-clojure :only &lt;span class=&quot;error&quot;&gt;&amp;#91;public-documented-vars-which-already-existed-in-1.1&amp;#93;&lt;/span&gt;))&lt;/p&gt;</description>
                <environment></environment>
            <key id="13723">CLJ-326</key>
            <summary>add :as-of option to refer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</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="cgrand">Christophe Grand</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Apr 2010 02:49:00 -0500</created>
                <updated>Tue, 24 Aug 2010 10:19:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23803" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/326&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/326&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
add-as-of-to-refer.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/a8SumUvcOr37SmeJe5cbLA/download/a8SumUvcOr37SmeJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/a8SumUvcOr37SmeJe5cbLA/download/a8SumUvcOr37SmeJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23804" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;cgrand said: [&lt;a href=&quot;file:a8SumUvcOr37SmeJe5cbLA&quot;&gt;file:a8SumUvcOr37SmeJe5cbLA&lt;/a&gt;]: requires application of #325&lt;/p&gt;</comment>
                    <comment id="23805" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;richhickey said: Do we still need this?&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="10013">Test</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-163] Enhance = and == docs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-163</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Enhance = and == docs as far as numbers handling is concerned (make them self referenced, make clear what == offers beyond = -except that it will only work for numbers)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13560">CLJ-163</key>
            <summary>Enhance = and == docs</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="laurentpetit">Laurent Petit</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Jul 2009 00:18:00 -0500</created>
                <updated>Tue, 24 Aug 2010 13:04:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23050" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/163&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/163&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
fixbug163.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/bH0XMCFjur3PLMeJe5aVNr/download/bH0XMCFjur3PLMeJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/bH0XMCFjur3PLMeJe5aVNr/download/bH0XMCFjur3PLMeJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23051" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;laurentpetit said: [&lt;a href=&quot;file:bH0XMCFjur3PLMeJe5aVNr&quot;&gt;file:bH0XMCFjur3PLMeJe5aVNr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23052" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: I don&apos;t want to recommend, in = doc, that people should prefer == for any case. People should always prefer =. If there is a perf, difference we can make that go away. Then the only difference with == is that it will fail on non-numbers, and that should be the only reason to choose it.&lt;/p&gt;</comment>
                    <comment id="23053" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#94, #96, #104, #119, #163)&lt;/p&gt;</comment>
                    <comment id="23054" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;laurentpetit said: Richn, by &quot;will fail on non-numbers&quot;, do you mean &quot;should throw an exception&quot; (and thus the patch must change the code), or just as it works today :&lt;/p&gt;

&lt;p&gt;(== :a :a)&lt;br/&gt;
false&lt;/p&gt;

&lt;p&gt;?&lt;/p&gt;</comment>
                    <comment id="23055" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: I&apos;ve fixed the code so == on non-numbers throws&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-42] GC Issue 38: When using AOT compilation, &quot;load&quot;ed files are not reloaded on (require :reload &apos;name.space)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-42</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 m...@kotka.de, Jan 07, 2009
What (small set of) steps will reproduce the problem?

1. Create a file src/foo.clj

cat &amp;gt;src/foo.clj &amp;lt;&amp;lt;EOF
(ns foo (:load &lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;))
EOF

2. Create a file src/bar.clj

cat &amp;gt;src/bar.clj &amp;lt;&amp;lt;EOF
(clojure.core/in-ns &apos;foo)
(def x 8)
EOF

3. Start Clojure Repl: java -cp src:classes clojure.main -r

4. Compile the namespace.

user=&amp;gt; (compile &apos;foo)
foo

5. Require the namespace
user=&amp;gt; (require :reload-all :verbose &apos;foo)
(clojure.core/load &lt;span class=&quot;code-quote&quot;&gt;&quot;/foo&quot;&lt;/span&gt;)
(clojure.core/load &lt;span class=&quot;code-quote&quot;&gt;&quot;/bar&quot;&lt;/span&gt;)

What is the expected output? What &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; you see instead?

6. Re-Require the namespace

user=&amp;gt; (require :reload-all :verbose &apos;foo)
(clojure.core/load &lt;span class=&quot;code-quote&quot;&gt;&quot;/foo&quot;&lt;/span&gt;)

Only the &lt;span class=&quot;code-quote&quot;&gt;&quot;master&quot;&lt;/span&gt; file is loaded, but not the bar file.
Expected would have been to also load the bar file.
Changes to bar.clj are not reflected, and depending
on the setting (eg. using multimethods in foo from
a different namespace) code may be corrupted.

What version are you using?

SVN rev. 1195&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13439">CLJ-42</key>
            <summary>GC Issue 38: When using AOT compilation, &quot;load&quot;ed files are not reloaded on (require :reload &apos;name.space)</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="scgilardi">Stephen C. Gilardi</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 15:15:00 -0500</created>
                <updated>Tue, 24 Aug 2010 06:44:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22573" 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/42&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/42&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22574" 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="22575" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#42, #71)&lt;/p&gt;</comment>
                    <comment id="22576" author="importer" created="Tue, 24 Aug 2010 06:44: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>
                </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-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-457] lazy recursive definition giving incorrect results</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-457</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you define a global data var in terms of a lazy sequence referring to that same var, you can get different results depending on the chunkiness of laziness of the functions being used to build the collection.&lt;/p&gt;

&lt;p&gt;Clojure&apos;s lazy sequences don&apos;t promise to support this, but they shouldn&apos;t return wrong answers. In the example given in &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/1c342fad8461602d&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/1c342fad8461602d&lt;/a&gt; (and repeated below), Clojure should not return bad data. An error message would be good, and even an infinite loop would be more reasonable than the current behavior.&lt;/p&gt;

&lt;p&gt;(Similar issue reported here: &lt;a href=&quot;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&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;(def nums (drop 2 (range)))
(def primes (cons (first nums)
             (lazy-seq (-&amp;gt;&amp;gt;
               (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; nums)
               (remove
                 (fn [x]
                   (let [dividors (take-&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; #(&amp;lt;= (* % %) x)
primes)]
                     (println (str &lt;span class=&quot;code-quote&quot;&gt;&quot;primes = &quot;&lt;/span&gt; primes))
                     (some #(= 0 (rem x %)) dividors))))))))
(take 5 primes)

It prints out:
(primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
primes = (2)
2 3 5 7 9)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13854">CLJ-457</key>
            <summary>lazy recursive definition giving incorrect results</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="cgrand">Christophe Grand</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Oct 2010 15:00:00 -0500</created>
                <updated>Mon, 3 Dec 2012 11:21:29 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="24301" author="importer" created="Wed, 13 Oct 2010 15:00:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/457&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/457&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26020" author="aaron" created="Fri, 10 Dec 2010 09:08:13 -0600"  >&lt;p&gt;Stu and Rich talked about making this an error, but it would break some existing code to do so. &lt;/p&gt;</comment>
                    <comment id="26038" author="richhickey" created="Fri, 17 Dec 2010 08:03:15 -0600"  >&lt;p&gt;Is there a specific question on this?&lt;/p&gt;</comment>
                    <comment id="26091" author="aaron" created="Wed, 5 Jan 2011 21:05:44 -0600"  >&lt;p&gt;Stu, you and I went over this but I can&apos;t remember exactly what the question was here.&lt;/p&gt;</comment>
                    <comment id="30076" author="cgrand" created="Wed, 28 Nov 2012 12:24:11 -0600"  >&lt;p&gt;Tentative patch attached.&lt;br/&gt;
Have you an example of existing code which is broken by such a patch (as mention by Aaron Bedra)? &lt;/p&gt;</comment>
                    <comment id="30107" author="richhickey" created="Fri, 30 Nov 2012 09:43:43 -0600"  >&lt;p&gt;The patch intends to do what? We have only a problem description and code. Please enumerate the plan rather than make us decipher the patch.&lt;/p&gt;

&lt;p&gt;As a first principle, I don&apos;t want Clojure to promise that such recursively defined values are possible.&lt;/p&gt;</comment>
                    <comment id="30108" author="cgrand" created="Fri, 30 Nov 2012 10:23:15 -0600"  >&lt;p&gt;The proposal here is to catch recursive seq realization (ie when computing the body of a lazy-seq attempts to access the same seq) and throw an exception.&lt;/p&gt;

&lt;p&gt;Currently when such a case happens, the recursive access to the seq returns nil. This results in incorrect code seemingly working but producing incorrect results or even incorrect code producing correct results out of luck (see &lt;a href=&quot;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&lt;/a&gt; for such an example).&lt;/p&gt;

&lt;p&gt;So this patch moves around the modification to the LazySeq state (f, sv and s fields) before all potentially  recursive method call (.sval in the while of .seq and .invoke in .sval) so that, upon reentrance, the state of the LazySeq is coherent and able to convey the fact the seq is already being computed.&lt;/p&gt;

&lt;p&gt;Currently a recursive call may find f and sv cleared and concludes the computation is done and the result is in s despite s being unaffected yet.&lt;/p&gt;

&lt;p&gt;Currently:&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;State&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;f&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;sv&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;s&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Unrealized&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;not null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Realized&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;anything&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Being realized/recursive call from fn.invoke&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;not null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Being realized/recursive call from ls.sval&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Note that &quot;Being realized&quot; states overlap with Unrealized or Realized.&lt;br/&gt;
(NB: &quot;anything&quot; includes null)&lt;/p&gt;

&lt;p&gt;With the patch:&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;State&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;f&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;sv&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;s&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Unrealized&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;not null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Realized&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;anything but this&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Being realized&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;null&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;this&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

</comment>
                    <comment id="30115" author="jafingerhut" created="Fri, 30 Nov 2012 14:06:09 -0600"  >&lt;p&gt;That last comment, Christophe, goes a long way to explaining the idea to me, at least.  Any chance comments with similar content could be added as part of the patch?&lt;/p&gt;</comment>
                    <comment id="30161" author="cgrand" created="Mon, 3 Dec 2012 11:18:59 -0600"  >&lt;p&gt;New patch with a comment explaining the expected states.&lt;br/&gt;
Note: I tidied the states table up.&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-comment&quot;&gt;// Before calling user code (f.invoke() in sval and, indirectly,
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// ((LazySeq)ls).sval() in seq -- and even RT.seq() in seq), ensure that 
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// the LazySeq state is in one of these states:
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// State            f          sv
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// ================================
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Unrealized       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;   &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Realized         &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;       &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Being realized   &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;       &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1119&quot; title=&quot;inconsistent behavior of lazy-seq w/ macro &amp;amp; closure on excptions&quot;&gt;CLJ-1119&lt;/a&gt; is also fixed by this patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11740" name="CLJ-457-2.diff" size="2925" author="cgrand" created="Mon, 3 Dec 2012 11:18:59 -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-2] Scopes</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-2</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Add the scope system for dealing with resource lifetime management&lt;/p&gt;</description>
                <environment></environment>
            <key id="13399">CLJ-2</key>
            <summary>Scopes</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="richhickey">Rich Hickey</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Jun 2009 13:35:00 -0500</created>
                <updated>Thu, 8 Mar 2012 04:01:38 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="22464" author="importer" created="Tue, 24 Aug 2010 11:43:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/2&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/2&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22465" author="importer" created="Tue, 24 Aug 2010 11:43: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="26566" author="stu" created="Tue, 12 Jul 2011 08:26:23 -0500"  >&lt;p&gt;Patch demonstrates idea, not ready for prime time.&lt;/p&gt;</comment>
                    <comment id="27496" author="tsdh" created="Fri, 23 Dec 2011 07:37:53 -0600"  >&lt;p&gt;I think the decision of having to specify either a Closeable resource or a close function for an existing non-Closeable resource in with-open is quite awkward, because they have completely different meaning.&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;  (let [foo (open-my-custom-resource &quot;foo.bar&quot;)]
    (with-open [r (reader &quot;foo.txt&quot;)
                foo #(.terminate foo)]
      (do-stuff r foo)))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think a CloseableResource protocol that can be extended to custom types as implemented in the patch to &lt;a href=&quot;#CLJ-308&quot;&gt;CLJ-308&lt;/a&gt; is somewhat easier to use.  Extend it once, and then you can use open-my-custom-resource in with-open just like reader/writer and friends...&lt;/p&gt;

&lt;p&gt;That said, Scopes can still be useful, but I&apos;d vote for handling the &quot;how should that resource be closed&quot; question by a protocol.  Then the with-open helper can simply add&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;(swap! *scope* conj (fn [] (clojure.core.protocols/close ~(bindings 0))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;and cleanup-scope only needs to apply each fn without having to distinguish Closeables from fns.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10275" name="scopes-spike.patch" size="4258" author="stu" created="Tue, 12 Jul 2011 08:26:23 -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-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-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-84] GC Issue 81:    compile gen-class fail when class returns self</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-84</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 davidhaub, Feb 14, 2009

When attempting to compile the following program, clojure fails with a
ClassNotFoundException.  It occurs because one of the methods returns the
same class that is being generated.  If the returnMe method below is
changed to &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; an &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;, the compile succeeds.

Beware when testing! If the classpath contains a class file (say from a
prior successful build when the returnMe method was changed to &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; an
object), the compile will succeed.  Always clear out the
clojure.compile.path prior to compiling.

;badgenclass.clj
(ns badgenclass
  (:gen-class
     :state state
     :methods
     [[returnMe [] badgenclass]]
     :init init))
(defn -init []
  [[] nil])

(defn -returnMe [&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;]
  &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;)

#!/bin/sh
rm -rf classes
mkdir classes
java -cp lib/clojure.jar:classes:. -Dclojure.compile.path=classes \
clojure.lang.Compile badgenclass


Comment 1 by chouser, Mar 07, 2009

Attached is a patch that accepts strings or symbols &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; parameter and &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; class
names, and generates the appropriate bytecode without calling &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;/forName.  It
fixes &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; issue, but because &apos;ns&apos; doesn&apos;t resolve :gen-class&apos;s arguments, class
names aren&apos;t checked as early anymore.  :gen-class-created classes with invalid
parameter or &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; types can even be instantiated, and no error will be reported
until the broken method is called.

One possible alternative would be to call &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;/forName on any symbols given, but
allow strings to use the method given by &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; patch.  To &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; your own type, you&apos;d
need a method defined like:

  [returnMe [] &lt;span class=&quot;code-quote&quot;&gt;&quot;badgenclass&quot;&lt;/span&gt;]

Any thoughts?&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13481">CLJ-84</key>
            <summary>GC Issue 81:    compile gen-class fail when class returns self</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="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="richhickey">Rich Hickey</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 22:30:00 -0500</created>
                <updated>Fri, 10 Dec 2010 09:30:52 -0600</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22702" author="importer" created="Tue, 28 Sep 2010 17:09:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/84&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/84&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
genclass-allow-unresolved-classname.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/cWS6Aww30r3RbzeJe5afGb/download/cWS6Aww30r3RbzeJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/cWS6Aww30r3RbzeJe5afGb/download/cWS6Aww30r3RbzeJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22703" author="importer" created="Tue, 28 Sep 2010 17:09:00 -0500"  >&lt;p&gt;oranenj said: [&lt;a href=&quot;file:cWS6Aww30r3RbzeJe5afGb&quot;&gt;file:cWS6Aww30r3RbzeJe5afGb&lt;/a&gt;]: on comment 1&lt;/p&gt;</comment>
                    <comment id="22704" author="importer" created="Tue, 28 Sep 2010 17:09: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="25904" author="stu" created="Sat, 30 Oct 2010 11:58:08 -0500"  >&lt;p&gt;The approach take in the initial patch (delaying resolution of symbols into classes) is fine: gen-class makes no promise about when this happens, and the dynamic approach feels more consistent with Clojure. I think the proposed (but not implemented) use of string/symbol to control when class names are resolved is a bad idea: magical and not implied by the types.&lt;/p&gt;

&lt;p&gt;Needed:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;update the patch to apply cleanly&lt;/li&gt;
	&lt;li&gt;consider whether totype could live in clojure.reflect.java. (Beware load order dependencies.)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="25910" author="chouser@n01se.net" created="Sat, 30 Oct 2010 21:29:59 -0500"  >&lt;p&gt;Wow, 18-month-old patch, back to haunt me for Halloway&apos;een&lt;/p&gt;

&lt;p&gt;So what does it mean that the assignee is Rich, but it&apos;s waiting on me?&lt;/p&gt;</comment>
                    <comment id="25915" author="stu" created="Mon, 1 Nov 2010 09:17:22 -0500"  >&lt;p&gt;I am using Approval = Incomplete plus Waiting On = Someone to let submitters know that there is feedback waiting, and that they can move the ticket forward by acting on it. The distinction is opportunity to contribute (something has been provided to let you move forward) vs. expectation of contribution. &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>chouser@n01se.net</customfieldvalue>
                </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-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-248] Add support for subsets and submaps to sorted Sets/Maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-248</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently we can have a subseq of a sorted-set|map-by, but this returns a seq and&lt;br/&gt;
not a Set or Map.&lt;br/&gt;
Implementing the interfaces java.util.SortedSet and java.util.SortedMap would give&lt;br/&gt;
us support for calling .subSet and .subMap.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13645">CLJ-248</key>
            <summary>Add support for subsets and submaps to sorted Sets/Maps</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="jim.blomo">Jim Blomo</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2010 05:52:00 -0600</created>
                <updated>Sat, 2 Jun 2012 19:08:44 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23413" 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/248&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/248&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23414" author="importer" created="Tue, 24 Aug 2010 06:05:00 -0500"  >&lt;p&gt;awizzard said: Another nice addition could be &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/util/NavigableMap.html&quot;&gt;java.util.NavigableMap&lt;/a&gt;, though this is available only since Java 6.&lt;/p&gt;</comment>
                    <comment id="28444" author="jim.blomo" created="Fri, 11 May 2012 01:13:12 -0500"  >&lt;p&gt;SortedSet-SortedMap-interfaces-248.diff 2012-05-10 is a first pass at the SortedMap interface.  If there are no objections, I&apos;ll build on the SortedMap implementation to add SortedSet support.&lt;/p&gt;</comment>
                    <comment id="28517" author="jim.blomo" created="Fri, 18 May 2012 00:33:57 -0500"  >&lt;p&gt;SortedMap-interfaces-248.diff 2012-05-10 supersedes the last diff.  It implements and tests the SortedMap interface.&lt;/p&gt;

&lt;p&gt;Additionally it includes tests for `sorted-map`, which didn&apos;t seem to be tested yet.&lt;/p&gt;</comment>
                    <comment id="28519" author="jim.blomo" created="Fri, 18 May 2012 01:56:15 -0500"  >&lt;p&gt;SortedMap-SortedSet-interfaces-248.diff 2012-05-18 supersedes the last diff.  It implements and tests both SortedMap and SortedSet.&lt;/p&gt;

&lt;p&gt;(Concurrent)NavigableMap is not implemented because I think 1.5 is still targeted.  In any case, it probably should have its own ticket.&lt;/p&gt;</comment>
                    <comment id="28595" author="jafingerhut" created="Thu, 24 May 2012 22:25:04 -0500"  >&lt;p&gt;clj-248-SortedMap-SortedSet-interfaces-patch2.txt dated May 24, 2012 is simply an updated version of SortedMap-SortedSet-interfaces-248.diff dated May 17, 2012.  The latter patch no longer applied cleanly.&lt;/p&gt;

&lt;p&gt;The new patch combines what was internally multiple git commits into one, simply because it was easier for me to create the patch that way.  I left out the addition of *.swp and *.swo files to the .gitignore file.  Builds and tests cleanly on Oracle/Apple JDK 1.6 on Mac OS X 10.6.8.&lt;/p&gt;</comment>
                    <comment id="28597" author="jafingerhut" created="Fri, 25 May 2012 00:27:31 -0500"  >&lt;p&gt;I don&apos;t know why Priority changed to Blocker when I changed Patch to &quot;Code and Test&quot;.  I didn&apos;t try to do that &amp;#8211; suspect that something with the web UI is doing that automatically somehow.&lt;/p&gt;</comment>
                    <comment id="28686" author="jim.blomo" created="Sat, 2 Jun 2012 19:08:44 -0500"  >&lt;p&gt;Added &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1008&quot; title=&quot;Make sorted maps and sets implement j.u.NavigableMap and NavigableSet interfaces &quot;&gt;CLJ-1008&lt;/a&gt; for NavigableMap interface enhancement.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11255" name="clj-248-SortedMap-SortedSet-interfaces-patch2.txt" size="19029" author="jafingerhut" created="Thu, 24 May 2012 22:25:04 -0500" />
                    <attachment id="11226" name="SortedMap-SortedSet-interfaces-248.diff" size="41027" author="jim.blomo" created="Fri, 18 May 2012 01:56: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-803] IAtom interface</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-803</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Atom and the other reference types do not have interfaces and are marked final.&lt;/p&gt;

&lt;p&gt;Use cases for interfaces for the reference types include database wrappers. CouchDB behaves exactly like compare-and-set! and is shared, synchronous, independent state, so it makes sense to use the Atom interface to update a CouchDB document.&lt;/p&gt;

&lt;p&gt;I talked to Rich about this, and he said &quot;patch welcome for IAtom&quot;, complete conversation: &lt;a href=&quot;http://clojure-log.n01se.net/date/2010-12-29.html#10:04c&quot;&gt;http://clojure-log.n01se.net/date/2010-12-29.html#10:04c&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14445">CLJ-803</key>
            <summary>IAtom interface</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="aaron">Aaron Bedra</assignee>
                                <reporter username="pepijndevos">Pepijn de Vos</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 May 2011 08:57:12 -0500</created>
                <updated>Mon, 4 Jul 2011 21:18:48 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26467" author="stu" created="Fri, 27 May 2011 14:33:06 -0500"  >&lt;p&gt;Please add a patch formatted by &quot;git format-patch&quot; so that attribution is included.&lt;/p&gt;</comment>
                    <comment id="26492" author="pepijndevos" created="Sat, 4 Jun 2011 05:56:35 -0500"  >&lt;p&gt;I added the formatted patch a few days ago. Does &apos;no news is good news&apos; apply here?&lt;/p&gt;

&lt;p&gt;And, silly question, will it make it into 1.3? I can&apos;t figure out how to tell Jira to show me that.&lt;/p&gt;</comment>
                    <comment id="26551" author="hiredman" created="Mon, 4 Jul 2011 21:06:41 -0500"  >&lt;p&gt;I fail to see the need for an IAtom, if you want something atom like for couchdb the interfaces are already there. Maybe I ICompareAndSwap. Atoms and couchdb are different so making them appear the same is a bad idea.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing&quot;&gt;http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://clojure.org/state&quot;&gt;http://clojure.org/state&lt;/a&gt; one of the distinctions between agents and actors raised in the section titled &quot;Message Passing and Actors&quot; is local vs. distributed and the same distinction can be made between couchdb (regardless of compare and swap) and atoms&lt;/p&gt;</comment>
                    <comment id="26552" author="aaron" created="Mon, 4 Jul 2011 21:18:48 -0500"  >&lt;p&gt;This ticket has already been moved into approved backlog.  It will be revisited again after the 1.3 release where we will take a closer look at things.  For now, this will remain as is. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10244" name="0001-atom-interface.patch" size="3324" author="pepijndevos" created="Sat, 28 May 2011 03:39:32 -0500" />
                    <attachment id="10239" name="iatom.patch" size="2853" author="pepijndevos" created="Fri, 27 May 2011 08:57: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-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-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-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-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-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-428] subseq, rsubseq enhancements to support priority maps?</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-428</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;See dev thread at &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/fdb000cae4f66a95&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/fdb000cae4f66a95&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Note: subseq currently returns () instead of nil in some situations. If the rest of this idea dies we might still want to fix that.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13825">CLJ-428</key>
            <summary>subseq, rsubseq enhancements to support priority maps?</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, 20 Aug 2010 08:01:00 -0500</created>
                <updated>Wed, 1 May 2013 02:44:36 -0500</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="24210" author="importer" created="Tue, 24 Aug 2010 10:10:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/428&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/428&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="31010" author="jafingerhut" created="Sun, 28 Apr 2013 02:14:18 -0500"  >&lt;p&gt;Patch clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v1.txt dated Apr 28 2013 was written by Mark Engelberg in July 2010, and was attached to a message he sent to the dev thread linked in the description.  The approach he takes is described by him in that thread, copied here:&lt;/p&gt;

&lt;p&gt;----------------------------------------&lt;br/&gt;
Meanwhile, to initiate discussion on how to modify subseq, I&apos;ve attached a proposed patch.  This patch works by modifying the seqFrom method of the Sorted interface to take an additional &quot;inclusive&quot; parameter (i.e., &amp;lt;= and &amp;gt;= are inclusive, &amp;lt; and &amp;gt; are not).&lt;/p&gt;

&lt;p&gt;In this patch, I do not address one issue I raised before, which is whether subseq implies by its name that it should return a seq rather than a sequence (in other words nil rather than ()).  If seq behavior is desired, it would be necessary to wrap a call to seq around the calls to take-while.  But for now, I&apos;m just making the behavior match the current behavior.&lt;/p&gt;

&lt;p&gt;Although I think this is the cleanest way to address the extensibility issue with subseq, the change to seqFrom will break anyone who currently is overriding that method.  I didn&apos;t see any such classes in clojure.contrib, so I don&apos;t think it&apos;s an issue, but if this is a concern, my other idea is to fix the problem entirely within subseq by changing the calls to next into calls to drop-while.  I have coded this to confirm that it works, and can provide that alternative patch if desired.&lt;br/&gt;
----------------------------------------&lt;/p&gt;

&lt;p&gt;I can also supply a patch that uses drop-while in clojure.core/subseq and rsubseq if such an approach is preferred to the one in this patch.&lt;/p&gt;</comment>
                    <comment id="31014" author="jafingerhut" created="Sun, 28 Apr 2013 12:12:47 -0500"  >&lt;p&gt;clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v2.txt dated Apr 28 2013 is same as clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v1.txt (soon to be deleted), except it adds tests for subseq and rsubseq, and corrects a bug in that patch.  The approach is the same as described above for that patch.&lt;/p&gt;</comment>
                    <comment id="31036" author="jafingerhut" created="Wed, 1 May 2013 02:44:20 -0500"  >&lt;p&gt;Patch clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v3.txt dated May 1 2013 is the same as clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v1.txt, still with the bug fix mentioned for -v2, but with some unnecessary changes removed from the patch.  The comments for -v1.txt on the approach still apply.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11977" name="clj-428-change-Sorted-seqFrom-to-take-inclusive-patch-v3.txt" size="5901" author="jafingerhut" created="Wed, 1 May 2013 02:44: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="10001">Code</customfieldvalue>

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

<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-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-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-273] def with a function value returns meta {:macro false}, but def itself doesn&apos;t have meta</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-273</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;On the master (1.2) branch, if you create a def with an initial function value, {:macro false} is added to the metadata of the return value for def. However, if you look again at the metadata on the var itself, the {:macro false} is not present! This breaks the use of contrib&apos;s defalias when aliasing macros, because the new alias is marked as {:macro false}.&lt;/p&gt;

&lt;p&gt;The code below demonstrates the issue, which was introduced in &lt;a href=&quot;http://github.com/richhickey/clojure/commit/430dd4fa711d0008137d7a82d4b4cd27b6e2d6d1&quot;&gt;http://github.com/richhickey/clojure/commit/430dd4fa711d0008137d7a82d4b4cd27b6e2d6d1&lt;/a&gt;, &quot;metadata for fns.&quot;&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;;; all running on 1.2, DIFF noted in comments

(defmacro foo [])
-&amp;gt; #&apos;user/foo

(meta (def bar (.getRoot #&apos;foo)))
-&amp;gt; {:macro &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, :ns #&amp;lt;Namespace user&amp;gt;, :name bar, :file &lt;span class=&quot;code-quote&quot;&gt;&quot;NO_SOURCE_PATH&quot;&lt;/span&gt;, :line 83}
;; DIFF: where did that :macro &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; come from??

(def bar (.getRoot #&apos;foo))
-&amp;gt; #&apos;user/bar

(meta #&apos;bar)
-&amp;gt; {:ns #&amp;lt;Namespace user&amp;gt;, :name bar, :file &lt;span class=&quot;code-quote&quot;&gt;&quot;NO_SOURCE_PATH&quot;&lt;/span&gt;, :line 84}
;; LIKE 1.1, but really weird: now the :macro &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; is gone again!&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13670">CLJ-273</key>
            <summary>def with a function value returns meta {:macro false}, but def itself doesn&apos;t have meta</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="richhickey">Rich Hickey</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Feb 2010 08:16:00 -0600</created>
                <updated>Tue, 24 Aug 2010 09:32:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23525" author="importer" created="Tue, 24 Aug 2010 09:32:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/273&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/273&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-129] Add documentation to sorted-set-by detailing how the provided comparator may change set membership semantics</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-129</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;To start, let&apos;s look at some simple default sorted-set behaviour (which uses PersistentHashMap via PersistentHashSet, and therefore uses equality/hashCode to determine identity):&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; (sorted-set [1 2] [-5 10] [1 5])
#{[-5 10] [1 2] [1 5]}
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;

sorted-set-by uses PersistentTreeMap via PersistentTreeSet though, which implies that the comparator provided to sorted-set-by will be used to determine identity, and therefore member in the set.  This can lead to (IMO) non-intuitive behaviour:

&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;
user=&amp;gt; (sorted-set-by #(&amp;gt; (first %) (first %2)) [1 2] [-5 10] [1 5])
#{[1 2] [-5 10]}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice that because the provided comparison fn determines that &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt; and &lt;span class=&quot;error&quot;&gt;&amp;#91;1 5&amp;#93;&lt;/span&gt; have the same sort order, the latter value is considered identical to the former, and not included in the set.  This behaviour could be very handy, but is also likely to cause confusion when what the user almost certainly wants is to maintain the membership semantics of the original set (e.g. relying upon equality/hashCode), but only modify the ordering.&lt;/p&gt;

&lt;p&gt;(BTW, yes, I know there&apos;s far easier ways to get the order I&apos;m indicating above over a set of vectors thanks to vectors being comparable via the compare fn.  The examples are only meant to be illustrative.  The same non-intuitive result would occur, with no easy fallback (like the &apos;compare&apos; fn when working with vectors) when the members of the set are non-Comparable Java object, and the comparator provided to sorted-set-by is defining a sort over some values returned by method calls into those objects.)&lt;/p&gt;

&lt;p&gt;I&apos;d be happy to change the docs for sorted-set-by, but I suspect that there are others who could encapsulate what&apos;s going on here more correctly and more concisely than I.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13526">CLJ-129</key>
            <summary>Add documentation to sorted-set-by detailing how the provided comparator may change set membership semantics</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</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="cemerick">Chas Emerick</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Jun 2009 16:14:00 -0500</created>
                <updated>Tue, 24 Aug 2010 07:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22903" author="importer" created="Tue, 24 Aug 2010 07:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/129&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/129&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22904" author="importer" created="Tue, 24 Aug 2010 07:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#127, #128, #129, #130)&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-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-200] Extend cond to support inline let, much like for</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-200</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I find it occasionally very useful to do a few tests in a cond, then introduce some new symbols (for both clarity and efficiency) that can be referenced in later tests (or matching expressions).  This parallels similar functionality inside the for macro, where the :let keyword is matched against a vector of symbol bindings and forms an implicit let around the remainder of the comprehension.&lt;/p&gt;

&lt;p&gt;I&apos;ll be adding a patch for this shortly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13597">CLJ-200</key>
            <summary>Extend cond to support inline let, much like for</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="markengelberg">Mark Engelberg</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Oct 2009 18:15:00 -0500</created>
                <updated>Sun, 2 Dec 2012 19:35:37 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="23224" author="importer" created="Tue, 24 Aug 2010 13:51:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/200&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/200&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23225" author="importer" created="Tue, 24 Aug 2010 13:51:00 -0500"  >&lt;p&gt;hlship said: Trickier than I thought because cond is really wired into other fundamentals, like let.&lt;/p&gt;</comment>
                    <comment id="23226" author="importer" created="Tue, 24 Aug 2010 13:51:00 -0500"  >&lt;p&gt;cgrand said: Howard, what do you think of &lt;a href=&quot;http://gist.github.com/432712&quot;&gt;http://gist.github.com/432712&lt;/a&gt; ?&lt;/p&gt;</comment>
                    <comment id="30010" author="markengelberg" created="Fri, 23 Nov 2012 02:33:47 -0600"  >&lt;p&gt;Patch cond-let-clauses.diff on 23/Nov/12 adds inline :let clauses to cond, implementing &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-200&quot; title=&quot;Extend cond to support inline let, much like for&quot;&gt;CLJ-200&lt;/a&gt;.  The code is based off of code by cgrand, with some tweaks so the implementation only relies on constructs defined earlier in core.clj, since when cond is defined, things aren&apos;t yet fully bootstrapped.  Also added a test to control.clj.&lt;/p&gt;</comment>
                    <comment id="30012" author="cgrand" created="Fri, 23 Nov 2012 03:06:21 -0600"  >&lt;p&gt;Some comments: the docstring is missing, I believe you don&apos;t have to modify the original cond (except the docstring maybe), just redefine it later on once most of the language is defined &amp;#8211; a bit like what is done for let for example.&lt;/p&gt;

&lt;p&gt;There is still the unlikely eventuality that some code uses :let as :else. What about shipping a cond which complains on keywords (in test position) other than :else? &lt;/p&gt;</comment>
                    <comment id="30014" author="markengelberg" created="Fri, 23 Nov 2012 03:47:24 -0600"  >&lt;p&gt;cond-let-clauses-with-docstring.diff contains the same patches as cond-let-clauses, but includes the original docstring for cond along with an additional sentence about the :let bindings.&lt;/p&gt;</comment>
                    <comment id="30015" author="markengelberg" created="Fri, 23 Nov 2012 03:54:38 -0600"  >&lt;p&gt;Cgrand, I did see your example of redefining cond after most of the language is defined, but since I was able to figure out how to do it in the proper place, that makes the :let bindings available for users of cond downstream and avoids any unforeseen complications that might come from rebinding.  &lt;/p&gt;

&lt;p&gt;As for your other point, I think it is highly improbable that someone would have used :let in the :else position.  However I can imagine someone intentionally using something like :true or :default.  I think the idea of warning for other keywords is actually more likely to cause complications than the unlikely problem it is meant to solve.&lt;/p&gt;

&lt;p&gt;I did resubmit the patch with the docstring restored.  Thanks for pointing out that problem.  I&apos;m excited about this patch &amp;#8211; I use :let bindings within the cond in my own code all the time.  Thanks again for the blog post that started me on that path.&lt;/p&gt;</comment>
                    <comment id="30016" author="cgrand" created="Fri, 23 Nov 2012 04:13:00 -0600"  >&lt;p&gt;True, it&apos;s :unlikely for :let to happen. &lt;br/&gt;
However once :let is officially blessed, it may be better to provision for future other &quot;special&quot; keywords and thus to warn on &quot;unsupported&quot; keywords. Plus it will help out-of-order typists (like myself) to catch earlier a :elt instead of a :let &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;br/&gt;
This is only my point of view. Thanks for trying to get :let in cond supported.&lt;/p&gt;</comment>
                    <comment id="30103" author="jafingerhut" created="Thu, 29 Nov 2012 20:46:50 -0600"  >&lt;p&gt;Mark, could you remove the obsolete earlier patch now that you have added the one with the doc string?  Instructions for removing patches are under the heading &quot;Removing Patches&quot; on 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;</comment>
                    <comment id="30104" author="markengelberg" created="Thu, 29 Nov 2012 22:50:09 -0600"  >&lt;p&gt;Done.&lt;/p&gt;</comment>
                    <comment id="30105" author="jafingerhut" created="Fri, 30 Nov 2012 01:24:13 -0600"  >&lt;p&gt;I haven&apos;t figured out what is going wrong yet.  I can apply the patch cond-let-clauses-with-docstring.diff to the latest Clojure master just fine.  I can do &quot;ant jar&quot; and it will build a jar.  When I do &quot;ant&quot;, it fails with the new test for cond with :let, throwing a StackOverflowException.  I can enter that same form into the REPL and it evaluates just as the test says it should.  I can comment out that new test and all of the rest pass.  But the new test doesn&apos;t pass when inside of the control.clj file.  Anyone know why?&lt;/p&gt;</comment>
                    <comment id="30106" author="cgrand" created="Fri, 30 Nov 2012 04:54:30 -0600"  >&lt;p&gt;It&apos;s because of the brutal replacement performed by test/are: the placeholders for this are form are x and y but in Mark&apos;s test there are used as local names and are tries to substitute them recursively... &lt;br/&gt;
If one changes the local names to a and b for example it works.&lt;/p&gt;</comment>
                    <comment id="30136" author="markengelberg" created="Sun, 2 Dec 2012 08:20:13 -0600"  >&lt;p&gt;cond-let-clauses-fixed-test.diff on 02/Dec/12 contains the same patch, but with the x,y locals in the test case changed to a,b so that it works properly in the are clause which uses x and y.&lt;/p&gt;</comment>
                    <comment id="30137" author="markengelberg" created="Sun, 2 Dec 2012 08:27:48 -0600"  >&lt;p&gt;On Windows, I can&apos;t get Clojure&apos;s test suite task to work, either via ant or maven, which has made it difficult for me to verify the part of the patch that applies to the test suite works as expected; I had tested it as best I could in the REPL, using a version of Clojure built with the patch applied, but using this process, I missed the subtle interaction between are and the locals in the test case.  Sorry about that.  If someone can double-check that the test suite task now works with the newest patch, that would be great, and then I&apos;ll go ahead and remove the obsoleted patch.  Thanks.&lt;/p&gt;</comment>
                    <comment id="30141" author="jafingerhut" created="Sun, 2 Dec 2012 18:29:48 -0600"  >&lt;p&gt;clj-200-cond-let-clauses-fixed-test-v2-patch.txt dated Dec 2 2012 is identical to Mark Engelberg&apos;s cond-let-clauses-fixed-test.diff of the same date, except it applies cleanly to the latest Clojure master.&lt;/p&gt;

&lt;p&gt;I&apos;ve verified that it compiles and passes all tests with latest Clojure master as of this date.&lt;/p&gt;

&lt;p&gt;Mark, I&apos;ve made sure to keep your name in the patch, since you wrote it.  You should be able to remove your two attachments now, so the screener won&apos;t be confused which patch should be examined.&lt;/p&gt;</comment>
                    <comment id="30142" author="jafingerhut" created="Sun, 2 Dec 2012 18:31:37 -0600"  >&lt;p&gt;Mark, besides general issues with Windows not being used much (or maybe not at all?) by Clojure developers, there is the issue right now filed as &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; that not all tests pass when run on Windows due to CR-LF line ending differences that cause several Clojure tests to fail, regardless of whether you use ant or maven to run them.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11735" name="clj-200-cond-let-clauses-fixed-test-v2-patch.txt" size="2280" author="jafingerhut" created="Sun, 2 Dec 2012 18:29:48 -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-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-346] (pprint-newline :fill) is not handled correctly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-346</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Filled pretty printing (where we try to fit as many elements on a line as possible) is being too aggressive as we can see when we try to print the following array:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*print-right-margin* 20&amp;#93;&lt;/span&gt; (pprint (int-array (range 10))))&lt;/p&gt;

&lt;p&gt;Produces:&lt;/p&gt;

&lt;p&gt;[0,&lt;br/&gt;
 1,&lt;br/&gt;
 2,&lt;br/&gt;
 3,&lt;br/&gt;
 4, 5, 6, 7, 8, 9]&lt;/p&gt;

&lt;p&gt;Rather than &lt;/p&gt;

&lt;p&gt;[0, 1, 2, 3, 4,&lt;br/&gt;
 5, 6, 7, 8, 9]&lt;/p&gt;

&lt;p&gt;or something like that. (I haven&apos;t worked through the exact correct representation for this case).&lt;/p&gt;

&lt;p&gt;We currently only use :fill style newlines for native java arrays.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13743">CLJ-346</key>
            <summary>(pprint-newline :fill) is not handled correctly</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="tomfaulhaber">Tom Faulhaber</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 May 2010 09:45:00 -0500</created>
                <updated>Mon, 29 Nov 2010 20:48:05 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23878" author="importer" created="Tue, 24 Aug 2010 08:01:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/346&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/346&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
0347-pprint-update-2.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/diLxv6y4Sr35GVeJe5cbLr/download/diLxv6y4Sr35GVeJe5cbLr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/diLxv6y4Sr35GVeJe5cbLr/download/diLxv6y4Sr35GVeJe5cbLr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23879" author="importer" created="Tue, 24 Aug 2010 08:01:00 -0500"  >&lt;p&gt;stu said: [&lt;a href=&quot;file:diLxv6y4Sr35GVeJe5cbLr&quot;&gt;file:diLxv6y4Sr35GVeJe5cbLr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23880" author="importer" created="Tue, 24 Aug 2010 08:01:00 -0500"  >&lt;p&gt;stu said: The second patch includes the first, and adds another test.&lt;/p&gt;</comment>
                    <comment id="23881" author="importer" created="Tue, 24 Aug 2010 08:01:00 -0500"  >&lt;p&gt;tomfaulhaber said: This patch was attached to the wrong bug. It should be attached to bug #347. There is no fix for this bug yet.&lt;/p&gt;</comment>
                    <comment id="25921" author="richhickey" created="Fri, 5 Nov 2010 08:07:14 -0500"  >&lt;p&gt;Is this current?&lt;/p&gt;</comment>
                    <comment id="25980" author="stu" created="Mon, 29 Nov 2010 20:48:05 -0600"  >&lt;p&gt;Tom, this patch doesn&apos;t apply, and I am not sure why. Can you take a look?&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>tomfaulhaber</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-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-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-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-771] Move unchecked-prim casts to clojure.unchecked</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-771</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Per Rich&apos;s comment in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-767&quot; title=&quot;Remove support for non-primitive bit-shift operations&quot;&gt;&lt;del&gt;CLJ-767&lt;/del&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Moving unchecked coercions into unchecked ns is ok&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
            <key id="14395">CLJ-771</key>
            <summary>Move unchecked-prim casts to clojure.unchecked</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="ataggart">Alexander Taggart</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Apr 2011 14:37:09 -0500</created>
                <updated>Wed, 13 Feb 2013 00:51:11 -0600</updated>
                                    <version>Backlog</version>
                                <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26410" author="ataggart" created="Fri, 29 Apr 2011 15:41:30 -0500"  >&lt;p&gt;Requires that patch on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-782&quot; title=&quot;long cast is not checked for Object decimal types&quot;&gt;&lt;del&gt;CLJ-782&lt;/del&gt;&lt;/a&gt; be applied first.&lt;/p&gt;</comment>
                    <comment id="26478" author="stuart.sierra" created="Tue, 31 May 2011 10:43:16 -0500"  >&lt;p&gt;Applies on master as of commit 66a88de9408e93cf2b0d73382e662624a54c6c86&lt;/p&gt;</comment>
                    <comment id="27433" author="richhickey" created="Fri, 9 Dec 2011 08:40:16 -0600"  >&lt;p&gt;still considering when to incorporate this&lt;/p&gt;</comment>
                    <comment id="28539" author="jszakmeister" created="Sat, 19 May 2012 09:36:48 -0500"  >&lt;p&gt;v2 of the patch applies to master as of commit eccde24c7fb63679f00c64b3c70c03956f0ce2c3&lt;/p&gt;</comment>
                    <comment id="29392" author="jafingerhut" created="Fri, 7 Sep 2012 00:40:07 -0500"  >&lt;p&gt;Patch clj-771-move-unchecked-casts-patch-v3.txt dated Sep 6 2012 is the same as Alexander Taggart&apos;s patch move-unchecked-casts.patch except that it has been updated to apply cleanly to latest Clojure master.&lt;/p&gt;</comment>
                    <comment id="29729" author="jafingerhut" created="Sat, 20 Oct 2012 12:18:27 -0500"  >&lt;p&gt;Patch clj-771-move-unchecked-casts-patch-v4.txt dated Oct 20 2012 is the same as Alexander Taggart&apos;s patch move-unchecked-casts.patch except that it has been updated to apply cleanly to latest Clojure master.&lt;/p&gt;</comment>
                    <comment id="30342" author="jafingerhut" created="Tue, 1 Jan 2013 11:37:00 -0600"  >&lt;p&gt;The patch clj-771-move-unchecked-casts-patch-v4.txt applies cleanly to latest master and passes all tests.  Rich marked this ticket as Incomplete on Dec 9 2011 with the comment &quot;still considering when to incorporate this&quot; above.  Is it reasonable to change it back to Vetted or Screened so it can be considered again, perhaps after Release 1.5 is made?&lt;/p&gt;</comment>
                    <comment id="30582" author="jafingerhut" created="Wed, 13 Feb 2013 00:50:43 -0600"  >&lt;p&gt;Patch clj-771-move-unchecked-casts-patch-v5.txt dated Feb 12 2013 is the same as Alexander Taggart&apos;s patch move-unchecked-casts.patch except that it has been updated to apply cleanly to latest Clojure master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11852" name="clj-771-move-unchecked-casts-patch-v5.txt" size="11956" author="jafingerhut" created="Wed, 13 Feb 2013 00:50:43 -0600" />
                    <attachment id="10213" name="move-unchecked-casts.patch" size="11871" author="ataggart" created="Fri, 29 Apr 2011 15:41:30 -0500" />
                    <attachment id="11235" name="move-unchecked-casts-v2.patch" size="11831" author="jszakmeister" created="Sat, 19 May 2012 09:36:48 -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>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-308] protocol-ize with-open</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-308</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Good use (and documentation example) of protocols: make with-open aware of a Closable protocol for APIs that use a different close convention. See &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/86c87e1fc4b1347c&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/86c87e1fc4b1347c&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13705">CLJ-308</key>
            <summary>protocol-ize with-open</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="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Apr 2010 17:07:00 -0500</created>
                <updated>Fri, 13 Apr 2012 12:52:37 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23685" author="importer" created="Tue, 24 Aug 2010 16:39:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/308&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/308&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27491" author="tsdh" created="Fri, 23 Dec 2011 05:11:06 -0600"  >&lt;p&gt;Added a CloseableResource protocol and extended it on java.io.Closeable (implemented by all Readers, Writers, Streams, Channels, Sockets).  Use it in with-open.&lt;/p&gt;

&lt;p&gt;All tests pass.&lt;/p&gt;</comment>
                    <comment id="27495" author="tsdh" created="Fri, 23 Dec 2011 07:14:55 -0600"  >&lt;p&gt;Seems to be related to Scopes (&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-2&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-2&lt;/a&gt;).&lt;/p&gt;</comment>
                    <comment id="27913" author="tsdh" created="Thu, 8 Mar 2012 03:59:24 -0600"  >&lt;p&gt;Updated patch.&lt;/p&gt;</comment>
                    <comment id="28067" author="jafingerhut" created="Mon, 2 Apr 2012 12:11:36 -0500"  >&lt;p&gt;Patch 0001-Added-ClosableResource-protocol-for-with-open.patch dated 08/Mar/12 applies, builds, and tests cleanly on latest master as of Apr 2 2012.  Tassilo has signed a CA.&lt;/p&gt;</comment>
                    <comment id="28137" author="tsdh" created="Fri, 13 Apr 2012 11:23:26 -0500"  >&lt;p&gt;Updated patch to apply cleanly against master again.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11047" name="0001-Added-ClosableResource-protocol-for-with-open.patch" size="2405" author="tsdh" created="Fri, 13 Apr 2012 11:23: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-107] GC Issue 103: bit-count function</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-107</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 a...@thened.net, Apr 08, 2009

I posted &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; small patch to the mailing list last week but received no
feedback, so I&apos;m attaching it here to make sure it doesn&apos;t get lost.  I
have submitted a CA.

http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/group/clojure/browse_thread/thread/4345f76a12bac6fe/
&lt;/span&gt;
The &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; function bit-count returns the count of 1-bits in a number, like
C&apos;s popcount or Common Lisp&apos;s logcount.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13504">CLJ-107</key>
            <summary>GC Issue 103: bit-count function</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</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 13:59:00 -0500</created>
                <updated>Thu, 15 Nov 2012 20:40:50 -0600</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22781" 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/107&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/107&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
bit-count.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/dqone2w4er3RbzeJe5afGb/download/dqone2w4er3RbzeJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/dqone2w4er3RbzeJe5afGb/download/dqone2w4er3RbzeJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22782" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;oranenj said: [&lt;a href=&quot;file:dqone2w4er3RbzeJe5afGb&quot;&gt;file:dqone2w4er3RbzeJe5afGb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="22783" 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>
                    <comment id="29954" author="jafingerhut" created="Thu, 15 Nov 2012 20:40:14 -0600"  >&lt;p&gt;clj-107-add-bit-count-v1.txt is probably a correct updated version of the old patch linked above.  Added a couple of unit tests.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11681" name="clj-107-add-bit-count-v1.txt" size="1980" author="jafingerhut" created="Thu, 15 Nov 2012 20:40: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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-445] Method/Constructor resolution does not factor in widening conversion of primitive args</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-445</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Problem:&lt;br/&gt;
When making java calls (or inlined functions), if both args and param are primitive, no widening conversion is used to locate the proper overloaded method/constructor.&lt;/p&gt;

&lt;p&gt;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; (&lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt;. (&lt;span class=&quot;code-object&quot;&gt;byte&lt;/span&gt; 0))
java.lang.IllegalArgumentException: No matching ctor found &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; class java.lang.&lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt; (NO_SOURCE_FILE:0)
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
The above occurs because there is no &lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt;(&lt;span class=&quot;code-object&quot;&gt;byte&lt;/span&gt;) constructor, though it should match on &lt;span class=&quot;code-object&quot;&gt;Integer&lt;/span&gt;(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;).
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;user=&amp;gt; (bit-shift-left (&lt;span class=&quot;code-object&quot;&gt;byte&lt;/span&gt; 1) 1)
Reflection warning, NO_SOURCE_PATH:3 - call to shiftLeft can&apos;t be resolved.
2&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the above, a call is made via reflection to Numbers.shiftLeft(Object, Object) and its associated auto-boxing, instead of directly to the perfectly adequate Numbers.shiftLeft(long, int).&lt;/p&gt;

&lt;p&gt;Workarounds:&lt;br/&gt;
Explicitly casting to the formal type.&lt;/p&gt;

&lt;p&gt;Ancillary benefits of fixing:&lt;br/&gt;
It would also reduce the amount of method overloading, e.g., RT.intCast(char), intCast(byte), intCast(short), could all be removed, since such calls would pass to RT.intCast(int).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13842">CLJ-445</key>
            <summary>Method/Constructor resolution does not factor in widening conversion of primitive args</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="ataggart">Alexander Taggart</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Sep 2010 01:02:00 -0500</created>
                <updated>Mon, 20 Feb 2012 14:04:42 -0600</updated>
                                                    <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="24255" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/445&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/445&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
fixbug445.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/b6gDSUZOur36b9eJe5cbCb/download/b6gDSUZOur36b9eJe5cbCb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/b6gDSUZOur36b9eJe5cbCb/download/b6gDSUZOur36b9eJe5cbCb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24256" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;ataggart said: [&lt;a href=&quot;file:b6gDSUZOur36b9eJe5cbCb&quot;&gt;file:b6gDSUZOur36b9eJe5cbCb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="24257" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;ataggart said: Also fixes #446.&lt;/p&gt;</comment>
                    <comment id="26001" author="stu" created="Fri, 3 Dec 2010 12:50:23 -0600"  >&lt;p&gt;The patch is causing a test failure &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] Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.IllegalArgumentException: 
     More than one matching method found: equiv, compiling:(clojure/pprint/cl_format.clj:428)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Can you take a look?&lt;/p&gt;</comment>
                    <comment id="26192" author="stu" created="Fri, 28 Jan 2011 12:30:18 -0600"  >&lt;p&gt;The failing test happens when trying to find the correct equiv for signature &lt;tt&gt;(Number, long)&lt;/tt&gt;. Is the compiler wrong to propose this signature, or is the resolution method wrong in not having an answer? (It thinks two signatures are tied: &lt;tt&gt;(Object, long)&lt;/tt&gt; and &lt;tt&gt;(Number, Number)&lt;/tt&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;Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.IllegalArgumentException: More than one matching method found: equiv, compiling:(clojure/pprint/cl_format.clj:428)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6062)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6050)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.access$100(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:35)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5492)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2372)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$InvokeExpr.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:3277)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6057)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2385)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2385)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$FnMethod.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:4667)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$FnExpr.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:3397)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6053)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.access$100(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:35)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$DefExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:480)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.eval(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6114)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.load(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6545)
	at clojure.lang.RT.loadResourceScript(RT.java:340)
	at clojure.lang.RT.loadResourceScript(RT.java:331)
	at clojure.lang.RT.load(RT.java:409)
	at clojure.lang.RT.load(RT.java:381)
	at clojure.core$load$fn__1427.invoke(core.clj:5308)
	at clojure.core$load.doInvoke(core.clj:5307)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.pprint$eval3969.invoke(pprint.clj:46)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.eval(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6110)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.load(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6545)
	at clojure.lang.RT.loadResourceScript(RT.java:340)
	at clojure.lang.RT.loadResourceScript(RT.java:331)
	at clojure.lang.RT.load(RT.java:409)
	at clojure.lang.RT.load(RT.java:381)
	at clojure.core$load$fn__1427.invoke(core.clj:5308)
	at clojure.core$load.doInvoke(core.clj:5307)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.core$load_one.invoke(core.clj:5132)
	at clojure.core$load_lib.doInvoke(core.clj:5169)
	at clojure.lang.RestFn.applyTo(RestFn.java:143)
	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:77)
	at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
	at clojure.core$apply.invoke(core.clj:602)
	at clojure.core$load_libs.doInvoke(core.clj:5203)
	at clojure.lang.RestFn.applyTo(RestFn.java:138)
	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:77)
	at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
	at clojure.core$apply.invoke(core.clj:604)
	at clojure.core$use.doInvoke(core.clj:5283)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.main$repl.doInvoke(main.clj:196)
	at clojure.lang.RestFn.invoke(RestFn.java:422)
	at clojure.main$repl_opt.invoke(main.clj:267)
	at clojure.main$main.doInvoke(main.clj:362)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.lang.Var.invoke(Var.java:401)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.Var.applyTo(Var.java:518)
	at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: More than one matching method found: equiv
	at clojure.lang.Reflector.getMatchingParams(Reflector.java:639)
	at clojure.lang.Reflector.getMatchingParams(Reflector.java:578)
	at clojure.lang.Reflector.getMatchingMethod(Reflector.java:569)
	at 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:1439)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$HostExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:896)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	... 115 more&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="26214" author="ataggart" created="Tue, 8 Feb 2011 18:27:03 -0600"  >&lt;p&gt;In working on implementing support for vararg methods, I found a number of flaws with the previous solutions.  Please disregard them.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a single patch (reflector-compiler-numbers.diff) which is a rather substantial overhaul of the Reflector code, with some enhancements to the Compiler and Numbers code.  &lt;/p&gt;

&lt;p&gt;The patch notes:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Moved reflection functionality from Compiler to Reflector.&lt;/li&gt;
	&lt;li&gt;Reflector supports finding overloaded methods by widening conversion, boxing conversion, and casting.&lt;/li&gt;
	&lt;li&gt;During compilation Reflector attempts to find best wildcard match.&lt;/li&gt;
	&lt;li&gt;Reflector refers to &lt;tt&gt;&amp;#42;unchecked-math*&lt;/tt&gt; when reflectively invoking methods and constructors.&lt;/li&gt;
	&lt;li&gt;Both Reflector and Compiler support variable arity java methods and constructor; backwards compatible with passing an array or nil in the vararg slot.&lt;/li&gt;
	&lt;li&gt;Added more informative error messages to Reflector.&lt;/li&gt;
	&lt;li&gt;Added tests to clojure.test-clojure.reflector.&lt;/li&gt;
	&lt;li&gt;Altered overloaded functions of clojure.lang.Numbers to service Object/double/long params; fixes some ambiguity issues and avoids unnecessary boxing in some cases.&lt;/li&gt;
	&lt;li&gt;Patch closes issues 380, 440, 445, 666, and possibly 259 (not enough detail provided).&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="26215" author="ataggart" created="Thu, 10 Feb 2011 19:35:57 -0600"  >&lt;p&gt;Updated patch to fix a bug where a concrete class with multiple identical Methods (e.g., one from an interface, another from an abstract class) would result in ambiguity.  Now resolved by arbitrary selection (this is what the original code did as well albeit not explicitly).&lt;/p&gt;</comment>
                    <comment id="26245" author="ataggart" created="Fri, 25 Feb 2011 21:29:21 -0600"  >&lt;p&gt;Updated patch to work with latest master branch.&lt;/p&gt;</comment>
                    <comment id="26289" author="stu" created="Sun, 6 Mar 2011 13:54:58 -0600"  >&lt;p&gt;patch appears to be missing test file clojure/test_clojure/reflector.clj.&lt;/p&gt;</comment>
                    <comment id="26290" author="ataggart" created="Sun, 6 Mar 2011 14:39:37 -0600"  >&lt;p&gt;Bit by git.&lt;/p&gt;

&lt;p&gt;Patch corrected to contain clojure.test-clojure.reflector.&lt;/p&gt;</comment>
                    <comment id="26300" author="stu" created="Fri, 11 Mar 2011 10:30:59 -0600"  >&lt;p&gt;Rich: I verified that the patch applied but reviewed only briefly, knowing you will want to go over this one closely.&lt;/p&gt;</comment>
                    <comment id="26301" author="stu" created="Fri, 11 Mar 2011 10:55:21 -0600"  >&lt;p&gt;After applying this patch, I am getting method missing 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;java.lang.NoSuchMethodError: clojure.lang.Numbers.lt(JLjava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but only when using compiled code, e.g. the same code works in the REPL and then fails after compilation. Haven&apos;t been able to isolate an example that I can share here yet, but hoping this will cause someone to have an &quot;a, hah&quot; moment...&lt;/p&gt;</comment>
                    <comment id="26341" author="ataggart" created="Sat, 2 Apr 2011 12:55:14 -0500"  >&lt;p&gt;The patch now contains only the minimal changes needed to support widening conversion. Cleanup of Numbers overloads, etc., can wait until this patch gets applied.  The vararg support is in a separate patch on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-440&quot; title=&quot;java method calls cannot omit varargs&quot;&gt;CLJ-440&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="26370" author="redinger" created="Fri, 15 Apr 2011 12:50:43 -0500"  >&lt;p&gt;Please test patch&lt;/p&gt;</comment>
                    <comment id="26377" author="redinger" created="Thu, 21 Apr 2011 11:02:31 -0500"  >&lt;p&gt;FYI: Patch applies cleanly on master and all tests pass as of 4/21 (2011)&lt;/p&gt;</comment>
                    <comment id="26384" author="redinger" created="Fri, 22 Apr 2011 09:57:18 -0500"  >&lt;p&gt;This work is too big to take into the 1.3 beta right now. We&apos;ll revisit for a future release.&lt;/p&gt;</comment>
                    <comment id="26399" author="ataggart" created="Thu, 28 Apr 2011 13:19:50 -0500"  >&lt;p&gt;To better facilitate understanding of the changes, I&apos;ve broken them up into two patches, each with a number of isolable, incremental commits:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;reorg-reflector.patch:&lt;/b&gt; Moves the reflection/invocation code from Compiler to Reflector, and eliminates redundant code.  The result is a single code base for resolving methods/constructors, which will allow for altering that mechanism without excess external coordination.  &lt;em&gt;This contains no behaviour changes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;prim-conversion.patch:&lt;/b&gt; Depends on the above. Alters the method/constructor resolution process:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;more consistent with java resolution, especially when calling pre-1.5 APIs&lt;/li&gt;
	&lt;li&gt;adds support for widening conversion of primitive numerics of the same category (this is more strict than java, and more clojuresque)&lt;/li&gt;
	&lt;li&gt;adds support for wildcard matches at compile-time (i.e., you don&apos;t need to type-hint every arg to avoid reflection).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also provides a base to add further features, e.g., &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-666&quot; title=&quot;Add support for Big* numeric types to Reflector&quot;&gt;CLJ-666&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="26406" author="ataggart" created="Fri, 29 Apr 2011 15:01:22 -0500"  >&lt;p&gt;It&apos;s documented in situ, but here are the conversion rules that the reflector uses to find methods:&lt;/p&gt;


&lt;ol&gt;
	&lt;li&gt;By Type:
	&lt;ul&gt;
		&lt;li&gt;object to ancestor type&lt;/li&gt;
		&lt;li&gt;primitive to a wider primitive of the same numeric category (new)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Boxing:
	&lt;ul&gt;
		&lt;li&gt;boxed number to its primitive&lt;/li&gt;
		&lt;li&gt;boxed number to a wider primitive of the same numeric category (new for Short and Byte args)&lt;/li&gt;
		&lt;li&gt;primitive to its boxed value&lt;/li&gt;
		&lt;li&gt;primitive to Number or Object (new)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Casting:
	&lt;ul&gt;
		&lt;li&gt;long to int&lt;/li&gt;
		&lt;li&gt;double to float&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26428" author="ataggart" created="Tue, 10 May 2011 15:13:33 -0500"  >&lt;p&gt;prim-conversion-update-1.patch applies to current master.&lt;/p&gt;</comment>
                    <comment id="26429" author="ataggart" created="Wed, 11 May 2011 14:15:13 -0500"  >&lt;p&gt;Created &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-792&quot; title=&quot;Refactor method resolution code out of Compiler and into Reflector&quot;&gt;CLJ-792&lt;/a&gt; for the reflector reorg.&lt;/p&gt;</comment>
                    <comment id="27753" author="stuart.sierra" created="Fri, 17 Feb 2012 14:29:42 -0600"  >&lt;p&gt;prim-conversion-update-1.patch does not apply as of f5bcf64. &lt;/p&gt;

&lt;p&gt;Is &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-792&quot; title=&quot;Refactor method resolution code out of Compiler and into Reflector&quot;&gt;CLJ-792&lt;/a&gt; now a prerequisite of this ticket?&lt;/p&gt;</comment>
                    <comment id="27758" author="ataggart" created="Fri, 17 Feb 2012 15:15:17 -0600"  >&lt;p&gt;Yes, after the original patch was deemed &quot;too big&quot;.&lt;/p&gt;

&lt;p&gt;After this much time with no action from TPTB, feel free to kill both tickets.&lt;/p&gt;</comment>
                    <comment id="27778" author="jafingerhut" created="Mon, 20 Feb 2012 14:04:42 -0600"  >&lt;p&gt;Again, not sure if this is any help, but I&apos;ve tested starting from Clojure head as of Feb 20, 2012, applying clj-792-reorg-reflector-patch2.txt attached to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-792&quot; title=&quot;Refactor method resolution code out of Compiler and into Reflector&quot;&gt;CLJ-792&lt;/a&gt;, and then applying clj-445-prim-conversion-update-2-patch.txt attached to this ticket, and the result compiles and passes all but 2 tests.  I don&apos;t know whether those failures are easy to fix or not, or whether issues may have been introduced with these patches.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10932" name="clj-445-prim-conversion-update-2-patch.txt" size="36531" author="jafingerhut" created="Mon, 20 Feb 2012 14:04:42 -0600" />
                    <attachment id="10205" name="prim-conversion.patch" size="36375" author="ataggart" created="Fri, 29 Apr 2011 06:43:21 -0500" />
                    <attachment id="10225" name="prim-conversion-update-1.patch" size="36473" author="ataggart" created="Tue, 10 May 2011 15:13:33 -0500" />
                    <attachment id="10203" name="reorg-reflector.patch" size="73345" author="ataggart" created="Thu, 28 Apr 2011 13:19:50 -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>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-862] pmap level of parallelism inconsistent for chunked vs non-chunked input</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-862</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The code of pmap creates futures for the set of map operations it needs to perform with (map #(future %) coll), then acts on that sequence in a fashion obviously intended to keep only #CPUs+2 unfinished futures realized at any given time.  It works exactly this way for non-chunked input seqs, but when pmap is passed a chunked seq, the seq of futures also becomes chunked.  This causes an arbitrary number of futures to be realized as the #CPUs+2 window and chunk-size window interact.&lt;/p&gt;

&lt;p&gt;The doc-string for pmap doesn&apos;t promise any particular level of parallelism, but I think the inconsistent parallelism for chunked vs non-chunked input comprises a bug.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14805">CLJ-862</key>
            <summary>pmap level of parallelism inconsistent for chunked vs non-chunked input</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="jim.blomo">Jim Blomo</assignee>
                                <reporter username="llasram">Marshall T. Vandegrift</reporter>
                        <labels>
                    </labels>
                <created>Sun, 23 Oct 2011 09:50:38 -0500</created>
                <updated>Sat, 20 Oct 2012 00:45:48 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27093" author="stu" created="Tue, 25 Oct 2011 18:51:55 -0500"  >&lt;p&gt;Next person to take a deep look at pmap should probably also think through fork/join.&lt;/p&gt;</comment>
                    <comment id="28533" author="jim.blomo" created="Sat, 19 May 2012 00:31:23 -0500"  >&lt;p&gt;fork/join is a Java 7 feature. Would a proposed patch need to be able to fall back to Java 5 features?&lt;/p&gt;</comment>
                    <comment id="28535" author="jafingerhut" created="Sat, 19 May 2012 01:06:37 -0500"  >&lt;p&gt;Clojure/core folks can say more authoritatively, but I believe with the recent reduce enhancements that rely on jsr166 code, Clojure 1.5 will most likely require Java 6 or later, and Java 5 will no longer be supported.&lt;/p&gt;</comment>
                    <comment id="28630" author="jim.blomo" created="Mon, 28 May 2012 17:29:01 -0500"  >&lt;p&gt;Spinning up more threads than CPU cores is not a good idea when the work is CPU bound.  Currently (1.4) pmap uses an unbounded thread pool, so chunked sequences will create more threads than intended.  The least invasive change is to use a fixed sized thread pool (ForkJoinPool being one example).  pmap is differentiated from core.reducers by the fact that it is lazy.  This implies a one-at-a-time ThreadPool.submit model, instead of the recursive fork/join model.  Tradeoffs include:&lt;/p&gt;

&lt;p&gt;Enforce look-ahead even on chunked sequences:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;+ no threadPool changes&lt;/li&gt;
	&lt;li&gt;- working against chunking, which is presumably being used for a reason&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Move to a fixed size thread pool:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;+ reduce contention for cpu-bound functions on chunked sequences&lt;/li&gt;
	&lt;li&gt;- increase total realization time for io-bound functions&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Use ForkJoinPool for fixed thread pool (instead of newFixedThreadPool):&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;+ automatic and dynamic parallelism&lt;/li&gt;
	&lt;li&gt;- more complex setup (picking Java 6 vs 7 implementation, sharing pool with core.reducers)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think using a traditional fixed size thread pool is the right option.  Most of the time all of pmap&apos;s results will be realized, so I don&apos;t think it&apos;s worth saving work by being strict about the look-ahead size.  This is also the decision map has made.  Since we&apos;re not using ForkJoin&apos;s main strength (recursive work queuing), I don&apos;t think it is worth setting it up in clojure.core.&lt;/p&gt;

&lt;p&gt;I&apos;ll use Agent/pooledExecutor as the fixed size thread.&lt;/p&gt;

&lt;p&gt;Let me know if I forgot or misunderstood anything.&lt;/p&gt;</comment>
                    <comment id="28637" author="jim.blomo" created="Mon, 28 May 2012 19:59:01 -0500"  >&lt;p&gt;2012-05-28 pmap-chunking-862.diff uses a fixed size thread pool for pmap functions.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11265" name="pmap-chunking-862.diff" size="2825" author="jim.blomo" created="Mon, 28 May 2012 19:59: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="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-889] Specifically allow &apos;.&apos; inside keywords</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-889</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The documentation for keywords (on page &lt;a href=&quot;http://clojure.org/reader&quot;&gt;http://clojure.org/reader&lt;/a&gt;) specifically states that &apos;.&apos; is not allowed as part of a keyword name; however &apos;.&apos; is specifically useful.  For example, several web frameworks for Clojure use keywords to represent HTML elements, using CSS selector syntax (i.e., :div.important is equivalent to &amp;lt;div class=&apos;important&apos;&amp;gt;).&lt;/p&gt;

&lt;p&gt;In any case, the use of &apos;.&apos; is not checked by the reader and it is generally useful.&lt;/p&gt;

&lt;p&gt;I would like to see &apos;.&apos; officially allowed (in the documentation).  Further, I&apos;d like to see additional details about which punctuation characters are allowed (my own web framework uses &apos;&amp;amp;&apos;, &apos;?&apos; and &apos;&amp;gt;&apos; inside keywords for various purposes ... again, current reader implementation does not forbid this, but if a future reader will reject it, I&apos;d like to know now).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15043">CLJ-889</key>
            <summary>Specifically allow &apos;.&apos; inside keywords</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>keywords</label>
                        <label>reader</label>
                    </labels>
                <created>Thu, 1 Dec 2011 11:09:04 -0600</created>
                <updated>Mon, 15 Apr 2013 05:56:25 -0500</updated>
                                                    <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="27427" author="hlewisship" created="Thu, 8 Dec 2011 15:37:26 -0600"  >&lt;p&gt;To clarify, Hiccup and Cascade both use keywords containing &apos;#&apos; and &apos;.&apos;  Cascade goes further, using &apos;&amp;amp;&apos; (to represent HTML entities), &apos;&amp;gt;&apos;, and (possibly in the future) &apos;?&apos;.&lt;/p&gt;</comment>
                    <comment id="29735" author="devn" created="Sat, 20 Oct 2012 18:46:53 -0500"  >&lt;p&gt;I think the EDN spec mitigates some of the concern, but as of yet the official clojure.org reader documentation does not reflect the language used in the description of EDN. Where does EDN stand right now? Can the description being used on the github page be pulled over to clojure.org?&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/edn-format/edn#keywords&quot;&gt;https://github.com/edn-format/edn#keywords&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://clojure.org/reader#The&quot;&gt;http://clojure.org/reader#The&lt;/a&gt; Reader--extensible data notation (edn)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="30962" author="hlewisship" created="Mon, 15 Apr 2013 05:56:25 -0500"  >&lt;p&gt;Unfortunately, the EDN specification does not mention &apos;&amp;gt;&apos;.&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-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-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-1161] sources jar has bad versions.properties resource</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1161</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The &quot;sources&quot; jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:&lt;/p&gt;

&lt;p&gt;version=${version}&lt;/p&gt;

&lt;p&gt;The regular Clojure jar has the correct version string in that resource.&lt;/p&gt;

&lt;p&gt;I came across a problem when I was experimenting with the sources jar (as used by IDEs).  I naively added the sources jar to my classpath, and Clojure died on start up.  The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16001">CLJ-1161</key>
            <summary>sources jar has bad versions.properties resource</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="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Mon, 11 Feb 2013 10:03:01 -0600</created>
                <updated>Fri, 12 Apr 2013 09:36:58 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.5</fixVersion>
                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30577" author="steveminer@gmail.com" created="Mon, 11 Feb 2013 10:04:27 -0600"  >&lt;p&gt;Notes from the dev mailing list:&lt;/p&gt;

&lt;p&gt;The &quot;sources&quot; JAR is generated by another Maven plugin, configured here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181&quot;&gt;https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The simplest solution might be to just exclude the file from the sources jar. It looks like maven-source-plugin has an excludes option which would do the trick:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes&quot;&gt;http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11861" name="0001-CLJ-1161-Remove-version.properties-from-sources-JAR.patch" size="1099" author="stuart.sierra" created="Sat, 16 Feb 2013 15:19:33 -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-1018] range&apos;s behavior is inconsistent</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1018</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Problem statement: The current behavior of range is inconsistent. (range 0 9 0) has always produced (). (range 0 9 -1) has always produced (). (range 9 0 1) has always produced (). However, (range 9 0 0) produces (9 9 9 9 ...), and (range 0 0 0) produces &apos;(0 0 0 0 ...)&lt;/p&gt;

&lt;p&gt;Proposal: Make the behavior of range consistent when using a step of 0 to make it produce an empty list.&lt;/p&gt;

&lt;p&gt;Please see attached code and patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15557">CLJ-1018</key>
            <summary>range&apos;s behavior is inconsistent</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="devn">Devin Walters</reporter>
                        <labels>
                        <label>patch</label>
                        <label>range</label>
                    </labels>
                <created>Fri, 29 Jun 2012 16:25:03 -0500</created>
                <updated>Fri, 12 Apr 2013 09:59:12 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <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>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28925" author="mikera" created="Sun, 1 Jul 2012 04:08:00 -0500"  >&lt;p&gt;Agree it is good to fix the inconsistency, but I think an infinite sequence of zeros is the correct result, as implied by the current docstring definition.&lt;/p&gt;

&lt;p&gt;It&apos;s also mathematically cleanest: range should produce an arithmetic progression until the end value is equalled or exceeded.&lt;/p&gt;

&lt;p&gt;Empty lists only seem to make sense as a return value when start &amp;gt;= end.&lt;/p&gt;</comment>
                    <comment id="28928" author="devn" created="Sun, 1 Jul 2012 12:36:08 -0500"  >&lt;p&gt;Hi Mike,&lt;/p&gt;

&lt;p&gt;Could you explain how you think the docstring definition implies this behavior? Maybe I&apos;m missing something, but I was surprised. For instance, in the case of (range 3 9 0), if start were truly inclusive as the docstring says, the result would be (3), not ().&lt;/p&gt;

&lt;p&gt;You mentioned that you think the infinite sequence of 0&apos;s is consistent and in keeping with the definition of range. I&apos;m not sure I agree. (0,0] is an empty set of length zero, and [0,0) is an empty set of length zero.&lt;/p&gt;

&lt;p&gt;You state that empty list only makes sense for start &amp;gt;= end, except this is not the current behavior. Could you help me understand what you believe the appropriate behavior would be in each of the following three cases? (range 0 10 0), (range 10 0 0), and (range 0 0 0)?&lt;/p&gt;

&lt;p&gt;A few options to consider:&lt;br/&gt;
1) Fix the docstring to reflect the actual behavior of range.&lt;br/&gt;
2) Handle the case of (range 9 3 0) =&amp;gt; (9 9 9 ...) to make it consistent with the behavior of (range 3 9 0) =&amp;gt; ()&lt;br/&gt;
3) Stop allowing a step of zero altogether.&lt;/p&gt;

&lt;p&gt;Editing to Add (Note: I don&apos;t think the way someone else did something is always the right way, just wanted to do some digging on how other people have handled this in the past):&lt;br/&gt;
&lt;a href=&quot;http://docs.python.org/library/functions.html#range&quot;&gt;http://docs.python.org/library/functions.html#range&lt;/a&gt; (0 step returns ValueError)&lt;br/&gt;
&lt;a href=&quot;http://www2.tcl.tk/10797&quot;&gt;http://www2.tcl.tk/10797&lt;/a&gt; (range returns empty list for a zero step)&lt;br/&gt;
&lt;a href=&quot;http://www.scala-lang.org/api/2.7.7/scala/Range.html&quot;&gt;http://www.scala-lang.org/api/2.7.7/scala/Range.html&lt;/a&gt; (zero step is not allowed)&lt;/p&gt;</comment>
                    <comment id="28956" author="jimpil" created="Thu, 5 Jul 2012 16:13:22 -0500"  >&lt;p&gt;It does make sense NOT to allow a step of zero (at least to me)... I wasn&apos;t going to say anything about this but if other popular languages do not allow 0, then I guess it makes more sense than I originally gave myself credit for... However, if we want to be mathematically correct then the answer would be to return an infinte seq with the start value like below. After all, what  is a step of 0? does it  make any difference how many steps you take if with every step you cover 0 distance? obviously not...you start from x and you stay at x forever...we do have repeat for this sort of thing though... &lt;/p&gt;

&lt;p&gt;(take 5 (range 3 9 0)) =&amp;gt; (3 3 3 3 3)&lt;/p&gt;

&lt;p&gt;+1 for not allowing 0 step&lt;/p&gt;</comment>
                    <comment id="28958" author="mikera" created="Sun, 8 Jul 2012 08:49:11 -0500"  >&lt;p&gt;@Devin quite simple: a lazy sequence of nums starting from x with step 0.0 until it reaches an end value of y (where y &amp;gt; x) is an infinite sequence of x.&lt;/p&gt;

&lt;p&gt;Consider the case where start is 0 and end is infinity (the default), you would expect sequences to go as follows:&lt;/p&gt;

&lt;p&gt;step +2 : 0  2  4  6  8....&lt;br/&gt;
step +1 : 0  1  2  3  4....&lt;br/&gt;
step +0 : 0  0  0  0  0....&lt;/p&gt;

&lt;p&gt;It would be inconsistent to make 0 a special case, all of these are valid arithmetic progressions. And all of these are consistent with the current docstring.&lt;/p&gt;

&lt;p&gt;If you make 0 a special case, then people will need to write special case code to handle it. Consider the code to create a multiplication table for example:&lt;/p&gt;

&lt;p&gt;(for &lt;span class=&quot;error&quot;&gt;&amp;#91;x (range 10)&amp;#93;&lt;/span&gt;&lt;br/&gt;
     (take 10 (range 0 Long/MAX_VALUE x)))&lt;/p&gt;

&lt;p&gt;This works fine if you produce an infinite sequence of zeros for step 0, but fails if you create an empty list as a special case for step 0.&lt;/p&gt;

&lt;p&gt;As a related issue, I&apos;d personally also favour negative step sizes also producing an infinite sequence. If we don&apos;t want to allow this though, then at least the docstring should be changed to say &quot;a lazy seq of non-decreasing nums&quot; and a negative step should throw an error.&lt;/p&gt;</comment>
                    <comment id="28959" author="devn" created="Mon, 9 Jul 2012 19:09:16 -0500"  >&lt;p&gt;Carrying over a message from the clojure-dev list by Stuart Sierra:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I called the ticket a defect. Does that seem reasonable?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;yes&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Does anyone actually use the 0 step behavior in their programs?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;not if they have any sense&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Has anyone been bitten by this in the past?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;not me&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Is this behavior intentional for some historical reason I don&apos;t know about or understand?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I doubt it.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Has this been brought up before? I couldn&apos;t find any reference to it via Google.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Not that I know of.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Are there performance implications to my patch?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I doubt it. Lazy seqs are not ideal for high-performance code anyway.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Am I addressing a symptom rather than the problem?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think the &lt;b&gt;problem&lt;/b&gt; is that the result of `range` with a step of 0 was never specified. Don&apos;t assume that the tests are specifications. Many of the tests in Clojure were written by over-eager volunteers who defined the tests based on whatever the behavior happened to be. The only specification from the language designer is the docstring. By my reading, that means that `range` with a step of 0 should return an infinite seq of the start value, unless the start and end values are equal.&lt;/p&gt;

&lt;p&gt;-S&lt;/p&gt;</comment>
                    <comment id="28960" author="devn" created="Mon, 9 Jul 2012 19:10:24 -0500"  >&lt;p&gt;Carrying over a message by Michal Marczyk:&lt;/p&gt;

&lt;p&gt;With a negative step, the comparison is reversed, so that e.g.&lt;/p&gt;

&lt;p&gt;(range 3 0 -1)&lt;/p&gt;

&lt;p&gt;evaluates to&lt;/p&gt;

&lt;p&gt;(3 2 1)&lt;/p&gt;

&lt;p&gt;I think this is the useful behaviour; the docstring should perhaps be&lt;br/&gt;
adjusted to match it.&lt;/p&gt;

&lt;p&gt;Agreed on zero step.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Micha&#322;&lt;/p&gt;</comment>
                    <comment id="29014" author="devn" created="Fri, 20 Jul 2012 17:10:19 -0500"  >&lt;p&gt;Adding a new patch after hearing comments. This patch makes (range 9 3 0) =&amp;gt; (9 9 9 9 ...), (range 3 9 0) =&amp;gt; (3 3 3 3 ...), and () will be returned when (= start end). Also updated the docstring.&lt;/p&gt;</comment>
                    <comment id="30065" author="halgari" created="Tue, 27 Nov 2012 15:01:11 -0600"  >&lt;p&gt;Marking as vetted&lt;/p&gt;</comment>
                    <comment id="30066" author="halgari" created="Tue, 27 Nov 2012 15:04:24 -0600"  >&lt;p&gt;Patch applies cleanly. We&apos;ve discussed this issue to death (for as simple as it is). I think it&apos;s time to mark it as screened. &lt;/p&gt;</comment>
                    <comment id="30067" author="halgari" created="Tue, 27 Nov 2012 15:06:27 -0600"  >&lt;p&gt;For some reason I&apos;m not allowed to edit the attachments list. When you apply the patch, please apply inconsistent_range_fix.diff as that is the most recent version of the fix. &lt;/p&gt;</comment>
                    <comment id="30194" author="richhickey" created="Sun, 9 Dec 2012 06:44:10 -0600"  >&lt;p&gt;As someone who has to read these tickets, I&apos;d really appreciate it if you could keep the description up to date and accurate, with examples of the current and intended behavior and the strategy to be used in fixing. I can&apos;t follow every thread to see what the latest thinking is, especially on a patch like this where the original mission was changed.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="30207" author="devn" created="Mon, 10 Dec 2012 15:53:31 -0600"  >&lt;p&gt;@Tim: I&apos;ve removed the other attachments.&lt;/p&gt;

&lt;p&gt;@Rich: Understood. I will update the description this evening.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11393" name="inconsistent_range_fix.diff" size="1944" author="devn" created="Fri, 20 Jul 2012 17:10:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

                </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-1160] reducers/mapcat ignores Reduced</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1160</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following code throws an exception:&lt;/p&gt;

&lt;p&gt;(-&amp;gt;&amp;gt; (concat (range 100) (lazy-seq (throw (Exception. &quot;Too eager&quot;))))&lt;br/&gt;
             (r/mapcat (juxt inc str))&lt;br/&gt;
             (r/take 5)&lt;br/&gt;
             (into []))&lt;/p&gt;

&lt;p&gt;This is because r/mapcat introduces an intermediate reduce which swallows the reduced value coming from r/take.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16000">CLJ-1160</key>
            <summary>reducers/mapcat ignores Reduced</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="cgrand">Christophe Grand</assignee>
                                <reporter username="cgrand">Christophe Grand</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Feb 2013 08:38:36 -0600</created>
                <updated>Fri, 1 Mar 2013 09:40:09 -0600</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="11846" name="lazy-rmapcat.diff" size="1747" author="cgrand" created="Mon, 11 Feb 2013 08:38:36 -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-1005] Use transient map in zipmap</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1005</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The attached patch changes zipmap to use a transient map internally. The definition is also moved so that it resides below that of #&apos;transient. The original definition is commented out (like that of #&apos;into).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15491">CLJ-1005</key>
            <summary>Use transient map in zipmap</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="aaron">Aaron Bedra</assignee>
                                <reporter username="michalmarczyk">Micha&#322; Marczyk</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 May 2012 02:55:43 -0500</created>
                <updated>Thu, 11 Apr 2013 18:19:28 -0500</updated>
                                    <version>Release 1.6</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29156" author="aaron" created="Tue, 14 Aug 2012 21:24:43 -0500"  >&lt;p&gt;Why is the old implementation left and commented out? If we are going to move to a new implementation, the old one should be removed.&lt;/p&gt;</comment>
                    <comment id="29164" author="michalmarczyk" created="Wed, 15 Aug 2012 04:17:00 -0500"  >&lt;p&gt;As mentioned in the ticket description, the previously attached patch follows the pattern of into whose non-transient-enabled definition is left in core.clj with a #_ in front &amp;#8211; I wasn&apos;t sure if that&apos;s something desirable in all cases.&lt;/p&gt;

&lt;p&gt;Here&apos;s a new patch with the old impl removed.&lt;/p&gt;</comment>
                    <comment id="29170" author="jafingerhut" created="Wed, 15 Aug 2012 10:37:04 -0500"  >&lt;p&gt;Thanks for the updated patch, Michal.  Sorry to raise such a minor issue, but would you mind using a different name for the updated patch?  I know JIRA can handle multiple attached files with the same name, but my prescreening code isn&apos;t quite that talented yet, and it can lead to confusion when discussing patches.&lt;/p&gt;</comment>
                    <comment id="29171" author="michalmarczyk" created="Wed, 15 Aug 2012 10:42:40 -0500"  >&lt;p&gt;Thanks for the heads-up, Andy! I&apos;ve reattached the new patch under a new name.&lt;/p&gt;</comment>
                    <comment id="29197" author="jafingerhut" created="Thu, 16 Aug 2012 20:24:44 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete back to None after the Michal&apos;s updated patch was added, addressing the reason the ticket was marked incomplete.&lt;/p&gt;</comment>
                    <comment id="30930" author="aaron" created="Thu, 11 Apr 2013 17:32:24 -0500"  >&lt;p&gt;The patch looks good and applies cleanly. Are there additional tests that we should run to verify that this is providing the improvement we think it is. Also, is there a discussion somewhere that started this ticket? There isn&apos;t a lot of context here.&lt;/p&gt;</comment>
                    <comment id="30932" author="michalmarczyk" created="Thu, 11 Apr 2013 18:19:28 -0500"  >&lt;p&gt;Hi Aaron,&lt;/p&gt;

&lt;p&gt;Thanks for looking into this!&lt;/p&gt;

&lt;p&gt;From what I&apos;ve been able to observe, this change hugely improves &lt;tt&gt;zipmap&lt;/tt&gt; times for large maps. For small maps, there is a small improvement. Here are two basic Criterium benchmarks (&lt;tt&gt;transient-zipmap&lt;/tt&gt; defined at the REPL as in the patch):&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;;;; large map
user=&amp;gt; (def xs (range 16384))
#&apos;user/xs
user=&amp;gt; (last xs)
16383
user=&amp;gt; (c/bench (zipmap xs xs))
Evaluation count : 13920 in 60 samples of 232 calls.
             Execution time mean : 4.329635 ms
    Execution time std-deviation : 77.791989 us
   Execution time lower quantile : 4.215050 ms ( 2.5%)
   Execution time upper quantile : 4.494120 ms (97.5%)
nil
user=&amp;gt; (c/bench (transient-zipmap xs xs))
Evaluation count : 21180 in 60 samples of 353 calls.
             Execution time mean : 2.818339 ms
    Execution time std-deviation : 110.751493 us
   Execution time lower quantile : 2.618971 ms ( 2.5%)
   Execution time upper quantile : 3.025812 ms (97.5%)

Found 2 outliers in 60 samples (3.3333 %)
	low-severe	 2 (3.3333 %)
 Variance from outliers : 25.4675 % Variance is moderately inflated by outliers
nil

;;; small map
user=&amp;gt; (def ys (range 16))
#&apos;user/ys
user=&amp;gt; (last ys)
15
user=&amp;gt; (c/bench (zipmap ys ys))
Evaluation count : 16639020 in 60 samples of 277317 calls.
             Execution time mean : 3.803683 us
    Execution time std-deviation : 88.431220 ns
   Execution time lower quantile : 3.638146 us ( 2.5%)
   Execution time upper quantile : 3.935160 us (97.5%)
nil
user=&amp;gt; (c/bench (transient-zipmap ys ys))
Evaluation count : 18536880 in 60 samples of 308948 calls.
             Execution time mean : 3.412992 us
    Execution time std-deviation : 81.338284 ns
   Execution time lower quantile : 3.303888 us ( 2.5%)
   Execution time upper quantile : 3.545549 us (97.5%)
nil
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Clearly the semantics are preserved provided transients satisfy their contract.&lt;/p&gt;

&lt;p&gt;I think I might not have started a ggroup thread for this, sorry.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11432" name="0001-Use-transient-map-in-zipmap.2.patch" size="1722" author="michalmarczyk" created="Wed, 15 Aug 2012 10:40:53 -0500" />
                    <attachment id="11269" name="0001-Use-transient-map-in-zipmap.patch" size="1281" author="michalmarczyk" created="Wed, 30 May 2012 02:55:43 -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-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-124] GC  Issue 120: Determine mechanism for controlling automatic shutdown of Agents, with a default policy and mechanism for changing that policy as needed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-124</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, Jun 01, 2009

There has been intermittent chatter over the past months from a couple of
people on the group (e.g.
http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/group/clojure/browse_thread/thread/409054e3542adc1f)
&lt;/span&gt;and in #clojure about some clojure scripts hanging, either &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; a constant
time (usually reported as a minute or so with no CPU util) or seemingly
forever (or until someone kills the process).

I just hit a similar situation in our compilation process, which invokes
clojure.lang.Compile from ant.  The build process &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; particular
project had taken 15 second or so, but after adding a couple of pmap calls,
that build time jumped to ~1:15, with roughly zero CPU utilization over the
course of that last minute.

Adding a call to Agent.shutdown() in the &lt;span class=&quot;code-keyword&quot;&gt;finally&lt;/span&gt; block in
clojure.lang.Compile/main resolved the problem; a patch including &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;
change is attached.  I wouldn&apos;t suspect anyone would have any issues with
such a change.

-----
In general, it doesn&apos;t seem like everyone should keep tripping over &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;
problem in different directions.  It&apos;s a very difficult thing to debug &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;
you&apos;re not attuned to how clojure&apos;s concurrency primitives work under the
hood, and I would bet that newer users would be particularly affected.

After discussion in #clojure, rhickey suggested adding a
*auto-shutdown-agents* &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;, which:

- &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt; when exiting one of the main entry points (clojure.main, or the
legacy script/repl entry points), Agent.shutdown() would be called,
allowing &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the clean exit of the application

- would be bound by &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; to &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;

- could be easily set to &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; anyone with an advanced use-&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; that
requires agents to remain active after the main thread of the application
exits.

This would obviously not help anyone initializing clojure from a different
entry point, but &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; may represent the best compromise between
least-surprise and maximal functionality &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; advanced users.

------

In addition to the above, it perhaps might be worthwhile to change the
keepalive values used to create the Threadpools used by c.l.Actor&apos;s
Executors.  Currently, Actor uses a &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; thread pool executor, which
results in a 60s keepalive.  Lowering &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; to something much smaller (1s?
5s?) would additionally minimize the impact of Agent&apos;s threadpools on Java
applications that embed clojure directly (and would therefore not benefit
from *auto-shutdown-agents* as currently conceived, leading to puzzling
&apos;hanging&apos; behaviour).  I&apos;m not in a position to determine what impact &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;
would have on performance due to thread churn, but it would at least
minimize what would be perceived as undesirable behaviour by users that are
less familiar with the implementation details of Agent and code that
depends on it.

Comment 1  by cemer...@snowtide.com, Jun 01, 2009

Just FYI, I&apos;d be happy to provide patches &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; either of the suggestions mentioned
above...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13521">CLJ-124</key>
            <summary>GC  Issue 120: Determine mechanism for controlling automatic shutdown of Agents, with a default policy and mechanism for changing that policy as needed</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="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 23:24:00 -0500</created>
                <updated>Fri, 12 Apr 2013 09:52:24 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="22862" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/124&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/124&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
compile-agent-shutdown.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/a56S2ow4ur3O2PeJe5afGb/download/a56S2ow4ur3O2PeJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/a56S2ow4ur3O2PeJe5afGb/download/a56S2ow4ur3O2PeJe5afGb&lt;/a&gt;&lt;br/&gt;
124-compilation.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aqn0IGxZSr3RUGeJe5aVNr/download/aqn0IGxZSr3RUGeJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aqn0IGxZSr3RUGeJe5aVNr/download/aqn0IGxZSr3RUGeJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22863" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;oranenj said: [&lt;a href=&quot;file:a56S2ow4ur3O2PeJe5afGb&quot;&gt;file:a56S2ow4ur3O2PeJe5afGb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="22864" author="importer" created="Tue, 24 Aug 2010 00: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="22865" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;cemerick said: (In [&lt;span class=&quot;error&quot;&gt;&amp;#91;r:fa3d24973fc415b35ae6ec8d84b61ace76bd4133&amp;#93;&lt;/span&gt;]) Add a call to Agent.shutdown() at the end of clojure.lang.Compile/main Refs #124&lt;/p&gt;

&lt;p&gt;Signed-off-by: Chouser &amp;lt;chouser@n01se.net&amp;gt;&lt;/p&gt;

&lt;p&gt;Branch: master&lt;/p&gt;</comment>
                    <comment id="22866" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: I&apos;m closing this ticket to because the attached patch solves a specific problem.  I agree that the idea of an &lt;b&gt;auto-shutdown-agents&lt;/b&gt; var sounds like a positive compromise.  If Rich wants a ticket to track that issue, I think it&apos;d be best to open a new ticket (and perhaps mention this one there) rather than use this ticket to track further changes.&lt;/p&gt;</comment>
                    <comment id="22867" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;scgilardi said: With both Java 5 and Java 6 on Mac OS X 10.5 Leopard I&apos;m getting an error when compiling with this change present.&lt;/p&gt;

&lt;p&gt;Java 1.5.0_19&lt;br/&gt;
Java 1.6.0_13&lt;/p&gt;

&lt;p&gt;For example, when building clojure using &quot;ant&quot; from within my clone of the clojure repo:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt; java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread)&lt;br/&gt;
     &lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt;  at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)&lt;br/&gt;
     &lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt;  at java.security.AccessController.checkPermission(AccessController.java:427)&lt;br/&gt;
     &lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt;  at java.util.concurrent.ThreadPoolExecutor.shutdown(ThreadPoolExecutor.java:894)&lt;br/&gt;
     &lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt;  at clojure.lang.Agent.shutdown(Agent.java:34)&lt;br/&gt;
     &lt;span class=&quot;error&quot;&gt;&amp;#91;java&amp;#93;&lt;/span&gt;  at clojure.lang.Compile.main(Compile.java:71)&lt;/p&gt;

&lt;p&gt;I reproduced this on two Mac OS X 10.5 machines. I&apos;m not aware of having any enhanced security policies along these lines on my machines. The compile goes fine for me with Java 1.6.0_0 on an Ubuntu box.&lt;/p&gt;</comment>
                    <comment id="22868" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: I had only tested it on my ubuntu box &amp;#8211; looks like that was openjdk 1.6.0_0.  I&apos;ll test again with sun-java5 and sun-java6.&lt;/p&gt;</comment>
                    <comment id="22869" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: 1.6.0_13 worked fine for me on ubuntu, but 1.5.0_18 generated an the exception Steve pasted.  Any suggestions?  Should this patch be backed out until someone has a fix?&lt;/p&gt;</comment>
                    <comment id="22870" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;achimpassen said: [&lt;a href=&quot;file:aqn0IGxZSr3RUGeJe5aVNr&quot;&gt;file:aqn0IGxZSr3RUGeJe5aVNr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="22871" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: With Achim&apos;s patch, clojure compiles for me on ubuntu using java 1.5.0_18 from sun, and still works on 1.6.0_13 sun and 1.6.0_0 openjdk.  I don&apos;t know anything about ant or the security error, but this is looking good to me.&lt;/p&gt;</comment>
                    <comment id="22872" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;achimpassen said: It works for me on 1.6.0_13 and 1.5.0_19 (32 and 64 bit) on OS X 10.5.7.&lt;/p&gt;</comment>
                    <comment id="22873" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: (In [&lt;span class=&quot;error&quot;&gt;&amp;#91;r:895b39dabc17b3fd766fdbac3b0757edb0d4b60d&amp;#93;&lt;/span&gt;]) Rev fa3d2497 causes compile to fail on some VMs &amp;#8211; back it out. Refs #124&lt;/p&gt;

&lt;p&gt;Branch: master&lt;/p&gt;</comment>
                    <comment id="22874" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;mikehinchey said: I got the same compile error on both 1.5.0_11 and 1.6.0_14 on Windows.  Achim&apos;s patch fixes both.&lt;/p&gt;

&lt;p&gt;See the note for &quot;permissions&quot; on &lt;a href=&quot;http://ant.apache.org/manual/CoreTasks/java.html&quot;&gt;http://ant.apache.org/manual/CoreTasks/java.html&lt;/a&gt; .  I assume ThreadPoolExecutor.shutdown is the problem, it would shutdown the main Ant thread, so Ant disallows that.  Forking avoids the permissions limitation.&lt;/p&gt;

&lt;p&gt;In addition, since the build error still resulted in &quot;BUILD SUCCESSFUL&quot;, I think failonerror=&quot;true&quot; should also be added to the java call so the build would totally fail for such an error.&lt;/p&gt;</comment>
                    <comment id="22875" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;chouser@n01se.net said: I don&apos;t know if the &amp;lt;java fork=true&amp;gt; patch is a good idea or not, or if there&apos;s a better way to solve the original problem.&lt;/p&gt;

&lt;p&gt;Chas, I&apos;m kicking back to you, but I guess if you don&apos;t want it you can reassign to &quot;nobody&quot;.&lt;/p&gt;</comment>
                    <comment id="22876" author="importer" created="Tue, 24 Aug 2010 00: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="22877" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;shoover said: I&apos;d like to suggest an alternate approach. There are already well-defined and intuitive ways to block on agents and futures. Why not deprecate shutdown-agents and force users to call await and deref if they really want to block? In the pmap situation one would have to evaluate the pmap form.&lt;/p&gt;

&lt;p&gt;The System.exit problem goes away if you configure the threadpools to use daemon threads (call new ThreadPoolExecutor and pass a thread factory that creates threads and sets daemon to true). That way the user has an explicit means of blocking and System.exit won&apos;t hang.&lt;/p&gt;</comment>
                    <comment id="22878" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;alexdmiller said: I blogged about these issues at:&lt;br/&gt;
&lt;a href=&quot;http://tech.puredanger.com/2010/06/08/clojure-agent-thread-pools/&quot;&gt;http://tech.puredanger.com/2010/06/08/clojure-agent-thread-pools/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think that:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;agent thread pool threads should be named (see ticket &lt;a href=&quot;https://www.assembla.com/spaces/clojure/tickets/378-set-thread-names-on-agent-thread-pools&quot;&gt;#378&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;agent thread pools must be daemon threads by default&lt;/li&gt;
	&lt;li&gt;having ways to specify an customized executor pool for an agent send/send-off is essential to customize threading behavior&lt;/li&gt;
	&lt;li&gt;(shutdown-agents) should be either deprecated or made less dangerous&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="26565" author="ataggart" created="Mon, 11 Jul 2011 21:33:24 -0500"  >&lt;p&gt;Rich, what is the intention behind using non-daemon threads in the agent pools?&lt;/p&gt;

&lt;p&gt;If it is because daemon threads could terminate before their work is complete, would it be acceptable to &lt;a href=&quot;http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)&quot;&gt;add a shutdown hook&lt;/a&gt; to ensure against such premature termination?  Such a shutdown hook could call &lt;tt&gt;Agent.shutdown()&lt;/tt&gt;, then &lt;a href=&quot;http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ExecutorService.html#awaitTermination(long, java.util.concurrent.TimeUnit)&quot;&gt;&lt;tt&gt;awaitTermination()&lt;/tt&gt;&lt;/a&gt; on the pools.&lt;/p&gt;</comment>
                    <comment id="30069" author="redinger" created="Tue, 27 Nov 2012 15:47:20 -0600"  >&lt;p&gt;Moving this ticket out of approval &quot;OK&quot; status, and dropping the priority. These were Assembla import defaults.&lt;/p&gt;

&lt;p&gt;Also, Chas gets to be the Reporter now.&lt;/p&gt;</comment>
                    <comment id="30072" author="cemerick" created="Tue, 27 Nov 2012 17:56:24 -0600"  >&lt;p&gt;Heh, blast from the past.&lt;/p&gt;

&lt;p&gt;The comment import appears to have set their timestamps to the date of the import, so the conversation is pretty hard to follow, and obviously doesn&apos;t benefit from the intervening years of experience.  In addition, there have been plenty of changes to agents, including some &lt;a href=&quot;https://github.com/clojure/clojure/commit/f5f4faf&quot;&gt;recent enhancements&lt;/a&gt; that address some of the pain points that Alex Miller mentioned above.&lt;/p&gt;

&lt;p&gt;I propose closing this as &apos;invalid&apos; or whatever, and opening one or more new issues to track whatever issues still persist (presumably based on fresh ML discussion, etc).&lt;/p&gt;</comment>
                    <comment id="30073" author="jafingerhut" created="Tue, 27 Nov 2012 18:11:09 -0600"  >&lt;p&gt;Rereading the original description of this ticket, without reading all of the comments that follow, that description is still right on target for the behavior of latest Clojure master today.&lt;/p&gt;

&lt;p&gt;People send messages to the Clojure Google group every couple of months hitting this issue, and one even filed &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-959&quot; title=&quot;after call to clojure.java.shell/sh, jvm won&amp;#39;t exit&quot;&gt;CLJ-959&lt;/a&gt; because of hitting it.  I have updated the examples on ClojureDocs.org for future, and also for pmap and clojure.java.shell/sh which use future in their implementations, to warn people about this and explain that they should call (shutdown-agents), but making it unnecessary to call shutdown-agents would be even better, at least as the default behavior.  It sounds fine to me to provide a way for experts on thread behavior to change that default behavior if they need to.&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>
                                                                                                        <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-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-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-866] Provide a clojure.test function to run a single test case with fixtures</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-866</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;At present, clojure.test test cases are functions and can be invoked directly.  However, in the case that the test relies on fixtures, this does not work.  Please provide a function that can run a single test case with all fixtures applied.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14902">CLJ-866</key>
            <summary>Provide a clojure.test function to run a single test case with fixtures</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="anthonygrimes">Anthony Grimes</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Oct 2011 08:57:55 -0500</created>
                <updated>Sat, 4 May 2013 09:36:20 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>8</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="29767" author="anthonygrimes" created="Mon, 22 Oct 2012 18:17:38 -0500"  >&lt;p&gt;I just added clj-866-test-vars.patch (22/Oct/12 6:09PM).&lt;/p&gt;

&lt;p&gt;I had to implement this hackishly in Leiningen a few days ago, so I&apos;m very excited to get this functionality in clojure.test itself.&lt;/p&gt;

&lt;p&gt;This patch adds a test-vars function that solves this problem (and is more general). You can test as many vars as you want with it, with fixtures. It works by grouping vars passed by their namespace and then running them all with appropriate fixtures applied. Being able to run a single test isn&apos;t the problem here, being able to run &lt;b&gt;only specific tests&lt;/b&gt; is. If we wrote a function to run one test with fixtures but we actually needed to run several, just not &lt;b&gt;all&lt;/b&gt; tests, we&apos;d end up having to run once-fixtures more than once which is wasteful. I think test-vars is a good solution that solves both this problem and the one I just mentioned.&lt;/p&gt;</comment>
                    <comment id="31049" author="alexmiller" created="Sat, 4 May 2013 09:36:20 -0500"  >&lt;p&gt;This is highly useful. Could you add a test to the patch?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11602" name="clj-866-test-vars.patch" size="1977" author="anthonygrimes" created="Mon, 22 Oct 2012 18:09:31 -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-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-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-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-858] Improve speed of STM by removing System.currentTimeMillis</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-858</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Original post: &lt;a href=&quot;https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java.  Using a little test suite&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; a increase of performance by up to 25% could be measured.&lt;/p&gt;

&lt;p&gt;If necessary I can recreate the patch against current MASTER.&lt;/p&gt;

&lt;p&gt;References:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://github.com/ska2342/clj-stm-perf-test/&quot;&gt;https://github.com/ska2342/clj-stm-perf-test/&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Tested on Ubuntu and OSX</environment>
            <key id="14709">CLJ-858</key>
            <summary>Improve speed of STM by removing System.currentTimeMillis</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="ska2342">Stefan Kamphausen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Oct 2011 15:09:14 -0500</created>
                <updated>Fri, 1 Mar 2013 09:41:33 -0600</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="10406" name="stm-rm-msecs-patch.diff" size="2873" author="ska2342" created="Mon, 17 Oct 2011 15:09: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-1190] Javadoc for public Java API</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1190</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;We should publish javadoc for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1188&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1188&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;make sure to publish on the the public API classes and interfaces&lt;/li&gt;
	&lt;li&gt;if IFn remains part of public interface, find javadoc control knob to disable including the nested interfaces dealing with primitives&lt;/li&gt;
	&lt;li&gt;automate publishing the docs somewhere (javadoc.clojure.org?)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This ticket should wait until &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1188&quot; title=&quot;Public Java API&quot;&gt;&lt;del&gt;CLJ-1188&lt;/del&gt;&lt;/a&gt; is ok&apos;ed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16124">CLJ-1190</key>
            <summary>Javadoc for public Java API</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, 3 Apr 2013 06:51:13 -0500</created>
                <updated>Wed, 3 Apr 2013 06:51:13 -0500</updated>
                                                    <fixVersion>Release 1.6</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-937] cl-format prints ratio arguments with bad format for E, F, G directives</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-937</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user=&amp;gt; (use &apos;clojure.pprint)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (cl-format false &quot;~e&quot; 4/5)&lt;br/&gt;
&quot;4./5E+2&quot;&lt;br/&gt;
user=&amp;gt; (cl-format false &quot;~f&quot; 4/5)&lt;br/&gt;
&quot;4/5.0&quot;&lt;br/&gt;
user=&amp;gt; (cl-format false &quot;~g&quot; 4/5)&lt;br/&gt;
&quot;4/5.    &quot;&lt;/p&gt;

&lt;p&gt;Patch changes cl-format so that when E, F, or G directive is used, the corresponding arg is coerced from a clojure.lang.Ratio to a double before formatting.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15241">CLJ-937</key>
            <summary>cl-format prints ratio arguments with bad format for E, F, G directives</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>Tue, 21 Feb 2012 20:38:14 -0600</created>
                <updated>Mon, 8 Apr 2013 12:02:21 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28054" author="tomfaulhaber" created="Thu, 29 Mar 2012 20:48:58 -0500"  >&lt;p&gt;I have reviewed this patch and recommend that it be applied.&lt;/p&gt;

&lt;p&gt;(This one has actually been on my to do list for about 4 years. Thanks, Andy!)&lt;/p&gt;</comment>
                    <comment id="30907" author="jafingerhut" created="Mon, 8 Apr 2013 12:02:21 -0500"  >&lt;p&gt;Patch clj-937-cl-format-coerces-ratios-patch2.txt dated Apr 8 2013 supersedes the previous patch cl-format-efg-coerce-ratios-to-doubes-patch1.txt dated Feb 21 2013.&lt;/p&gt;

&lt;p&gt;The newer patch works with ratios that cannot be represented as a double, using BigDecimal in those cases.  The older patch would print garbage from the string &quot;Infinity&quot; if the ratios were larger than Double/MAX_VALUE, or 0 if the ratio was between 0 and Double/MIN_VALUE.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10938" name="cl-format-efg-coerce-ratios-to-doubes-patch1.txt" size="3810" author="jafingerhut" created="Tue, 21 Feb 2012 20:38:14 -0600" />
                    <attachment id="11949" name="clj-937-cl-format-coerces-ratios-patch2.txt" size="7892" author="jafingerhut" created="Mon, 8 Apr 2013 12:02:21 -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-1083] Incorrect ArityException message for function names containing -&gt;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1083</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user=&amp;gt; (defn a-&amp;gt;b [])&lt;br/&gt;
#&apos;user/a-&amp;gt;b&lt;br/&gt;
user=&amp;gt; (a-&amp;gt;b 1)&lt;br/&gt;
ArityException Wrong number of args (1) passed to: user$a  clojure.lang.AFn.throwArity (AFn.java:437)&lt;/p&gt;

&lt;p&gt;Note that the reported function name in the stack trace is &quot;user$a&quot;, where it should be &quot;user$a-&amp;gt;b&quot; (or some mangled variant thereof?)&lt;/p&gt;

&lt;p&gt;See discussion here: &lt;a href=&quot;https://groups.google.com/d/msg/clojure/PVNoLclhhB0/_NWqyE0cPAUJ&quot;&gt;https://groups.google.com/d/msg/clojure/PVNoLclhhB0/_NWqyE0cPAUJ&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15742">CLJ-1083</key>
            <summary>Incorrect ArityException message for function names containing -&gt;</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="alexnixon">Alex Nixon</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Oct 2012 11:18:48 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:00 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30034" author="halgari" created="Mon, 26 Nov 2012 10:27:31 -0600"  >&lt;p&gt;Fix for this defect.&lt;/p&gt;</comment>
                    <comment id="30035" author="halgari" created="Mon, 26 Nov 2012 10:30:13 -0600"  >&lt;p&gt;The throwArity now attempts to locate and call clojure.main/demunge. If it finds the function it invokes it and uses the returned string in the error. Otherwise it just throws the actual class name. This results in the following behaviour:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defn a-&amp;gt;b [])&lt;br/&gt;
#&apos;user/a-&amp;gt;b&lt;br/&gt;
user=&amp;gt; (a-&amp;gt;b 32)&lt;br/&gt;
ArityException Wrong number of args (1) passed to: user/a-&amp;gt;b  clojure.lang.AFn.throwArity (AFn.java:449)&lt;br/&gt;
user=&amp;gt; &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11710" name="better-throw-arity-messages.diff" size="1340" author="halgari" created="Mon, 26 Nov 2012 10:27: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="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1187] Clojure loses quoted metdata on empty literals</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1187</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user=&amp;gt; (meta &apos;^:foo [])&lt;br/&gt;
nil&lt;/p&gt;

&lt;p&gt;while&lt;br/&gt;
user=&amp;gt; (meta &apos;^:foo &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{:foo true}&lt;/p&gt;

&lt;p&gt;This bug propagates to ^:const vars:&lt;br/&gt;
user=&amp;gt; (def ^:const foo ^:foo [])&lt;br/&gt;
#&apos;user/foo&lt;br/&gt;
user=&amp;gt; (meta foo)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (meta @#&apos;foo)&lt;br/&gt;
{:foo true}&lt;/p&gt;</description>
                <environment></environment>
            <key id="16102">CLJ-1187</key>
            <summary>Clojure loses quoted metdata on empty literals</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="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 13:47:34 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                    <version>Release 1.5</version>
                <version>Release 1.6</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30804" author="bronsa" created="Fri, 22 Mar 2013 14:12:20 -0500"  >&lt;p&gt;After patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (meta &apos;^:foo [])&lt;br/&gt;
{:foo true}&lt;br/&gt;
user=&amp;gt; (meta &apos;^:foo &lt;span class=&quot;error&quot;&gt;&amp;#91;:a&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{:foo true}&lt;br/&gt;
user=&amp;gt; (def ^:const foo ^:foo [])&lt;br/&gt;
#&apos;user/foo&lt;br/&gt;
user=&amp;gt; (meta foo)&lt;br/&gt;
{:foo true}&lt;/p&gt;
</comment>
                    <comment id="30838" author="stu" created="Fri, 29 Mar 2013 06:13:16 -0500"  >&lt;p&gt;I believe the title should read &quot;Clojure loses quoted metdata on empty literals&quot;.&lt;/p&gt;</comment>
                    <comment id="30839" author="stu" created="Fri, 29 Mar 2013 06:16:15 -0500"  >&lt;p&gt;At first glance, the implementation looks wrong in that it blocks non-IObjs ever getting to EmptyExpr. Probably all persistent collections are IObjs, but would not want to bake this in.&lt;/p&gt;</comment>
                    <comment id="30842" author="bronsa" created="Fri, 29 Mar 2013 07:00:19 -0500"  >&lt;p&gt;You&apos;re right, I&apos;ve updated my patch, it should work as expected now&lt;/p&gt;</comment>
                    <comment id="30877" author="jafingerhut" created="Thu, 4 Apr 2013 21:44:12 -0500"  >&lt;p&gt;Nicola: Your updated patch 001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1187&quot; title=&quot;Clojure loses quoted metdata on empty literals&quot;&gt;CLJ-1187&lt;/a&gt;.patch dated Mar 29, 2013 gives syntax errors when I try to compile it.&lt;/p&gt;</comment>
                    <comment id="30878" author="bronsa" created="Fri, 5 Apr 2013 09:06:59 -0500"  >&lt;p&gt;Oh, the irony, I messed up some parentheses writing java.&lt;/p&gt;

&lt;p&gt;Sorry for it, here&apos;s the correct patch, it applies on upstream/master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11943" name="001-CLJ-1187.patch" size="2114" author="bronsa" created="Fri, 5 Apr 2013 09:06:59 -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-908] Functions with metadata print poorly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-908</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;1.3 removed the metadata slot on most functions, and made &lt;tt&gt;.withMeta&lt;/tt&gt; return a new wrapping function that provides metadata. This changes the way functions with metadata print: instead of &lt;tt&gt;#&amp;lt;user$eval595$fn_&lt;em&gt;596 user$eval595$fn&lt;/em&gt;_596@3d48ff04&amp;gt;&lt;/tt&gt; we now see &lt;tt&gt;#&amp;lt; clojure.lang.AFunction$1@581de498&amp;gt;&lt;/tt&gt;. I might argue that we should &quot;lie&quot; and print the class of the original wrapped function since it&apos;s more useful than AFunction$1, but that&apos;s debatable. The two things I propose changing are: &lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#42;print-meta&amp;#42;&lt;/tt&gt; is true, we should print the metadata map for functions. That nothing prints implies there is no metadata, which can make it difficult to track down bugs related to metadata on functions.&lt;/li&gt;
	&lt;li&gt;Remove the errant space at the front of the printed representation of functions with meta, changing &lt;tt&gt;#&amp;lt; clojure.lang.AFunction$1@581de498&amp;gt;&lt;/tt&gt; to &lt;tt&gt;#&amp;lt;clojure.lang.AFunction$1@581de498&amp;gt;&lt;/tt&gt;. The cause of this issue is that &lt;tt&gt;.getSimpleName&lt;/tt&gt; on an object with an anonymous class returns &lt;tt&gt;&quot;&quot;&lt;/tt&gt;, and we print that followed by a space and its &lt;tt&gt;.toString&lt;/tt&gt;. My fix is to omit the extra space if the class has no simple name; this would cause instances of other anonymous (non-function) classes to print more nicely as well.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;If it would be desirable to print the class of the original &quot;wrapped&quot; function, then I can easily add another patch for that.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15108">CLJ-908</key>
            <summary>Functions with metadata print poorly</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>Tue, 10 Jan 2012 17:15:47 -0600</created>
                <updated>Fri, 12 Apr 2013 10:00:30 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="28538" author="jafingerhut" created="Sat, 19 May 2012 03:30:55 -0500"  >&lt;p&gt;clj-908-Print-metadata-and-anonymous-classes-better-patch2.txt dated May 19, 2012 only has context line changes from the previous one, 0001-Print-metadata-and-anonymous-classes-better.patch dated Jan 10, 2012.  The previous one no longer applies cleanly to the latest master, while the new one does.&lt;/p&gt;</comment>
                    <comment id="29923" author="stuart.sierra" created="Fri, 9 Nov 2012 09:21:52 -0600"  >&lt;p&gt;Screened.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10765" name="0001-Print-metadata-and-anonymous-classes-better.patch" size="935" author="amalloy" created="Tue, 10 Jan 2012 17:15:47 -0600" />
                    <attachment id="11234" name="clj-908-Print-metadata-and-anonymous-classes-better-patch2.txt" size="922" author="jafingerhut" created="Sat, 19 May 2012 03:30:55 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

                </customfieldvalues>
            </customfield>
                                                                                    <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-896] Make browse-url aware of xdg-open</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-896</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.java.browse/browse-url tests to see if it&apos;s running on Mac OS to fall back to &quot;/usr/bin/open&quot; in order&lt;br/&gt;
to open a URI. On most other systems it&apos;ll just falls through to open-url-in-swing instead. The attached patch&lt;br/&gt;
tests to see if freedesktop.org&apos;s &quot;xdg-open&quot; is present in the users path. This way browse-url will launch the&lt;br/&gt;
program associated with the URI, in my case chromium.&lt;/p&gt;</description>
                <environment>All platforms that provide xdg-open (as part of freedesktop.org) benefit from this. Fix was tested on OpenBSD.</environment>
            <key id="15069">CLJ-896</key>
            <summary>Make browse-url aware of xdg-open</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="jasperla">Jasper Lievisse Adriaanse</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 17:29:14 -0600</created>
                <updated>Fri, 12 Apr 2013 10:01:31 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27885" author="jafingerhut" created="Tue, 28 Feb 2012 18:19:08 -0600"  >&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-920&quot; title=&quot;Adds support for FreeDesktop&amp;#39;s xdg-open in clojure.java.browse/browse-url.&quot;&gt;&lt;del&gt;CLJ-920&lt;/del&gt;&lt;/a&gt;, if not identical, at least bears a significant resemblance to this ticket.  It would be good to see if the patch for one of them fixes both issues.&lt;/p&gt;</comment>
                    <comment id="27889" author="jafingerhut" created="Wed, 29 Feb 2012 13:18:04 -0600"  >&lt;p&gt;clj-896-browse-url-uses-xdg-open-patch2.txt is based more on the patch attached to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-920&quot; title=&quot;Adds support for FreeDesktop&amp;#39;s xdg-open in clojure.java.browse/browse-url.&quot;&gt;&lt;del&gt;CLJ-920&lt;/del&gt;&lt;/a&gt; by Jeremy Heiler than on the earlier patch attached to this ticket.  He and I have signed CAs.&lt;/p&gt;

&lt;p&gt;I think this patch improves on both of the previous patches for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-896&quot; title=&quot;Make browse-url aware of xdg-open&quot;&gt;CLJ-896&lt;/a&gt; and &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-920&quot; title=&quot;Adds support for FreeDesktop&amp;#39;s xdg-open in clojure.java.browse/browse-url.&quot;&gt;&lt;del&gt;CLJ-920&lt;/del&gt;&lt;/a&gt;.  In particular, Jeremy&apos;s worked fine, but it caused a long slowdown in the running of tests when building Clojure.  This one does not.&lt;/p&gt;

&lt;p&gt;Tested on:&lt;/p&gt;

&lt;p&gt;Mac OS X 10.6.8&lt;br/&gt;
Windows XP SP3, both in cmd.exe and a Cygwin bash shell&lt;br/&gt;
Ubuntu 10.04 LTS&lt;/p&gt;

&lt;p&gt;It would be great if someone could test it on a BSD system.  The only possible issue I can think of is whether the output of the &quot;which&quot; command is different there than on the Linux system I tested.&lt;/p&gt;

&lt;p&gt;If someone wants to make a patch that doesn&apos;t use &quot;which&quot;, but instead checks the PATH, I&apos;d recommend they also test on Windows in cmd.exe to make sure it works correctly there.&lt;/p&gt;</comment>
                    <comment id="29922" author="stuart.sierra" created="Fri, 9 Nov 2012 09:04:35 -0600"  >&lt;p&gt;Screened. Verified on Mac OS X.&lt;/p&gt;</comment>
                    <comment id="29925" author="jasperla" created="Fri, 9 Nov 2012 09:41:07 -0600"  >&lt;p&gt;And I&apos;ve tested it on OpenBSD.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10745" name="0001-teach-browse-url-about-xdg-open.patch" size="1948" author="jasperla" created="Tue, 13 Dec 2011 17:29:14 -0600" />
                    <attachment id="10974" name="clj-896-browse-url-uses-xdg-open-patch2.txt" size="3184" author="jafingerhut" created="Wed, 29 Feb 2012 13:18:04 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

                </customfieldvalues>
            </customfield>
                                                                                    <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-873] Allow the function / to be referred to in namespaces other than clojure.core</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-873</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The attached patch gives the programmer the option of referring to the division function in namespaces other than just clojure.core.  For example,&lt;/p&gt;

&lt;p&gt;(ns foo&lt;br/&gt;
  (:require &lt;span class=&quot;error&quot;&gt;&amp;#91;cljs.core :as core&amp;#93;&lt;/span&gt;))&lt;br/&gt;
(apply core// &apos;(1 2 3))&lt;/p&gt;

&lt;p&gt;The above lines do not compile without this patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15000">CLJ-873</key>
            <summary>Allow the function / to be referred to in namespaces other than clojure.core</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>Thu, 10 Nov 2011 09:48:56 -0600</created>
                <updated>Fri, 12 Apr 2013 10:04:21 -0500</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>7</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="27274" author="chrismgray" created="Thu, 10 Nov 2011 09:50:19 -0600"  >&lt;p&gt;I have signed the CA and it is in the mail. &lt;/p&gt;</comment>
                    <comment id="27329" author="chrismgray" created="Sun, 20 Nov 2011 18:21:20 -0600"  >&lt;p&gt;My CA has now been applied.  This patch is quite simple &amp;#8211; can someone have a look at it please?&lt;/p&gt;</comment>
                    <comment id="27437" author="alexmiller" created="Fri, 9 Dec 2011 09:34:21 -0600"  >&lt;p&gt;FYI, I have run into this in actual code as well (implementing a query language function library).  &lt;/p&gt;</comment>
                    <comment id="27863" author="jafingerhut" created="Fri, 24 Feb 2012 20:00:48 -0600"  >&lt;p&gt;clj-873-namespace-divides-patch.txt is same as Chris&apos;s, just updated to apply cleanly to latest master as of Feb 24, 2012.&lt;/p&gt;

&lt;p&gt;The test he added does fail without the code fix, and passes with it.  He is now on the list of contributors.&lt;/p&gt;</comment>
                    <comment id="28059" author="chrismgray" created="Fri, 30 Mar 2012 13:11:39 -0500"  >&lt;p&gt;A short further discussion of this patch appeared here: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/f095980802a82747/b723726c77c1ec64&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/f095980802a82747/b723726c77c1ec64&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I assume this bug is what is referred to in Clojurescript&apos;s core.cljs, where it says &quot;;; FIXME: waiting on cljs.core//&quot;&lt;/p&gt;</comment>
                    <comment id="29768" author="stu" created="Mon, 22 Oct 2012 19:12:55 -0500"  >&lt;p&gt;Thanks all. It is nice to have supporting real-world stories such as Alex&apos;s in the comments.&lt;/p&gt;</comment>
                    <comment id="29769" author="jafingerhut" created="Mon, 22 Oct 2012 19:19:21 -0500"  >&lt;p&gt;I should have added a comment here a while back if it would have helped, but David Nolen&apos;s &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-930&quot; title=&quot;cljs.core// does not work in ClojureScript&quot;&gt;&lt;del&gt;CLJ-930&lt;/del&gt;&lt;/a&gt; was closed as a duplicate of this one.&lt;/p&gt;</comment>
                    <comment id="30347" author="bbloom" created="Wed, 2 Jan 2013 00:49:35 -0600"  >&lt;p&gt;This also affects a two of my libraries: 1) CSS generation library I&apos;m working on, which wants to be able to do division with pixels and other units. 2) Factjor which defines binary math operators against a stack.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10964" name="clj-873-namespace-divides-patch.txt" size="2665" author="jafingerhut" created="Fri, 24 Feb 2012 20:00:48 -0600" />
                    <attachment id="10692" name="namespace-divides.diff" size="2810" author="chrismgray" created="Thu, 10 Nov 2011 09:48:56 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

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

<item>
            <title>[CLJ-783] clojure.inspector/inspect-tree doesn&apos;t work on sets --patch in the description by Jason Wolfe</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-783</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As reported by Jason Wolfe on March 19, 2009 in the clojure group:&lt;/p&gt;

&lt;p&gt;clojure.inspector/inspect-tree doesn&apos;t work on sets; patch attached&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/97bcad115fcfaf5a/95e61c423c61cfa8?lnk=gst&amp;amp;q=inspector+set#95e61c423c61cfa8&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/97bcad115fcfaf5a/95e61c423c61cfa8?lnk=gst&amp;amp;q=inspector+set#95e61c423c61cfa8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was debugging with inspect-tree and noticed that it errors when it &lt;br/&gt;
encounters a set (it thinks it&apos;s not atomic, but then nth produces an &lt;br/&gt;
UnsupportedOperationException). &lt;/p&gt;

&lt;p&gt;I made a small patch (below) that makes inspect-tree work on &lt;br/&gt;
java.util.Sets, and also anything else that implements &lt;br/&gt;
clojure.lang.Seqable.  If this is of interest, please let me know and &lt;br/&gt;
I can create an issue. &lt;/p&gt;


&lt;p&gt;Cheers, &lt;br/&gt;
Jason &lt;/p&gt;


&lt;p&gt;Index: src/clj/clojure/inspector.clj &lt;br/&gt;
=================================================================== &lt;br/&gt;
&amp;#8212; src/clj/clojure/inspector.clj       (revision 1335) &lt;br/&gt;
+++ src/clj/clojure/inspector.clj       (working copy) &lt;br/&gt;
@@ -20,8 +20,10 @@ &lt;br/&gt;
 (defn collection-tag &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; &lt;br/&gt;
   (cond &lt;br/&gt;
    (instance? java.util.Map$Entry x) :entry &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;(instance? java.util.Map x) :map&lt;br/&gt;
+   (instance? java.util.Map x) :seqable &lt;br/&gt;
+   (instance? java.util.Set x) :seqable &lt;br/&gt;
    (sequential? x) :seq &lt;br/&gt;
+   (instance? clojure.lang.Seqable x) :seqable &lt;br/&gt;
    :else :atom)) &lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt; (defmulti is-leaf collection-tag) &lt;br/&gt;
@@ -42,11 +44,15 @@ &lt;br/&gt;
 (defmethod get-child-count :entry &lt;span class=&quot;error&quot;&gt;&amp;#91;e&amp;#93;&lt;/span&gt; &lt;br/&gt;
   (count (val e))) &lt;/p&gt;


&lt;p&gt;-(defmethod is-leaf :map &lt;span class=&quot;error&quot;&gt;&amp;#91;m&amp;#93;&lt;/span&gt; &lt;br/&gt;
+(defmethod is-leaf :seqable &lt;span class=&quot;error&quot;&gt;&amp;#91;parent&amp;#93;&lt;/span&gt; &lt;br/&gt;
   false) &lt;br/&gt;
-(defmethod get-child :map &lt;span class=&quot;error&quot;&gt;&amp;#91;m index&amp;#93;&lt;/span&gt; &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;(nth (seq m) index))&lt;br/&gt;
+(defmethod get-child :seqable &lt;span class=&quot;error&quot;&gt;&amp;#91;parent index&amp;#93;&lt;/span&gt; &lt;br/&gt;
+  (nth (seq parent) index)) &lt;br/&gt;
+(defmethod get-child-count :seqable &lt;span class=&quot;error&quot;&gt;&amp;#91;parent&amp;#93;&lt;/span&gt; &lt;br/&gt;
+  (count (seq parent))) &lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt; (defn tree-model &lt;span class=&quot;error&quot;&gt;&amp;#91;data&amp;#93;&lt;/span&gt; &lt;br/&gt;
   (proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;TreeModel&amp;#93;&lt;/span&gt; [] &lt;br/&gt;
     (getRoot [] data) &lt;/p&gt;</description>
                <environment>Any</environment>
            <key id="14409">CLJ-783</key>
            <summary>clojure.inspector/inspect-tree doesn&apos;t work on sets --patch in the description by Jason Wolfe</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="ablancas">Armando Blancas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Apr 2011 11:29:27 -0500</created>
                <updated>Fri, 12 Apr 2013 10:04:52 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27718" author="jafingerhut" created="Tue, 14 Feb 2012 12:54:05 -0600"  >&lt;p&gt;Created a properly formatted patch, attached, for Jason&apos;s enhancement.  I tested it with&lt;/p&gt;

&lt;p&gt;(inspect-tree (:members (clojure.reflect/reflect java.lang.Math)))&lt;/p&gt;

&lt;p&gt;and it worked, whereas it had many errors without Jason&apos;s changes.&lt;/p&gt;</comment>
                    <comment id="27831" author="jafingerhut" created="Thu, 23 Feb 2012 23:58:31 -0600"  >&lt;p&gt;Jason Wolfe has signed a CA.  Patch applies cleanly with latest master as of Feb 14, 2012.  No errors, warnings, or test failures with the patch applied.  No doc strings need updating.&lt;/p&gt;</comment>
                    <comment id="29929" author="stuart.sierra" created="Fri, 9 Nov 2012 16:12:45 -0600"  >&lt;p&gt;Screened.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10909" name="clj-783-patch.txt" size="1294" author="jafingerhut" created="Tue, 14 Feb 2012 12:54:05 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

                </customfieldvalues>
            </customfield>
                                                                                    <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-196] *file* returns &quot;NO_SOURCE_PATH&quot;, but the doc says it should be nil</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-196</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;According to &lt;a href=&quot;http://clojure.org/api&quot;&gt;http://clojure.org/api&lt;/a&gt;, &amp;#42;file* should return nil in the repl, but it returns &quot;NO_SOURCE_PATH&quot;.&lt;/p&gt;

&lt;p&gt;This has been true for a long time. Latest patch changes only the docstring of &amp;#42;file* to accurately reflect current behavior.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13593">CLJ-196</key>
            <summary>*file* returns &quot;NO_SOURCE_PATH&quot;, but the doc says it should be nil</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="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="aredington">Alexander Redington</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Oct 2009 04:34:00 -0500</created>
                <updated>Fri, 12 Apr 2013 10:05:40 -0500</updated>
                                    <version>Approved Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23213" author="importer" created="Tue, 24 Aug 2010 04:47:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/196&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/196&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26070" author="trptcolin" created="Fri, 31 Dec 2010 14:41:51 -0600"  >&lt;p&gt;I think this is a pretty trivial docstring fix - &quot;NO_SOURCE_PATH&quot; has been the default value of &lt;b&gt;file&lt;/b&gt; since 3dd4c1cf18ea8456b5b4aec607cd54ecfdd85eea (April 2009).&lt;/p&gt;</comment>
                    <comment id="27858" author="jafingerhut" created="Fri, 24 Feb 2012 16:36:56 -0600"  >&lt;p&gt;Colin&apos;s patch still applies cleanly to latest master as of Feb 24, 2012.&lt;/p&gt;</comment>
                    <comment id="27989" author="stuart.sierra" created="Fri, 23 Mar 2012 08:32:42 -0500"  >&lt;p&gt;Docstring only. Screened. &lt;/p&gt;</comment>
                    <comment id="29263" author="stuart.sierra" created="Fri, 24 Aug 2012 08:44:01 -0500"  >&lt;p&gt;Rescreened. Still applies on latest master.&lt;/p&gt;</comment>
                    <comment id="29707" author="richhickey" created="Fri, 19 Oct 2012 17:47:35 -0500"  >&lt;p&gt;I&apos;d rather promise nothing than promise this forever.&lt;/p&gt;</comment>
                    <comment id="29714" author="trptcolin" created="Fri, 19 Oct 2012 19:15:01 -0500"  >&lt;p&gt;The second patch avoids promising the return value. For clarity, it does mention the lack of guarantee instead of omitting any mention.&lt;/p&gt;</comment>
                    <comment id="30070" author="redinger" created="Tue, 27 Nov 2012 17:33:19 -0600"  >&lt;p&gt;Patch applies cleanly and makes documentation more correct.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10063" name="0001-Fix-docstring-for-file-refs-196.patch" size="767" author="trptcolin" created="Fri, 31 Dec 2010 14:41:51 -0600" />
                    <attachment id="11582" name="0002-Don-t-promise-the-value-of-file-in-the-REPL.patch" size="786" author="trptcolin" created="Fri, 19 Oct 2012 19:15:01 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

                </customfieldvalues>
            </customfield>
                                                                                    <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-1105] defrecord classes implement IPersistentCollection but not .empty, clojure.walk assumes collections support empty</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1105</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Using clojure.walk functions fails surprisingly for data containing records defined with defrecord:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (defrecord Foo &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.Foo&lt;br/&gt;
user=&amp;gt; (def f (Foo. :x))&lt;br/&gt;
#&apos;user/f&lt;br/&gt;
user=&amp;gt; (use &apos;clojure.walk)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (postwalk identity {:foo f})&lt;br/&gt;
UnsupportedOperationException Can&apos;t create empty: user.Foo  user.Foo (NO_SOURCE_FILE:1)&lt;/p&gt;

&lt;p&gt;This seems to be because clojure.walk/walk guards a call to (empty form) with a (coll? form) check. The check succeeds because records implement IPersistentCollection, but (empty form) throws an exception. This looks to me like a bug in clojure.walk (it should check records separately and either treat them as atomic or implement a way of walking through them) but perhaps it is a sign of some unclarity in the contract of collections.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15817">CLJ-1105</key>
            <summary>defrecord classes implement IPersistentCollection but not .empty, clojure.walk assumes collections support empty</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="jks">Jouni K. Sepp&#228;nen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Nov 2012 08:20:52 -0600</created>
                <updated>Fri, 12 Apr 2013 09:42:00 -0500</updated>
                                    <version>Release 1.4</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="29912" author="bronsa" created="Thu, 8 Nov 2012 14:35:42 -0600"  >&lt;p&gt;maybe clojure should follow clojurescript&apos;s footsteps and move empty out of IPersistentCollection and create an&lt;br/&gt;
interface IEmptyableCollection extends IPersistentCollection {
  IEmptyableCollection empty();
}&lt;/p&gt;</comment>
                    <comment id="30029" author="stu" created="Sun, 25 Nov 2012 18:39:22 -0600"  >&lt;p&gt;Can whoever claims this please consider walk&apos;s behavior in the face of all different collection types? I think it also fails with Java collections. &lt;/p&gt;

&lt;p&gt;Also, the collection partitioning code in clojure.data may be of use.&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-1099] better error message when passing non-seq to seq</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1099</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Design discussion &lt;a href=&quot;http://dev.clojure.org/display/design/Better+Error+Messages&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This patch improves Clojure&apos;s error message for a single common error: passing a non-seq where a seq is neede. More importantly, it is intended as a prototype for other similar improvements in the future.&lt;/p&gt;

&lt;p&gt;Error message 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;(cons 1 2)
=&amp;gt; IllegalArgumentException Don&apos;t know how to create ISeq from: java.lang.Long
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Error message after:&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; (cons 1 2)
ExceptionInfo Don&apos;t know how to create ISeq from: java.lang.Long
user=&amp;gt; (ex-data *e)
{:instance 2}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15809">CLJ-1099</key>
            <summary>better error message when passing non-seq to seq</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>Thu, 1 Nov 2012 10:03:14 -0500</created>
                <updated>Fri, 12 Apr 2013 11:36:35 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29932" author="michaelklishin" created="Mon, 12 Nov 2012 10:34:49 -0600"  >&lt;p&gt;Wouldn&apos;t it be better to make it read &quot;Don&apos;t know how to create ISeq from: 2 (java.lang.Long)&quot;? How many beginners will figure&lt;br/&gt;
out ex-data exists and how to use it?&lt;/p&gt;</comment>
                    <comment id="30946" author="stu" created="Fri, 12 Apr 2013 11:36:35 -0500"  >&lt;p&gt;Hi Michael,&lt;/p&gt;

&lt;p&gt;ex-info messages should not, in general, pr-str things into their bodies.  This raises the question of print-length and print-level in a place where the user doesn&apos;t have good control, while the whole point of ex-info is to be in the data business, not the string business. Users can control printing from ex-data any way they like.&lt;/p&gt;

&lt;p&gt;There are two possible ways to make beginners aware of ex-data: Tell them about it in one (or a few places) in docs, or in an infinite number of places saying &quot;This would have been useful here, but we didn&apos;t use it because you might not know about it.&quot;  I prefer the former.&lt;/p&gt;

&lt;p&gt;That said, I think it would be great to increase the visibility of ex-info and ex-data early on in documentation for beginners, and to make sure that things like exception printing in logs are flexible enough not to lose the benefits of ex-info.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11653" name="better-error-message-for-seq.patch" size="4724" author="stu" created="Thu, 1 Nov 2012 10:03:14 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

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

<item>
            <title>[CLJ-1101] *default-data-reader-fn* should be set!-able in REPL</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1101</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-927&quot; title=&quot;default tagged literal reader&quot;&gt;&lt;del&gt;CLJ-927&lt;/del&gt;&lt;/a&gt;, Nicola Mometto pointed out that &amp;#42;default-data-reader-fn* should be set!-able.  The fix needs to be added to clojure.main/with-bindings.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15813">CLJ-1101</key>
            <summary>*default-data-reader-fn* should be set!-able in REPL</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="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                    </labels>
                <created>Sat, 3 Nov 2012 09:28:36 -0500</created>
                <updated>Sat, 13 Apr 2013 09:36:37 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29898" author="steveminer@gmail.com" created="Sat, 3 Nov 2012 09:32:36 -0500"  >&lt;p&gt;Add &amp;#42;default-data-reader-fn* to the special bindings in main.clj so that it is set!-able in the REPL&lt;/p&gt;</comment>
                    <comment id="30155" author="steveminer@gmail.com" created="Mon, 3 Dec 2012 10:07:37 -0600"  >&lt;p&gt;This is a one-liner that makes &amp;#42;default-data-reader-fn* convenient to use in the REPL, similar to how &amp;#42;data-readers* works.  I&apos;d like to have this fix in Clojure 1.5.&lt;/p&gt;</comment>
                    <comment id="30750" author="steveminer@gmail.com" created="Tue, 12 Mar 2013 20:10:02 -0500"  >&lt;p&gt;work-around for 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;(alter-&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;-root #&apos;clojure.core/*&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-data-reader-fn* (constantly my-&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-reader))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11659" name="CLJ-1101-make-default-data-reader-fn-set-able-in-REPL.patch" size="850" author="steveminer@gmail.com" created="Sat, 3 Nov 2012 09:32:36 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10004">Screened</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-787] transient blows up when passed a vector created by subvec</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-787</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Subvectors created with subvec from a PersistentVector cannot be made transient:&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; (&lt;span class=&quot;code-keyword&quot;&gt;transient&lt;/span&gt; (subvec [1 2 3 4] 2))
ClassCastException clojure.lang.APersistentVector$SubVector cannot be &lt;span class=&quot;code-keyword&quot;&gt;cast&lt;/span&gt; to clojure.lang.IEditableCollection  clojure.core/&lt;span class=&quot;code-keyword&quot;&gt;transient&lt;/span&gt; (core.clj:2864)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</description>
                <environment></environment>
            <key id="14413">CLJ-787</key>
            <summary>transient blows up when passed a vector created by subvec</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="aredington">Alexander Redington</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 May 2011 07:23:56 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:00 -0500</updated>
                                    <version>Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26477" author="stuart.sierra" created="Tue, 31 May 2011 09:28:01 -0500"  >&lt;p&gt;Confirmed. APersistentVector$SubVector does not implement IEditableCollection.&lt;/p&gt;

&lt;p&gt;The current implementation of TransientVector depends on implementation details of PersistentVector, so it is not a trivial fix. The simplest fix might be to implement IEditableCollection.asTransient in SubVector by creating a new PersistentVector, but I do not know the performance implications.&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-1121] -&gt; and -&gt;&gt; have unexpected behavior when combined with unusual macros</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1121</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;My intuitive understanding of the classic threading macros is that the meaning of forms like &lt;tt&gt;(-&amp;gt; a b c)&lt;/tt&gt; can be understood syntactically independent of the meaning of the symbols involved or the fact that the two threading macros are defined recursively. However the recursive definition breaks that expectation. After&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;(macroexpand-1 (macroexpand-1 &apos;(-&amp;gt; a b c)))

=&amp;gt; (c (-&amp;gt; a b))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;tt&gt;c&lt;/tt&gt; is now in control if it is a macro, and is now seeing the argument &lt;tt&gt;(-&amp;gt; a b)&lt;/tt&gt; rather than &lt;tt&gt;(b a)&lt;/tt&gt; as would be the case if we had written &lt;tt&gt;(c (b a))&lt;/tt&gt; originally.&lt;/p&gt;

&lt;p&gt;Admittedly I do not know of a realistic example where this is an important distinction (I noticed this when playing with a rather perverse use of &lt;tt&gt;-&amp;gt;&amp;gt;&lt;/tt&gt; with macros from korma), but at the very least it means that the behavior of the threading macros isn&apos;t quite as easy to accurately explain as I thought it was.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15875">CLJ-1121</key>
            <summary>-&gt; and -&gt;&gt; have unexpected behavior when combined with unusual macros</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="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Dec 2012 20:28:37 -0600</created>
                <updated>Fri, 12 Apr 2013 09:52:24 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>4</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="30183" author="gfredericks" created="Fri, 7 Dec 2012 09:19:46 -0600"  >&lt;p&gt;I just realized that my patch also implements &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1086&quot; title=&quot;Support arity-1 for -&amp;gt;&amp;gt;&quot;&gt;CLJ-1086&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="30290" author="stu" created="Sat, 22 Dec 2012 09:48:55 -0600"  >&lt;p&gt;Would be nice if tests also demonstrated that metadata is preserved correctly.&lt;/p&gt;</comment>
                    <comment id="30329" author="gfredericks" created="Wed, 26 Dec 2012 20:16:45 -0600"  >&lt;p&gt;New patch in response to stuarthalloway feedback.&lt;/p&gt;</comment>
                    <comment id="30414" author="timmc" created="Wed, 9 Jan 2013 18:47:26 -0600"  >&lt;p&gt;This patch also prevents an infinite loop in the macroexpander when fed the following expression:&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;(-&amp;gt;&amp;gt; a b (-&amp;gt;&amp;gt; c d))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Edit: Far simpler example.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11751" name="0001-CLJ-1121-Reimplement-and-without-recursion.patch" size="2680" author="gfredericks" created="Thu, 6 Dec 2012 20:33:40 -0600" />
                    <attachment id="11780" name="CLJ-1121-v002.patch" size="4843" author="gfredericks" created="Wed, 26 Dec 2012 20:16:45 -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-935] clojure.string/trim uses different defn of whitespace as triml, trimr</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-935</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.string/triml and trimr use Character/isWhitespace to determine whether a character is whitespace, but trim uses some other definition of white space character.  For example:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (use &apos;clojure.string)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (def s &quot;  \u2002  foo&quot;)&lt;br/&gt;
#&apos;user/s&lt;br/&gt;
user=&amp;gt; (trim s)&lt;br/&gt;
&quot;?  foo&quot;&lt;br/&gt;
user=&amp;gt; (triml s)&lt;br/&gt;
&quot;foo&quot;&lt;/p&gt;

&lt;p&gt;The attached patch changes trim to use Character/isWhitespace.  I suppose other possibilities are to change triml and trimr to use trim&apos;s notion of whitespace, whatever that is, or to just leave these functions inconsistent with each other.  It does seem that it would be a nice property that (trim s) is equal to (triml (trimr s)) for all strings.&lt;/p&gt;

&lt;p&gt;The patch also changes triml to only call .length on s once.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15237">CLJ-935</key>
            <summary>clojure.string/trim uses different defn of whitespace as triml, trimr</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="aaron">Aaron Bedra</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Feb 2012 13:29:54 -0600</created>
                <updated>Thu, 11 Apr 2013 17:36:32 -0500</updated>
                                    <version>Release 1.6</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28741" author="stu" created="Fri, 8 Jun 2012 10:22:17 -0500"  >&lt;p&gt;Question for Rich: do we want to be consistent across the different trim fns (per this patch) or consistent with Java, which uses one definition of whitespace in Character/isWhitespace, and a different definition in String/trim?&lt;/p&gt;</comment>
                    <comment id="28742" author="stu" created="Fri, 8 Jun 2012 10:22:59 -0500"  >&lt;p&gt;Question for Andy: why the (int ...) forms, when Clojure only works with primitive longs?&lt;/p&gt;</comment>
                    <comment id="28743" author="jafingerhut" created="Fri, 8 Jun 2012 10:33:54 -0500"  >&lt;p&gt;Answer for Stuart: Looks like I was preserving the (int ...) form that was in triml before, perhaps somewhat mindlessly.  Depending on Rich&apos;s answer, I can update the patch if desired.&lt;/p&gt;</comment>
                    <comment id="30931" author="aaron" created="Thu, 11 Apr 2013 17:34:32 -0500"  >&lt;p&gt;Bump on the discussion. This ticket seems blocked until we make a decision.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10937" name="fix-trim-fns-different-whitespace-patch.txt" size="2731" author="jafingerhut" created="Tue, 21 Feb 2012 13:29: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-1176] clojure.repl/source fails when *read-eval* bound to :unknown</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1176</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.repl/source is broken in Clojure 1.5.0 when &amp;#42;read-eval&amp;#42; is bound to :unknown, since source-fn reads without binding.&lt;/p&gt;

&lt;p&gt;Reproduce:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Either set &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;:jvm-opts [&quot;-Dclojure.read.eval=unknown&quot;]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; in Leiningen or eval at REPL: &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;(alter-var-root #&apos;*read-eval* (constantly :unknown))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;(use &apos;clojure.repl)&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;(source drop-last)&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Expected:&lt;/p&gt;

&lt;p&gt;Source of drop-last.&lt;/p&gt;

&lt;p&gt;Actual:&lt;/p&gt;

&lt;p&gt;RuntimeException Reading disallowed - &amp;#42;read-eval&amp;#42; bound to :unknown&lt;/p&gt;</description>
                <environment></environment>
            <key id="16058">CLJ-1176</key>
            <summary>clojure.repl/source fails when *read-eval* bound to :unknown</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="timmc">Tim McCormack</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Mar 2013 15:26:45 -0600</created>
                <updated>Sat, 4 May 2013 22:40:43 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30705" author="timmc" created="Wed, 6 Mar 2013 16:04:03 -0600"  >&lt;p&gt;The attached patch just binds &amp;#42;read-eval&amp;#42; to true inside source-fn.&lt;/p&gt;</comment>
                    <comment id="30840" author="stu" created="Fri, 29 Mar 2013 06:24:27 -0500"  >&lt;p&gt;Note: Allowing this implies that you trust the data on your classpath.  If there are reasons somebody might not, we should reject this patch and people will have to be explicit when calling source.&lt;/p&gt;</comment>
                    <comment id="30841" author="timmc" created="Fri, 29 Mar 2013 06:37:27 -0500"  >&lt;p&gt;Ugh, that&apos;s a fair point when it comes to sandboxing. I&apos;ll check with the owners of clojurebot and lazybot.&lt;/p&gt;</comment>
                    <comment id="31051" author="timmc" created="Sat, 4 May 2013 22:40:43 -0500"  >&lt;p&gt;I haven&apos;t come up with any scenarios where this is problematic, and I haven&apos;t heard anything back from the bot owners. As for sandboxing, clojure.repl can easily be excluded.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11895" name="0001-CLJ-1176-Bind-read-eval-true-in-clojure.repl-source-.patch" size="928" author="timmc" created="Wed, 6 Mar 2013 16:04:03 -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-766] Implicit casting behaviour of into-array differs from &lt;primitive&gt;-array</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-766</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Current patch: byte-short-array-ctors.diff&lt;/p&gt;

&lt;p&gt;The behavior of &lt;tt&gt;byte-array&lt;/tt&gt; and &lt;tt&gt;short-array&lt;/tt&gt; is inconsistent with the other &lt;tt&gt;&amp;lt;type&amp;gt;-array&lt;/tt&gt; functions and with the &lt;tt&gt;into-array&lt;/tt&gt; function when invoked with types other than byte or short. All of the other cases upcast to Number, then extract the primitive value, allowing this operation to succeed (assuming the value is in range). &lt;tt&gt;byte-array&lt;/tt&gt; and &lt;tt&gt;short-array&lt;/tt&gt; throw a ClassCastException.&lt;/p&gt;

&lt;p&gt;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;base64v3a=&amp;gt; (into-array Byte/TYPE [1 2 3 4])  ;; int to byte ok
#&amp;lt;byte[] [B@5ee04fd&amp;gt;
base64v3a=&amp;gt; (byte-array [1 2 3 4])  ;; int to byte NOT ok!! 
ClassCastException java.lang.Long cannot be cast to java.lang.Byte
  clojure.lang.Numbers.byte_array (Numbers.java:1418)
base64v3a=&amp;gt; (long-array [1 2 3 4])  ;; int to long ok
#&amp;lt;long[] [J@3f9f4d1d&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;tt&gt;into-array&lt;/tt&gt; (via &lt;tt&gt;RT.seqToTypedArray&lt;/tt&gt;) and the other &lt;tt&gt;&amp;lt;type&amp;gt;-array&lt;/tt&gt; functions all upcast to Number (via Numbers.&amp;lt;type&amp;gt;_array}}), then obtain the proper primitive value. &lt;tt&gt;Numbers.byte-array&lt;/tt&gt; and &lt;tt&gt;Numbers.short-array&lt;/tt&gt; do casts directly to Byte and Short (yielding the ClassCastException).&lt;/p&gt;

&lt;p&gt;The attached patch makes the Byte and Short cases match the other types and the &lt;tt&gt;into-array&lt;/tt&gt; behavior. Tests are included. The submitter is a contributor.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14390">CLJ-766</key>
            <summary>Implicit casting behaviour of into-array differs from &lt;primitive&gt;-array</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="toxi">Karsten Schmidt</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Apr 2011 18:45:53 -0500</created>
                <updated>Fri, 3 May 2013 20:46:29 -0500</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="26342" author="ataggart" created="Sat, 2 Apr 2011 14:04:31 -0500"  >&lt;p&gt;See &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-678&quot; title=&quot;into-array should work with all primitive types&quot;&gt;&lt;del&gt;CLJ-678&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="28631" author="jafingerhut" created="Mon, 28 May 2012 18:45:30 -0500"  >&lt;p&gt;Some more details from Alexandar Taggart: This is not a duplicate of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-678&quot; title=&quot;into-array should work with all primitive types&quot;&gt;&lt;del&gt;CLJ-678&lt;/del&gt;&lt;/a&gt;.  &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-766&quot; title=&quot;Implicit casting behaviour of into-array differs from &amp;lt;primitive&amp;gt;-array&quot;&gt;CLJ-766&lt;/a&gt; was created precisely due to the fact the the behavior of *-array is not consistent with the post-678 version of into-array.&lt;/p&gt;</comment>
                    <comment id="30688" author="toxi" created="Sat, 2 Mar 2013 17:11:43 -0600"  >&lt;p&gt;I&apos;d like to bump up this issue, since it&apos;d be great if all the (xxx-array) factory functions have the same expected behavior (i.e. not throw an exception, especially not if the values are in range). The attached patch is changing the behaviour for byte-array &amp;amp; short-array to the same pattern used as for int/long/float/double and therefore will not throw an exception for valid (even if overflown) numbers. You can find more discussion in this thread on:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?hl=en&amp;amp;fromgroups=#!topic/clojure/KyQrbph-zqo&quot;&gt;https://groups.google.com/forum/?hl=en&amp;amp;fromgroups=#!topic/clojure/KyQrbph-zqo&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30689" author="jafingerhut" created="Sun, 3 Mar 2013 08:11:29 -0600"  >&lt;p&gt;Voting on a ticket (click the &quot;Vote&quot; link under the &quot;People&quot; heading while viewing the ticket on JIRA) may help draw attention to it, too.&lt;/p&gt;</comment>
                    <comment id="30695" author="jafingerhut" created="Mon, 4 Mar 2013 13:08:11 -0600"  >&lt;p&gt;Karsten, patches should be in the format created by the &quot;git format-patch&quot; command as described in the instructions under the heading &quot;Development&quot; on 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;</comment>
                    <comment id="30696" author="toxi" created="Mon, 4 Mar 2013 14:05:51 -0600"  >&lt;p&gt;Sorry Andy, I used Atlassian SourceTree to create the patch and assumed it&apos;s in standard git format... I&apos;ve removed the old one and attach a (hopefully) properly formatted one. Apologies, contributing-beginners-luck!&lt;/p&gt;</comment>
                    <comment id="30850" author="stu" created="Sat, 30 Mar 2013 08:52:01 -0500"  >&lt;p&gt;While investigating this, I noticed that long-array coerces across type, e.g.&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;(seq (long-array [1.0]))
=&amp;gt; (1)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is this what we want? I don&apos;t think so.&lt;/p&gt;</comment>
                    <comment id="30851" author="stu" created="Sat, 30 Mar 2013 08:53:59 -0500"  >&lt;p&gt;I agree that all the numeric array constructors should work the same way, but I am not sue we should adopt long-array&apos;s approach, which allows coercion from float to integer types.&lt;/p&gt;</comment>
                    <comment id="31047" author="alexmiller" created="Fri, 3 May 2013 20:31:24 -0500"  >&lt;p&gt;I think the patch approach is valid. However, the patch does not cover the same problem in the 2-arity version of byte_array and short_array (when a size is supplied). Please update the patch to include a fix in the 2-arity version of byte_array and short_array and tests for the same. Ex: (byte-array 1 &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;).  &lt;/p&gt;

&lt;p&gt;Also, there is a whitespace issue in the patch - please just use spaces! &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;/Users/alex/work/code/clojure/.git/rebase-apply/patch:24: space before tab in indent.
	    	ret[i] = ((Number)s.first()).byteValue();
warning: 1 line adds whitespace errors.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Re Stuart&apos;s comments, I don&apos;t think that&apos;s in the scope of this ticket or solution. &lt;/p&gt;</comment>
                    <comment id="31048" author="alexmiller" created="Fri, 3 May 2013 20:32:42 -0500"  >&lt;p&gt;Sending back to Karsten for the requested patch updates.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11890" name="byte-short-array-ctors.diff" size="1873" author="toxi" created="Mon, 4 Mar 2013 14:05:51 -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-1175] NPE in clojure.lang.Delay/deref</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1175</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If a Delay wraps a function which throws an exception, then forcing that delay multiple times causes behavior which is, to me at least, surprising and unexpected: the first time it is forced, the expected exception is thrown; but after that it will behave as if all locals the expression refers to are nil. This can manifest in multiple ways, depending on the expression being delayed:&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;;; calling a local as a function causes an NPE inside clojure.lang.Delay
(let [f #(/ 1 0) d (delay (f))]
  [(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d) 
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))
   (&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d)
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))])
[#&amp;lt;ArithmeticException java.lang.ArithmeticException: Divide by zero&amp;gt; 
 #&amp;lt;NullPointerException java.lang.NullPointerException&amp;gt;]&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;;; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; nil is a valid value, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; can cause subsequent forces to &lt;span class=&quot;code-quote&quot;&gt;&quot;succeed&quot;&lt;/span&gt;
;; even though the first fails as it should
(let [x (java.util.Date.) d (delay (seq x))]
  [(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d) 
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))
   (&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d)
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))])
[#&amp;lt;IllegalArgumentException java.lang.IllegalArgumentException: Don&apos;t know how to create ISeq from: java.util.Date&amp;gt; 
 nil]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason for this is that clojure.core/delay creates a ^:once function, promising to call it only once, so that the compiler can do locals-clearing on its lexical closure. However, when an exception is thrown the Delay object is left thinking it has never called the function, so when it is forced again it calls the function again, breaking its promise to the compiler and causing the function to run after its locals have been cleared.&lt;/p&gt;

&lt;p&gt;In fact, once we realize that locals-clearing is involved, we can make the delay behave differently the first N times it is forced, instead of only the first time, by constructing an expression which throws an exception before using all of its locals:&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 (java.util.Date.) 
            y (&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt;. 1)
            d (delay (let [y (seq y)]
                       (cons (seq x) y)))]
  [(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d) 
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))
   (&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d)
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))
   (&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; (force d)
        (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception e e))])
[#&amp;lt;IllegalArgumentException java.lang.IllegalArgumentException: Don&apos;t know how to create ISeq from: java.lang.&lt;span class=&quot;code-object&quot;&gt;Long&lt;/span&gt;&amp;gt; 
 #&amp;lt;IllegalArgumentException java.lang.IllegalArgumentException: Don&apos;t know how to create ISeq from: java.util.Date&amp;gt;
 (nil)]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m not sure what the right fix for this issue is: perhaps the best choice is even to leave it alone, and just document that delay&apos;s behavior is undefined if the expression throws an exception. However, I propose making the Delay remember the first exception that was thrown, and rethrow it on subsequent force attempts. This makes sense, in a way: the &quot;result&quot; of the expression was this exception &lt;b&gt;e&lt;/b&gt; being thrown, and so this should happen every time. It might be preferable to have the Delay retry the expression until it succeeds, but I don&apos;t believe this is possible without abandoning locals-clearing, which would cause perfectly-valid delays to now run out of memory, holding onto no-longer-needed locals just in case the expression needs to retry at some later date.&lt;/p&gt;

&lt;p&gt;So I&apos;ve attached a patch that causes Delay to rethrow the original exception, and a test for that behavior, which of course fails if the change to Delay is not made.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16057">CLJ-1175</key>
            <summary>NPE in clojure.lang.Delay/deref</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>Wed, 6 Mar 2013 15:06:15 -0600</created>
                <updated>Fri, 12 Apr 2013 09:42:00 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11894" name="delayed-exceptions.patch" size="2019" author="amalloy" created="Wed, 6 Mar 2013 15:06: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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1122] Add contributing.md file to github repository (shows clear message on issues/pull request create form)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1122</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This adds a clear message when someone wants to create a pull request/issue and invites the user to read the contribution guidelines: see &lt;a href=&quot;https://github.com/blog/1184-contributing-guidelines&quot;&gt;https://github.com/blog/1184-contributing-guidelines&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The same thing could be done for all the clojure/* repositories.&lt;/p&gt;

&lt;p&gt;The content of the file is just a markdown version of &lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Preview here: &lt;a href=&quot;https://github.com/mpenet/clojure/blob/aef170ca5eca1b71a2eb1ef320223d1277df0e5e/CONTRIBUTING.md&quot;&gt;https://github.com/mpenet/clojure/blob/aef170ca5eca1b71a2eb1ef320223d1277df0e5e/CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15877">CLJ-1122</key>
            <summary>Add contributing.md file to github repository (shows clear message on issues/pull request create form)</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="mpenet">Max Penet</reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Dec 2012 14:14:57 -0600</created>
                <updated>Fri, 17 May 2013 09:04:31 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30349" author="stu" created="Wed, 2 Jan 2013 06:31:18 -0600"  >&lt;p&gt;Please change this to link to the definitive prose, so we don&apos;t have to maintain that in two places.&lt;/p&gt;</comment>
                    <comment id="30350" author="mpenet" created="Wed, 2 Jan 2013 06:51:49 -0600"  >&lt;p&gt;Feel free to correct the wording, I used something simple.&lt;/p&gt;</comment>
                    <comment id="31098" author="cldwalker" created="Fri, 17 May 2013 09:04:03 -0500"  >&lt;p&gt;Stu, he linked to clojure.org as you requested so I&apos;m moving this along.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11754" name="contributing.patch" size="3555" author="mpenet" created="Sun, 9 Dec 2012 14:14:57 -0600" />
                    <attachment id="11787" name="contributing-v2.patch" size="563" author="mpenet" created="Wed, 2 Jan 2013 06:52:38 -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-1193] bigint, biginteger throw on double values outside of long range</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1193</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This works fine:&lt;/p&gt;

&lt;p&gt;    user&amp;gt; (bigint (* 0.99 Long/MAX_VALUE))&lt;br/&gt;
    9131138316486227968N&lt;/p&gt;

&lt;p&gt;but this and any other Float or Double values outside the range of a&lt;br/&gt;
long throw an exception:&lt;/p&gt;

&lt;p&gt;    user&amp;gt; (bigint (* 1.01 Long/MAX_VALUE))&lt;br/&gt;
    IllegalArgumentException Value out of range for long: 9.315605757223324E18  clojure.lang.RT.longCast (RT.java:1178)&lt;/p&gt;

&lt;p&gt;Similarly for biginteger&lt;/p&gt;</description>
                <environment></environment>
            <key id="16131">CLJ-1193</key>
            <summary>bigint, biginteger throw on double values outside of long range</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, 7 Apr 2013 16:35:13 -0500</created>
                <updated>Fri, 17 May 2013 10:52:24 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30902" author="jafingerhut" created="Sun, 7 Apr 2013 16:38:48 -0500"  >&lt;p&gt;Patch clj-1197-make-bigint-work-on-all-doubles-v1.txt dated Apr 7 2013 changes bigint and biginteger so that they return the correct value for all float and double values, and no longer throw an exception.&lt;/p&gt;</comment>
                    <comment id="31100" author="cldwalker" created="Fri, 17 May 2013 10:52:24 -0500"  >&lt;p&gt;Looks good. Tests pass and the failing example now converts correctly&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11948" name="clj-1197-make-bigint-work-on-all-doubles-v1.txt" size="2499" author="jafingerhut" created="Sun, 7 Apr 2013 16:38:48 -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-1072] Replace old metadata reader macro syntax</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1072</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;5 files still have old metadata reader syntax hash-caret instead of just caret:&lt;/p&gt;

&lt;p&gt;src/clj/clojure/core.clj&lt;br/&gt;
src/clj/clojure/gvec.clj&lt;br/&gt;
src/clj/clojure/java/browse_ui.clj&lt;br/&gt;
src/clj/clojure/java/io.clj&lt;br/&gt;
src/clj/clojure/repl.clj&lt;/p&gt;</description>
                <environment></environment>
            <key id="15709">CLJ-1072</key>
            <summary>Replace old metadata reader macro syntax</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="samaaron">Sam Aaron</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Sep 2012 05:30:17 -0500</created>
                <updated>Fri, 12 Apr 2013 08:13:37 -0500</updated>
                                    <version>Release 1.4</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29511" author="stuart.sierra" created="Fri, 21 Sep 2012 07:56:24 -0500"  >&lt;p&gt;Modified this ticket to cover all remaining cases of old metadata syntax. Added patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11515" name="0001-CLJ-1072-Replace-old-metadata-reader-macro-syntax.patch" size="8627" author="stuart.sierra" created="Fri, 21 Sep 2012 07:56:24 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

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

<item>
            <title>[CLJ-1184] Evaling #{do ...} or [do ...] is treated as the do special form</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1184</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Evaluating a persistent collection for which the function &apos;first&apos; returns the symbol &apos;do&apos; leads to that collection being treated as the do special form, even though it may be a vector or even a set. IMHO, the expected result would be to report that &apos;do&apos; cannot be resolved. For the cause, see the if condition on line 6604 of Compiler.java in clojure-1.5.1.&lt;/p&gt;

&lt;p&gt;E.g.:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;do 1 2&amp;#93;&lt;/span&gt;&lt;br/&gt;
;=&amp;gt; 2&lt;/p&gt;

&lt;p&gt;#{&quot;hello&quot; &quot;goodbye&quot; do}&lt;br/&gt;
;=&amp;gt; &quot;hello&quot;&lt;br/&gt;
; Wat?&lt;/p&gt;</description>
                <environment></environment>
            <key id="16093">CLJ-1184</key>
            <summary>Evaling #{do ...} or [do ...] is treated as the do special form</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</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="jirkamarsik">Ji&#345;&#237; Mar&#353;&#237;k</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Sat, 16 Mar 2013 08:56:32 -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>
                                <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-863] interleave should accept 1 or 0 arguments</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-863</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;interleave should handle 0 and 1 arguments in the same way that concat does (i.e., 0 args --&amp;gt; empty seq, 1 args --&amp;gt; identity).&lt;/p&gt;</description>
                <environment></environment>
            <key id="14807">CLJ-863</key>
            <summary>interleave should accept 1 or 0 arguments</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</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, 24 Oct 2011 14:50:34 -0500</created>
                <updated>Fri, 12 Apr 2013 10:03:08 -0500</updated>
                                    <version>Release 1.3</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>5</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28814" author="richhickey" created="Fri, 15 Jun 2012 09:31:29 -0500"  >&lt;p&gt;(lazy-seq nil) should be ()&lt;/p&gt;</comment>
                    <comment id="28817" author="joegallo" created="Fri, 15 Jun 2012 10:13:06 -0500"  >&lt;p&gt;Hey Rich, if you&apos;re talking about the first line of the diff:&lt;/p&gt;

&lt;p&gt;+  ([] (lazy-seq nil))&lt;/p&gt;

&lt;p&gt;Then that&apos;s the implementation, not the tests &amp;#8211; given an empty vector of arguments, return (lazy-seq nil), which I just copied from the existing definition of concat.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Joe&lt;/p&gt;</comment>
                    <comment id="29591" author="mdzaebel" created="Wed, 3 Oct 2012 13:19:59 -0500"  >&lt;p&gt;(defn interleave &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; s&amp;#93;&lt;/span&gt; (apply mapcat list s))&lt;/p&gt;</comment>
                    <comment id="29592" author="m0smith" created="Wed, 3 Oct 2012 20:47:53 -0500"  >&lt;p&gt;Marc&apos;s definition doesn&apos;t work for no arguments.  Maybe:&lt;/p&gt;

&lt;p&gt;(defn interleave &lt;br/&gt;
    ([] ()) &lt;br/&gt;
    (&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; s&amp;#93;&lt;/span&gt; (apply mapcat list s)))&lt;/p&gt;</comment>
                    <comment id="29608" author="mdzaebel" created="Fri, 5 Oct 2012 13:07:13 -0500"  >&lt;p&gt;Yes, but my solution is too slow, as it uses &quot;apply&quot;.&lt;/p&gt;</comment>
                    <comment id="30343" author="jafingerhut" created="Tue, 1 Jan 2013 11:54:06 -0600"  >&lt;p&gt;Patch clj-863-make-interleave-handle-odd-args-like-concat-patch-v1.txt dated Jan 1 2013 is identical to Joe Gallo&apos;s 0001-make-interleave-handle-odd-arugments-in-the-same-man.patch patch dated Oct 24 2011, except it returns () instead of (lazy-seq nil) as per Rich&apos;s comment.  If concat should also return () instead of (lazy-seq nil), perhaps another ticket should be created to fix that.  Also presumptuously changing ticket state from Incomplete back to Vetted, since the reason it was marked Incomplete should now be addressed, and it was Screened before.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10496" name="0001-make-interleave-handle-odd-arugments-in-the-same-man.patch" size="1247" author="joegallo" created="Mon, 24 Oct 2011 14:50:36 -0500" />
                    <attachment id="11785" name="clj-863-make-interleave-handle-odd-args-like-concat-patch-v1.txt" size="1235" author="jafingerhut" created="Tue, 1 Jan 2013 11:54:06 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

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

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

<item>
            <title>[CLJ-1143] Minor correction to doc string of ns macro</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1143</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The doc string of ns says &quot;If :refer-clojure is not used, a default (refer &apos;clojure) is used.&quot;  &apos;clojure should be replaced with &apos;clojure.core&lt;/p&gt;

&lt;p&gt;Clojure group thread: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/rDjZodxOMh8&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/rDjZodxOMh8&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15954">CLJ-1143</key>
            <summary>Minor correction to doc string of ns macro</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</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>Thu, 10 Jan 2013 13:32:17 -0600</created>
                <updated>Fri, 10 May 2013 12:30:41 -0500</updated>
                                    <version>Release 1.6</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30416" author="jafingerhut" created="Thu, 10 Jan 2013 13:34:23 -0600"  >&lt;p&gt;clj-1143-ns-doc-string-correction-v1.txt dated Jan 10 2013 replaces (refer &apos;clojure) with (refer &apos;clojure.core) in the doc string of the ns macro.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11800" name="clj-1143-ns-doc-string-correction-v1.txt" size="918" author="jafingerhut" created="Thu, 10 Jan 2013 13:34:23 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10004">Screened</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-1164] typos in instant.clj</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1164</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There are a few typographical mistakes in instant.clj.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16010">CLJ-1164</key>
            <summary>typos in instant.clj</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</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>
                    </labels>
                <created>Thu, 14 Feb 2013 11:59:36 -0600</created>
                <updated>Fri, 10 May 2013 12:48:26 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30598" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:01:17 -0600"  >&lt;p&gt;Fixes a couple of typos.  No code changes.&lt;/p&gt;</comment>
                    <comment id="31078" author="cldwalker" created="Fri, 10 May 2013 11:25:20 -0500"  >&lt;p&gt;For anyone wondering about the UTC change see &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-928&quot; title=&quot;instant literal for Date and Timestamp should print in UTC&quot;&gt;&lt;del&gt;CLJ-928&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11858" name="CLJ-1164-typos-instant.patch" size="1618" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:01:17 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10004">Screened</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-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-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-792] Refactor method resolution code out of Compiler and into Reflector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-792</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Issues:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Code for obtaining method/constructor instances is duplicated across the Compiler&lt;/li&gt;
	&lt;li&gt;Code for resolving a preferred overloaded method lives in the Compiler&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;By consolidating the duplicated code, moving the reflection-related parts into Reflector, and providing a straightforward API, it should be easier to read and understand the method resolution process.  Further, improvements to (e.g., &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;) the mechanism for reflecting on class members can largely be isolated from the Compiler.  And the few points of coordination (e.g., Compiler emitting same arg and return types as Reflector does when invoking) can be clearly identified and documented.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14423">CLJ-792</key>
            <summary>Refactor method resolution code out of Compiler and into Reflector</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</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="ataggart">Alexander Taggart</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 May 2011 14:14:39 -0500</created>
                <updated>Mon, 20 Feb 2012 13:11:06 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="27752" author="stuart.sierra" created="Fri, 17 Feb 2012 14:28:49 -0600"  >&lt;p&gt;Patch does not apply as of commit f5bcf64.&lt;/p&gt;</comment>
                    <comment id="27757" author="ataggart" created="Fri, 17 Feb 2012 15:14:47 -0600"  >&lt;p&gt;Yeah, year-old patches tend to do that.&lt;/p&gt;</comment>
                    <comment id="27777" author="jafingerhut" created="Mon, 20 Feb 2012 13:11:06 -0600"  >&lt;p&gt;I don&apos;t know if this is helpful or not, but this updated version of Alexander&apos;s patch applies cleanly to latest Clojure head as of Feb 20, 2012.  It compiles, but does not pass ant test.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10931" name="clj-792-reorg-reflector-patch2.txt" size="74113" author="jafingerhut" created="Mon, 20 Feb 2012 13:11:06 -0600" />
                    <attachment id="10226" name="reorg-reflector.patch" size="73345" author="ataggart" created="Wed, 11 May 2011 14:14:40 -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-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-790] Primitive type hints on function names should print error message</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-790</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Functions returning primitives are hinted with metadata on the argument list, not on the function name.  Using a primitive type hint on a function name should print an error message.&lt;/p&gt;

&lt;p&gt;Currently, misplaced primitive hints are read without error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14421">CLJ-790</key>
            <summary>Primitive type hints on function names should print error message</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="alan@thinkrelevance.com">Alan Dipert</assignee>
                                <reporter username="alan@thinkrelevance.com">Alan Dipert</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 May 2011 12:11:37 -0500</created>
                <updated>Tue, 10 May 2011 12:11:37 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</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-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-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-1059] PersistentQueue doesn&apos;t implement java.util.List, causing nontransitive equality</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1059</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;PersistentQueue implements Sequential but doesn&apos;t implement java.util.List. Lists form an equality partition, as do Sequentials. This means that you can end up with nontransitive equality:&lt;/p&gt;

&lt;p&gt;(def q (conj clojure.lang.PersistentQueue/EMPTY 1 2 3))&lt;br/&gt;
;=&amp;gt; #user/q&lt;br/&gt;
(def al (doto (java.util.ArrayList.) (.add 1) (.add 2) (.add 3)))&lt;br/&gt;
;=&amp;gt; #user/al&lt;br/&gt;
(def v &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;)&lt;br/&gt;
;=&amp;gt; #user/v&lt;br/&gt;
(= al v)&lt;br/&gt;
;=&amp;gt; true&lt;br/&gt;
(= v q)&lt;br/&gt;
;=&amp;gt; true&lt;br/&gt;
(not= al q)&lt;br/&gt;
;=&amp;gt; true&lt;/p&gt;

&lt;p&gt;This happens because PersistentQueue is a Sequential but not a List, ArrayList is a List but not a Sequential, and PersistentVector is both.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15669">CLJ-1059</key>
            <summary>PersistentQueue doesn&apos;t implement java.util.List, causing nontransitive equality</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="ppotter">Philip Potter</assignee>
                                <reporter username="ppotter">Philip Potter</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Sep 2012 04:23:59 -0500</created>
                <updated>Tue, 11 Dec 2012 13:58:01 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29446" author="ppotter" created="Sat, 15 Sep 2012 03:41:15 -0500"  >&lt;p&gt;Whoops, according to &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; I should have emailed clojure-dev before filing this ticket. Here is the discussion:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/ME3-Ke-RbNk/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/ME3-Ke-RbNk/discussion&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29452" author="ppotter" created="Sat, 15 Sep 2012 14:37:49 -0500"  >&lt;p&gt;Attached 001-make-PersistentQueue-implement-List.diff, 15/Sep/12&lt;/p&gt;

&lt;p&gt;Note that this patch has a minor conflict with the one I added to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt;, because both add an extra interface to PersistentQueue - List in this case, IHashEq in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="29473" author="chouser@n01se.net" created="Tue, 18 Sep 2012 01:04:48 -0500"  >&lt;p&gt;Philip, patch looks pretty good &amp;#8211; thanks for doing this.  A couple notes:&lt;/p&gt;

&lt;p&gt;This is only my opinion, but I prefer imports be listed without wildcards, even if it means an extra couple lines at the top of a .java file.&lt;/p&gt;

&lt;p&gt;I noticed the &quot;List stuff&quot; code is a copy of what&apos;s in ASeq and EmptyList.  I suppose this is copied because EmptyList and PersistentQueue extend Obj and therefore can&apos;t extend ASeq.  Is this the only reason?  It seems a shame to duplicate these method definitions, but I don&apos;t know of a better solution, do you?&lt;/p&gt;

&lt;p&gt;It would also be nice if the test check a couple of the List methods you&apos;ve implemented.&lt;/p&gt;</comment>
                    <comment id="29474" author="chouser@n01se.net" created="Tue, 18 Sep 2012 01:08:26 -0500"  >&lt;p&gt;oh, also &quot;git am&quot; refused to apply the patch, but I&apos;m not sure why.  &quot;patch -p 1&quot; worked perfectly.&lt;/p&gt;</comment>
                    <comment id="29475" author="ppotter" created="Tue, 18 Sep 2012 01:19:11 -0500"  >&lt;p&gt;did you use the --keep-cr option to git am?&lt;/p&gt;

&lt;p&gt;I struggled to know whether I should be adding CRs or not to line endings, because the files I was editing weren&apos;t consistent in their usage. If you open them in emacs, half the lines have ^M at the end.&lt;/p&gt;</comment>
                    <comment id="29476" author="ppotter" created="Tue, 18 Sep 2012 01:21:23 -0500"  >&lt;p&gt;Will submit another patch, with the import changed. I&apos;ll have a think about the list implementation and see what ideas I can come up with.&lt;/p&gt;</comment>
                    <comment id="29487" author="ppotter" created="Tue, 18 Sep 2012 15:17:17 -0500"  >&lt;p&gt;Attached 002-make-PersistentQueue-implement-Asequential.diff&lt;/p&gt;

&lt;p&gt;This patch is an alternative to 001-make-PersistentQueue-implement-List.diff&lt;/p&gt;

&lt;p&gt;So I took on board what you said about ASeq, but it didn&apos;t feel right making PersistentQueue directly implement ISeq, somehow.&lt;/p&gt;

&lt;p&gt;So I split ASeq into two parts &amp;#8211; ASequential, which implements j.u.{Collection,List} and manages List-equality and hashcodes; and ASeq, which... doesn&apos;t seem to be doing much anymore, to be honest.&lt;/p&gt;

&lt;p&gt;As a bonus, this patch fixes &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt; too, so I went and added the tests from that ticket in to demonstrate this fact. It also tidies up PersistentQueue by removing all equals/hashcCode stuff and all Collection stuff.&lt;/p&gt;

&lt;p&gt;(It turns out that because ASeq was already implementing Obj, the fact that PersistentQueue was implementing Obj was no barrier to using it.)&lt;/p&gt;

&lt;p&gt;Would appreciate comments on this approach, and how it differs from the previous patch here and the patch on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="29488" author="ppotter" created="Tue, 18 Sep 2012 15:44:45 -0500"  >&lt;p&gt;Looking at EmptyList&apos;s implementation of List, it is a duplicate of the others, but it shouldn&apos;t be. I think its implementation of indexOf is the biggest culprit - it should just be &apos;return -1;&apos; but it has a great big for loop! But this is beyond the scope of this ticket, so I won&apos;t patch that here.&lt;/p&gt;</comment>
                    <comment id="29731" author="jafingerhut" created="Sat, 20 Oct 2012 12:29:16 -0500"  >&lt;p&gt;Philip, now that the patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1070&quot; title=&quot;PersistentQueue&amp;#39;s hash function does not match its equality&quot;&gt;&lt;del&gt;CLJ-1070&lt;/del&gt;&lt;/a&gt; has been applied, these patches no longer apply cleanly.  Would you be willing to update them?  If so, please remove the obsolete patches.&lt;/p&gt;</comment>
                    <comment id="29747" author="ppotter" created="Mon, 22 Oct 2012 05:10:16 -0500"  >&lt;p&gt;Andy, thanks so much for your efforts to make people aware of these things. I will indeed submit new patches, hopefully later this week.&lt;/p&gt;</comment>
                    <comment id="29899" author="ppotter" created="Sat, 3 Nov 2012 12:23:20 -0500"  >&lt;p&gt;Replaced existing patches with new ones which apply cleanly to master.&lt;/p&gt;

&lt;p&gt;There are two patches:&lt;/p&gt;

&lt;p&gt;001-clj-1059-make-persistentqueue-implement-list.diff&lt;/p&gt;

&lt;p&gt;This fixes equality by making PersistentQueue implement List directly. I also took the opportunity to remove the wildcard import and to add tests for the List methods, as compared with the previous version of the patch.&lt;/p&gt;

&lt;p&gt;002-clj-1059-asequential.diff&lt;/p&gt;

&lt;p&gt;This fixes equality by creating a new abstract class ASequential, and making PersistentQueue extend this.&lt;/p&gt;

&lt;p&gt;My preferred solution is still the ASequential patch, but I&apos;m leaving both here for comparison.&lt;/p&gt;</comment>
                    <comment id="30123" author="halgari" created="Fri, 30 Nov 2012 15:37:33 -0600"  >&lt;p&gt;Vetting. &lt;/p&gt;</comment>
                    <comment id="30214" author="jafingerhut" created="Tue, 11 Dec 2012 12:50:19 -0600"  >&lt;p&gt;Philip, this time I think it was patches that were committed for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1000&quot; title=&quot;Performance drop in PersistentHashMap.valAt(...) in v.1.4 -- Util.hasheq(...) ?&quot;&gt;&lt;del&gt;CLJ-1000&lt;/del&gt;&lt;/a&gt; that make your patch 002-clj-1059-asequential.diff not apply cleanly.  I often fix up stale patches where the change is straightforward and mechanical, but in this case you are moving some methods that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1000&quot; title=&quot;Performance drop in PersistentHashMap.valAt(...) in v.1.4 -- Util.hasheq(...) ?&quot;&gt;&lt;del&gt;CLJ-1000&lt;/del&gt;&lt;/a&gt;&apos;s patch changed the implementation of, so it would be best if someone figured out a way to update this patch in a way that doesn&apos;t clobber the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1000&quot; title=&quot;Performance drop in PersistentHashMap.valAt(...) in v.1.4 -- Util.hasheq(...) ?&quot;&gt;&lt;del&gt;CLJ-1000&lt;/del&gt;&lt;/a&gt; changes.&lt;/p&gt;</comment>
                    <comment id="30216" author="ppotter" created="Tue, 11 Dec 2012 13:57:21 -0600"  >&lt;p&gt;Thanks Andy. Submitted a new patch, 002-clj-1059-asequential-rebased-to-cached-hasheq.diff, which supersedes 002-clj-1059-asequential.diff.&lt;/p&gt;

&lt;p&gt;The patch 001-clj-1059-make-persistentqueue-implement-list.diff still applies cleanly, and is still an alternative to 002-clj-1059-asequential-rebased-to-cached-hasheq.diff.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11660" name="001-clj-1059-make-persistentqueue-implement-list.diff" size="4129" author="ppotter" created="Sat, 3 Nov 2012 12:23:20 -0500" />
                    <attachment id="11755" name="002-clj-1059-asequential-rebased-to-cached-hasheq.diff" size="14108" author="ppotter" created="Tue, 11 Dec 2012 13:57: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="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-1096] Make destrucring emit direct keyword lookups</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1096</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently associative destructuring emits calls to get. The attached patch modify desctruture to emit direct keyword lookups when possible. &lt;/p&gt;

&lt;p&gt;Approved here &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/MaYcHQck8VA/nauMus4mzPgJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/MaYcHQck8VA/nauMus4mzPgJ&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15801">CLJ-1096</key>
            <summary>Make destrucring emit direct keyword lookups</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="cgrand">Christophe Grand</assignee>
                                <reporter username="cgrand">Christophe Grand</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Oct 2012 08:05:45 -0500</created>
                <updated>Sat, 26 Jan 2013 08:15:49 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="11639" name="desctructure-keyword-lookup.diff" size="1586" author="cgrand" created="Mon, 29 Oct 2012 08:05:45 -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-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-1165] Forbid varargs defprotocol/definterface method declarations because those cannot be defined anyway</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1165</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Protocol, interface method declarations don&apos;t allow for varags.  Currently, 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;  (defprotocol FooBar
    (foo [this &amp;amp; more]))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;compiles just fine, and &lt;tt&gt;&amp;amp;&lt;/tt&gt; is interpreted as a usual argument that happens to be&lt;br/&gt;
named &lt;tt&gt;&amp;amp;&lt;/tt&gt; without special meaning.  But clearly, the user wanted to specify a&lt;br/&gt;
varags parameter here.  The same applies to &lt;tt&gt;definterface&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Similarly, providing method implementations via &lt;tt&gt;defrecord&lt;/tt&gt;, &lt;tt&gt;deftype&lt;/tt&gt;, and &lt;tt&gt;reify&lt;/tt&gt;&lt;br/&gt;
don&apos;t allow for varags (but dynamic extensions via &lt;tt&gt;extend&lt;/tt&gt; do).&lt;/p&gt;

&lt;p&gt;So this patch makes &lt;tt&gt;defprotocol&lt;/tt&gt; and &lt;tt&gt;definterface&lt;/tt&gt; throw an&lt;br/&gt;
&lt;tt&gt;IllegalArgumentException&lt;/tt&gt; if a user tries to use varargs in method signatures.&lt;/p&gt;

&lt;p&gt;Similarly, &lt;tt&gt;defrecord&lt;/tt&gt;, &lt;tt&gt;deftype&lt;/tt&gt;, and &lt;tt&gt;reify&lt;/tt&gt; throw an &lt;tt&gt;IllegalArgumentException&lt;/tt&gt; if&lt;br/&gt;
any method implementation arglist contains a varargs argument.&lt;/p&gt;

&lt;p&gt;This patch is a cut-down variant of my patch to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1024&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1024&lt;/a&gt;&lt;br/&gt;
which has been reverted shortly before Clojure 1.5 was released.  The &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1024&quot; title=&quot;Varargs protococol impls can be defined but not called&quot;&gt;&lt;del&gt;CLJ-1024&lt;/del&gt;&lt;/a&gt; patch&lt;br/&gt;
was the same as this one, but it has also forbidden destructuring in &lt;tt&gt;defprotocol&lt;/tt&gt; and&lt;br/&gt;
&lt;tt&gt;definterface&lt;/tt&gt;.  This was a bit too much, because although destructuring has no&lt;br/&gt;
semantic meaning with method declarations, it still can serve a documentation purpose.&lt;/p&gt;

&lt;p&gt;This has been discussed on the list: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/qjkW-cv8nog/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/qjkW-cv8nog/discussion&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16015">CLJ-1165</key>
            <summary>Forbid varargs defprotocol/definterface method declarations because those cannot be defined anyway</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="stu">Stuart Halloway</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                    </labels>
                <created>Fri, 15 Feb 2013 02:13:32 -0600</created>
                <updated>Thu, 4 Apr 2013 19:24:27 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30834" author="stu" created="Fri, 29 Mar 2013 05:27:06 -0500"  >&lt;p&gt;I think that this patch would be much more helpful to users if it reported the problem form (both name and params). &lt;/p&gt;

&lt;p&gt;(And I wonder if we should be using ex-info for all errors going forward.)&lt;/p&gt;</comment>
                    <comment id="30853" author="tsdh" created="Sun, 31 Mar 2013 05:17:34 -0500"  >&lt;p&gt;New version of the patch that mentions both method name and argument vector, and uses ex-info as Stu suggested.&lt;/p&gt;</comment>
                    <comment id="30874" author="jafingerhut" created="Thu, 4 Apr 2013 19:24:27 -0500"  >&lt;p&gt;Presumuptuously changing Approval from Incomplete back to None, since the reason for marking it Incomplete seems to have been addressed with a new patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11933" name="0001-Protocol-interface-method-declarations-don-t-allow-f.patch" size="3236" author="tsdh" created="Sun, 31 Mar 2013 05:17:34 -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-1093] Empty record literals gets incorrectly evaluated to array-maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1093</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;before patch:&lt;br/&gt;
user=&amp;gt; (defrecord a &lt;span class=&quot;error&quot;&gt;&amp;#91;b&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.a&lt;br/&gt;
user=&amp;gt; #user.a{}&lt;br/&gt;
{}&lt;/p&gt;

&lt;p&gt;after patch:&lt;br/&gt;
user=&amp;gt; (defrecord a &lt;span class=&quot;error&quot;&gt;&amp;#91;b&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.a&lt;br/&gt;
user=&amp;gt; #user.a{}&lt;br/&gt;
#user.a{:b nil}&lt;/p&gt;</description>
                <environment></environment>
            <key id="15776">CLJ-1093</key>
            <summary>Empty record literals gets incorrectly evaluated to array-maps</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="4" iconUrl="http://dev.clojure.org/jira/images/icons/status_reopened.gif">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="halgari">Timothy Baldridge</assignee>
                                <reporter username="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Oct 2012 09:13:56 -0500</created>
                <updated>Wed, 13 Mar 2013 14:04:29 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30052" author="halgari" created="Tue, 27 Nov 2012 11:41:24 -0600"  >&lt;p&gt;Unable to reproduce this bug on latest version of master. Most likely fixed by some of the recent changes to data literal readers. &lt;/p&gt;

&lt;p&gt;Marking Not-Approved. &lt;/p&gt;</comment>
                    <comment id="30053" author="halgari" created="Tue, 27 Nov 2012 11:41:53 -0600"  >&lt;p&gt;Could not reproduce in master. &lt;/p&gt;</comment>
                    <comment id="30681" author="bronsa" created="Fri, 1 Mar 2013 13:23:09 -0600"  >&lt;p&gt;I just checked, and the problem still exists for records with no arguments:&lt;/p&gt;

&lt;p&gt;Clojure 1.6.0-master-SNAPSHOT&lt;br/&gt;
user=&amp;gt; (defrecord a [])&lt;br/&gt;
user.a&lt;br/&gt;
user=&amp;gt; #user.a[]&lt;br/&gt;
{}&lt;/p&gt;

&lt;p&gt;Admittedly it&apos;s an edge case and I see little usage for no-arguments records, but I think it should be addressed aswell since the current behaviour is not what one would expect&lt;/p&gt;</comment>
                    <comment id="30685" author="bendlas" created="Sat, 2 Mar 2013 08:14:28 -0600"  >&lt;p&gt;Got the following REPL interaction:&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 ~/.m2/repository/org/clojure/clojure/1.5.0/clojure-1.5.0.jar
user=&amp;gt; (defrecord a [])
user.a
user=&amp;gt; (a.)
#user.a{}
user=&amp;gt; #user.a{}
{}
#user.a[]
{}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This should be reopened or declined for another reason than reproducability.&lt;/p&gt;</comment>
                    <comment id="30721" author="bronsa" created="Sun, 10 Mar 2013 14:18:03 -0500"  >&lt;p&gt;I&apos;m reopening this since the bug is still there.&lt;/p&gt;
</comment>
                    <comment id="30759" author="jafingerhut" created="Wed, 13 Mar 2013 14:04:29 -0500"  >&lt;p&gt;Patch clj-1093-fix-empty-record-literal-patch-v2.txt dated Mar 13, 2013 is identical to Bronsa&apos;s patch 001-fix-empty-record-literal.patch dated Oct 24, 2012, except that it applies cleanly to latest master.  I&apos;m not sure why the older patch doesn&apos;t but git doesn&apos;t like something about it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11609" name="001-fix-empty-record-literal.patch" size="2007" author="bronsa" created="Wed, 24 Oct 2012 09:19:36 -0500" />
                    <attachment id="11914" name="clj-1093-fix-empty-record-literal-patch-v2.txt" size="1771" author="jafingerhut" created="Wed, 13 Mar 2013 14:04: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-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