<!--
RSS generated by JIRA (4.4#649-r158309) at Wed Jun 19 05:17:36 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/10200/SearchRequest-10200.xml?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>patches! (Clojure JIRA)</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?requestId=10200</link>
        <description></description>
                <language>en-us</language>
                        <issue start="0" end="131" total="131"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<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-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-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-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-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-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-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-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-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-1010] A left-to-right-variant of `comp`</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1010</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The function composition function `comp` is quite inefficient in cases like `(apply comp large-seq-of-fns)`, because its arity-greater-than-3 version reverses the seq.&lt;/p&gt;

&lt;p&gt;I would be great if there was an alternative `comp*` (or whatever) function which is just like `comp` but composes left-to-right.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15524">CLJ-1010</key>
            <summary>A left-to-right-variant of `comp`</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                    </labels>
                <created>Mon, 11 Jun 2012 04:57:55 -0500</created>
                <updated>Thu, 14 Jun 2012 18:27:23 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28772" author="tsdh" created="Mon, 11 Jun 2012 05:16:50 -0500"  >&lt;p&gt;Here&apos;s an implementation.&lt;/p&gt;</comment>
                    <comment id="28776" author="tsdh" created="Mon, 11 Jun 2012 12:41:07 -0500"  >&lt;p&gt;There&apos;s something strange with my patch.  The creation of a composition of a huge seq of functions is much faster with `comp*` than with `comp`, which is expected, because the seq doesn&apos;t need to be reversed.&lt;/p&gt;

&lt;p&gt;The strange thing however is that the compositions created with `comp` evaluate about 10-20% faster than those created with `comp*` although the arbitrary-arity version of `comp` is defined in terms of `comp*`: `(apply comp* (reverse (list* f1 f2 f3 fs)))`.&lt;/p&gt;

&lt;p&gt;For some benchmarking details, see: &lt;a href=&quot;https://groups.google.com/d/msg/clojure/MizwTxHwLE4/hGLrMfetlP8J&quot;&gt;https://groups.google.com/d/msg/clojure/MizwTxHwLE4/hGLrMfetlP8J&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28802" author="tsdh" created="Thu, 14 Jun 2012 02:32:38 -0500"  >&lt;p&gt;Here&apos;s some benchmark:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user&amp;gt; (use &apos;criterium.core)
nil
user&amp;gt; (let [coll (doall (take 1000000 (repeat inc)))
	   f1 (apply comp* coll) 
	   f2 (apply comp coll)] 
	   (bench (f1 0) :verbose) 
	   (println &quot;---------------------------------------&quot;)
	   (bench (f2 0) :verbose))
amd64 Linux 3.4.2-gentoo 2 cpu(s)
OpenJDK 64-Bit Server VM 22.0-b10
Runtime arguments: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -XX:+TieredCompilation -Xmx1G -Dclojure.compile.path=/home/horn/Repos/clj/testi/target/classes -Dtesti.version=0.1.0-SNAPSHOT -Dclojure.debug=false
Evaluation count             : 600
             Execution time mean : 112.324465 ms  95.0% CI: (112.247218 ms, 112.380682 ms)
    Execution time std-deviation : 6.513809 ms  95.0% CI: (6.477450 ms, 6.553029 ms)
         Execution time lower ci : 105.609401 ms  95.0% CI: (105.609401 ms, 105.622918 ms)
         Execution time upper ci : 122.353763 ms  95.0% CI: (122.353763 ms, 122.405315 ms)
---------------------------------------
amd64 Linux 3.4.2-gentoo 2 cpu(s)
OpenJDK 64-Bit Server VM 22.0-b10
Runtime arguments: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -XX:+TieredCompilation -Xmx1G -Dclojure.compile.path=/home/horn/Repos/clj/testi/target/classes -Dtesti.version=0.1.0-SNAPSHOT -Dclojure.debug=false
Evaluation count             : 1440
             Execution time mean : 43.519663 ms  95.0% CI: (43.516732 ms, 43.524062 ms)
    Execution time std-deviation : 492.299089 us  95.0% CI: (490.829889 us, 494.198137 us)
         Execution time lower ci : 42.781398 ms  95.0% CI: (42.781398 ms, 42.781398 ms)
         Execution time upper ci : 44.157311 ms  95.0% CI: (44.157311 ms, 44.158513 ms)
nil
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="28803" author="tsdh" created="Thu, 14 Jun 2012 03:40:08 -0500"  >&lt;p&gt;Ok, I&apos;ve tracked down the performance difference.  This comes from the fact that `reverse` creates a clojure.lang.PersistentList which can be iterated much faster than a (fully realized) LazySeq.  If you provide your fncoll in `(apply comp* fncoll)` as vector or list, the application of the created composition is as fast as for `comp`.&lt;/p&gt;

&lt;p&gt;So for me, the patch is good and makes sense.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11307" name="0001-CLJ-1010-Add-a-left-to-right-version-of-comp-comp.patch" size="2569" author="tsdh" created="Mon, 11 Jun 2012 05:16:50 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1029] ns defmacro allows arbitrary execution of clojure.core fns</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1029</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The form:&lt;/p&gt;

&lt;p&gt;    (ns foo (:print &quot;I AM A ROBOT&quot;))&lt;/p&gt;

&lt;p&gt;will print &quot;I AM A ROBOT&quot;&lt;/p&gt;

&lt;p&gt;This is because the defmacro takes the name of the first element of the reference, looks it up in the clojure.core namespace and invokes it on the rest of the args.&lt;/p&gt;

&lt;p&gt;This is minor, but it does mean that an otherwise declarative form is not executing code.&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="15588">CLJ-1029</key>
            <summary>ns defmacro allows arbitrary execution of clojure.core fns</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="craigbrozefsky">Craig Brozefsky</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Jul 2012 21:00:38 -0500</created>
                <updated>Sun, 5 Aug 2012 10:00:07 -0500</updated>
                                    <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29043" author="amalloy" created="Wed, 25 Jul 2012 16:37:07 -0500"  >&lt;p&gt;One apparent problem with this patch is that you throw an exception for :refer. You should add that, and make sure there aren&apos;t any others missing. Also, #{x y z} is better than (set &lt;span class=&quot;error&quot;&gt;&amp;#91;x y z&amp;#93;&lt;/span&gt;), and you should probably use pr-str rather than str, although I can&apos;t think of a case where it matters for the objects in question.&lt;/p&gt;</comment>
                    <comment id="29051" author="jafingerhut" created="Thu, 26 Jul 2012 18:31:58 -0500"  >&lt;p&gt;A more minor detail of patch formatting &amp;#8211; please attach your patch in git format.  See the instructions under the section heading &quot;Development&quot; on this web page: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29085" author="craigbrozefsky" created="Sun, 5 Aug 2012 09:53:15 -0500"  >&lt;p&gt;git format-patch version of the diff, with the edits suggested by other maintainers.&lt;/p&gt;</comment>
                    <comment id="29086" author="craigbrozefsky" created="Sun, 5 Aug 2012 10:00:07 -0500"  >&lt;p&gt;Alan: please note that :refer was not mentioned in the docstring for ns, or used in any of the unit tests for clojure.&lt;/p&gt;

&lt;p&gt;Are you sure that it is an expected argument, or just an arrangement that happens to work under the current ns macro?  The docstring for &apos;refer itself says to use :use in ns macros instead of calling refer.&lt;/p&gt;

&lt;p&gt;I added &quot;refer&quot; to the set of accepted references all the same.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11412" name="ns-patch.diff" size="1076" author="craigbrozefsky" created="Sun, 5 Aug 2012 09:53:15 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-958] Make APersistentVector.iterator slightly more efficient</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-958</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The attached patch uses a sequence to create an iterator for persistent vectors.  It should be slightly more efficient for PersistentVector objects than repeatedly calling nth (for reasons that I outline in the commit message).  &lt;/p&gt;</description>
                <environment></environment>
            <key id="15290">CLJ-958</key>
            <summary>Make APersistentVector.iterator slightly more efficient</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chrismgray">Chris Gray</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Mar 2012 13:28:07 -0500</created>
                <updated>Tue, 14 Aug 2012 13:43:53 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11003" name="0001-Make-APersistentVector.iterator-slightly-more-effici.patch" size="1394" author="chrismgray" created="Fri, 23 Mar 2012 13:28:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

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

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

<item>
            <title>[CLJ-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-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-957] Typehints for variadic methods in deftype fail to compile</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-957</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When a method defined by a protocol has multiple typehinted signatures, it is impossible to implement them using deftype because deftype throws away the typehints.  The compiler then looks for the proper signatures (i.e. with typehints) and throws an exception when it can&apos;t find them.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15289">CLJ-957</key>
            <summary>Typehints for variadic methods in deftype fail to compile</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chrismgray">Chris Gray</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Mar 2012 17:24:31 -0500</created>
                <updated>Sun, 19 Aug 2012 04:31:33 -0500</updated>
                                    <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27982" author="chrismgray" created="Thu, 22 Mar 2012 17:41:46 -0500"  >&lt;p&gt;Clojure-dev discussion started here: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/1f106a21ec1ce3de&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/1f106a21ec1ce3de&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29228" author="jafingerhut" created="Sun, 19 Aug 2012 04:31:33 -0500"  >&lt;p&gt;Patch clj-957-allow-typehinting-of-method-signatures-in-deftype-patch2.txt dated Aug 19 2012 is identical to Chris Gray&apos;s patch 0001-Allow-for-typehinting-of-method-signatures-in-deftyp.patch dated Mar 22, 2012, except it has some updated context lines so that it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11002" name="0001-Allow-for-typehinting-of-method-signatures-in-deftyp.patch" size="3242" author="chrismgray" created="Thu, 22 Mar 2012 17:24:31 -0500" />
                    <attachment id="11448" name="clj-957-allow-typehinting-of-method-signatures-in-deftype-patch2.txt" size="3247" author="jafingerhut" created="Sun, 19 Aug 2012 04:31:32 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

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

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

<item>
            <title>[CLJ-1047] Simplify the process of requiring fj in clojure.core.reducers</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1047</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;this patch removes compile-if in favor of import-if, removing code duplication&lt;/p&gt;</description>
                <environment></environment>
            <key id="15638">CLJ-1047</key>
            <summary>Simplify the process of requiring fj in clojure.core.reducers</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Aug 2012 18:27:01 -0500</created>
                <updated>Tue, 21 Aug 2012 18:27:01 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11451" name="001-simplify-fj-importing.patch" size="2641" author="bronsa" created="Tue, 21 Aug 2012 18:27:01 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-373] update-in with empty key paths</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-373</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;To the topic of get-in and update-in. While I realize this is not a bug it is odd and in my eyes unexpected and unwanted behavior.&lt;/p&gt;

&lt;p&gt;get-in called with an empty path returns the hashmap it was given to walk through - this is as I expect and makes a lot of sense when dynamically (with generated pathes ) walking a hash map.&lt;/p&gt;

&lt;p&gt;update-in behaves differently and while from the implementation side, it&apos;s behavior too makes sense, it does not work as expected (at least not for me) update-in with an empty map creates a new key &apos;nil&apos; so:&lt;/p&gt;

&lt;p&gt;(update-in {...} [] f) ist he same as (update-in {...} &lt;span class=&quot;error&quot;&gt;&amp;#91;nil&amp;#93;&lt;/span&gt; f) while (get-in {...} []) is not the same as (get-in {...} &lt;span class=&quot;error&quot;&gt;&amp;#91;nil&amp;#93;&lt;/span&gt;) and of cause differs from what update-in does.&lt;/p&gt;

&lt;p&gt;For automatically walking trees the behavior of get-in makes a lot more sense since the current behavior of update-in forces you to check for empty paths and if they are empty fall back to plain assoc and get (or get-in since this works):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;-let [r (butlast @path)]
(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
  (alter m update-in r dissoc (last @path))
  (alter m update-in r assoc {:name @sr} c))
(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
  (alter m dissoc (last @path))
  (alter m assoc {:name @sr} c)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next argument is that update-in with an empty map working on nil isn&apos;t easy to gasp, one needs to know the implementation details to realize that it works, I think 90% of the people reading update-in with [] will not instinctively know that it works on the key nil, so changing this would most likely not break any current code, and if it would the code would be bad anyway &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/tongue.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;

&lt;p&gt;Chouser has, a very nice solution on the mailing list that would fix the problem I&apos;m not sure if I&apos;m entitled to post it here since I did not wrote it but it can be found in this thread: &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/de5b20b8c3fe498b?hl=en&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/de5b20b8c3fe498b?hl=en&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Heinz&lt;/p&gt;</description>
                <environment></environment>
            <key id="13770">CLJ-373</key>
            <summary>update-in with empty key paths</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Jun 2010 10:31:00 -0500</created>
                <updated>Sat, 8 Sep 2012 06:13:29 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="23998" author="importer" created="Fri, 8 Oct 2010 10:33:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/373&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/373&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="25938" author="chouser@n01se.net" created="Sat, 13 Nov 2010 18:37:53 -0600"  >&lt;p&gt;I&apos;ve attached my code from the g.group thread in the form of a patch, in case it&apos;s sufficient.  (Thanks to abedra for the gentle kick in the pants.)&lt;/p&gt;</comment>
                    <comment id="25974" author="stu" created="Mon, 29 Nov 2010 08:20:59 -0600"  >&lt;p&gt;Looks to me like the patch is misusing if-let, e.g.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(when-let [[k &amp;amp; mk] []] &lt;span class=&quot;code-quote&quot;&gt;&quot;Doh!&quot;&lt;/span&gt;) 
=&amp;gt; Doh!&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Please correct, and add tests for &lt;tt&gt;nil&lt;/tt&gt; and &lt;tt&gt;[]&lt;/tt&gt; keys (at least).&lt;/p&gt;</comment>
                    <comment id="28412" author="scottlowe" created="Tue, 8 May 2012 12:20:53 -0500"  >&lt;p&gt;I will write some tests and correct this.&lt;/p&gt;</comment>
                    <comment id="28419" author="scottlowe" created="Wed, 9 May 2012 20:39:11 -0500"  >&lt;p&gt;I&apos;m sorry to report that my good intentions of wanting to help clear some of the project backlog has created more work by way of further questions. I&apos;d also like to clarify the desired new behaviours for the test cases.&lt;/p&gt;

&lt;p&gt;Heinz proposed that an empty key sequence will not create a new nil key in the returned map.&lt;br/&gt;
He also suggested that the following behaviour changes be made (compare old and new* behaviours):&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
(update-in {1 2} [] (constantly {2 3}))
{nil {2 3}, 1 2}

(update-in* {1 2} [] (constantly {2 3}))
{2 3}

(update-in {1 2} [] assoc  1 3)
{nil {1 3}, 1 2}

(update-in* {1 2} [] assoc  1 3)
{1 3}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Chouser also added that nil keys should be honoured, as before:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
(update-in* {nil 2} [nil] (constantly 3))
{nil 3}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;I&apos;ve added a variety of tests to cover the existing behaviour and would like to confirm that the above is all that&apos;s required for new behaviour.&lt;/p&gt;

&lt;p&gt;The patch from November 2010 didn&apos;t work, but I tweaked it with a &lt;em&gt;when-let&lt;/em&gt; as Stuart suggested and placed a check for an empty sequence of keys before the &lt;em&gt;when-let&lt;/em&gt; block; because essentially, the primary behaviour change boils down to simply handling an empty sequence of keys, in addition to the existing behaviours.&lt;/p&gt;

&lt;p&gt;I&apos;m not entirely convinced that these changes are a good thing, but at least there&apos;s now something concrete for discussion. Please have a look at what is there. The good news is that at least there are some tests covering &lt;em&gt;update-in&lt;/em&gt; now.&lt;/p&gt;</comment>
                    <comment id="28596" author="jafingerhut" created="Thu, 24 May 2012 22:35:24 -0500"  >&lt;p&gt;clj-373-alter-behavior-of-update-in-with-empty-key-patch2.txt dated May 24, 2012 supersedes patch 0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-373&quot; title=&quot;update-in with empty key paths&quot;&gt;CLJ-373&lt;/a&gt;&lt;del&gt;Alter-behaviour-of-update-in-with-empty-key&lt;/del&gt;.patch dated May 9, 2012.  It makes no changes to the contents of the patch except in the lines of context that have changed since the earlier patch was created.  It applies cleanly to the latest master whereas the earlier patch no longer does.  Builds and passes tests with Oracle/Apple JDK 1.6 on Mac OS X 10.6.8.&lt;/p&gt;</comment>
                    <comment id="29176" author="fogus" created="Wed, 15 Aug 2012 11:21:49 -0500"  >&lt;p&gt;This patch creates a new error mode highlighted by the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(update-in {:a 1} [] inc)

; ClassCastException clojure.lang.PersistentArrayMap cannot be cast to java.lang.Number
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason is that the code that executes in the event that the keys are empty (or nil) blindly assumes that the function given can be applied to the map itself. This is no problem in the case of &lt;tt&gt;assoc&lt;/tt&gt; and the like, but clearly not for &lt;tt&gt;inc&lt;/tt&gt; and many other useful functions.&lt;/p&gt;

&lt;p&gt;The old behavior was to throw an NPE and if any code relies on that fact is now broken. Maybe this is not a problem, but I&apos;m kicking it back to get a little more discussion &lt;b&gt;and&lt;/b&gt; to request that whatever the ultimate fix happens to be, its behavioral changes and error modes are noted in the docstring for &lt;tt&gt;update-in&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="29407" author="gv" created="Sat, 8 Sep 2012 06:11:44 -0500"  >&lt;p&gt;I vote for changing `update-in` to support empty key vectors.&lt;/p&gt;

&lt;p&gt;Because I think &quot;(apply f m args)&quot; in case of an empty vector is the natural continuation of the usual behavior of update-in:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;update-in with 2 keys the second level map is updated&lt;/li&gt;
	&lt;li&gt;update-in with 1 key the first level map (child of given map) is updated&lt;/li&gt;
	&lt;li&gt;update-in with no key the given map (zero level) is updated.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Otherwise, you will always have to wrap update-in in something like the following when the keys vector is computed:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;    (if (seq keys) (apply update-in m keys f args) (apply f m args))&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;To Fogus&apos; last post: (update-in {:a {:b 1}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a&amp;#93;&lt;/span&gt; inc) fails similar and is not handled with a special exception.&lt;/p&gt;



</comment>
                </comments>
                    <attachments>
                    <attachment id="11182" name="0001-CLJ-373-Alter-behaviour-of-update-in-with-empty-key-.patch" size="2922" author="scottlowe" created="Wed, 9 May 2012 20:39:11 -0500" />
                    <attachment id="10019" name="0001-Support-empty-path-in-update-in.-CLJ-373.patch" size="949" author="chouser@n01se.net" created="Sat, 13 Nov 2010 18:37:53 -0600" />
                    <attachment id="11256" name="clj-373-alter-behavior-of-update-in-with-empty-key-patch2.txt" size="2901" author="jafingerhut" created="Thu, 24 May 2012 22:35:24 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

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

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

<item>
            <title>[CLJ-1021] (let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1021</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;i 5&amp;#93;&lt;/span&gt; (defmacro m &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; args) (def x (m (inc 5) (inc 6) (inc 7))) &lt;a href=&quot;#&amp;#39;m)&quot;&gt;x m (meta #&apos;m)&lt;/a&gt;)&lt;br/&gt;
is&lt;br/&gt;
[(8) #&amp;lt;user$eval522$m_&lt;em&gt;523 user$eval522$m&lt;/em&gt;_523@11a74355&amp;gt; {:macro true, :ns #&amp;lt;Namespace user&amp;gt;, :name m, :arglists (&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt;), :line 1, :file &quot;NO_SOURCE_PATH&quot;}]&lt;/p&gt;

&lt;p&gt;It appears to be interpreting m as a function despite the metadata. This behavior only shows up inside the (let ...).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15565">CLJ-1021</key>
            <summary>(let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="zii-prime">Zii Prime</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 2 Jul 2012 23:32:22 -0500</created>
                <updated>Thu, 13 Sep 2012 14:29:20 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29222" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500"  >&lt;p&gt;The problem is the same as the one for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-918&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-918&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The patch linked there was mine but i had no CA signed at that time, and no account on jira.&lt;/p&gt;

&lt;p&gt;Here is the same patch in the correct format.&lt;/p&gt;

&lt;p&gt;Bug #918 should be closed as this is a duplicate&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11443" name="001-propagate-on-macro-meta.diff" size="1018" author="bronsa" created="Sat, 18 Aug 2012 11:43:42 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1020] clojure.inspector/inspect-table gives up when first element of coll is nil</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1020</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.inspector/inspect-table gives up when first element of coll is nil. The patch provided is rather trivial...instead of blindly choosing the first element (which might be nil), it would be more convenient to choose the first element that is NOT nil and use its keys for columns...a similar issue exists with clojure.pprint/print-table where the keys of the first element are used (if not provided explicitly). The same is not true for &apos;inspect-table&apos; though. As a result, one cannot &apos;inspect&apos; a collection of maps where the first element is nil. My (trivial) patch looks for the first element which is NOT nil and uses its keys instead. Maps have to have the same length anyway so no problems there...&lt;/p&gt;</description>
                <environment>Ubuntu 12.04, Java 7, Clojure 1.4</environment>
            <key id="15563">CLJ-1020</key>
            <summary>clojure.inspector/inspect-table gives up when first element of coll is nil</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="jimpil">Dimitrios Piliouras</reporter>
                        <labels>
                        <label>patch,</label>
                    </labels>
                <created>Mon, 2 Jul 2012 05:26:42 -0500</created>
                <updated>Thu, 13 Sep 2012 14:30:24 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28981" author="jafingerhut" created="Thu, 12 Jul 2012 13:01:18 -0500"  >&lt;p&gt;clj-1020-inspect-table-skip-nil-rows-patch1.txt of July 12, 2012 is identical to inspector.patch of July 2, 2012, except it is in the desired git format.  Proper attribution is given to author Dimitrios Piliouras in the patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11379" name="clj-1020-inspect-table-skip-nil-rows-patch1.txt" size="722" author="jafingerhut" created="Thu, 12 Jul 2012 13:01:18 -0500" />
                    <attachment id="11359" name="inspector.patch" size="329" author="jimpil" created="Mon, 2 Jul 2012 05:26:42 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-1063] Missing dissoc-in</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1063</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There is no clojure.core/dissoc-in although there is an assoc-in.&lt;br/&gt;
It is correct that dissoc-in can be build with update-in and dissoc but this is an argument against assoc-in as well.&lt;br/&gt;
When a shortcut for assoc-in is provided, there should also be one for dissoc-in for consistency reasons.&lt;br/&gt;
Implementation is analogical to assoc-in.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15682">CLJ-1063</key>
            <summary>Missing dissoc-in</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gv">Gunnar V&#246;lkel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Sep 2012 05:20:59 -0500</created>
                <updated>Mon, 17 Sep 2012 07:04:54 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29434" author="jafingerhut" created="Thu, 13 Sep 2012 14:17:36 -0500"  >&lt;p&gt;Patch clj-1063-add-dissoc-in-patch-v2.txt dated Sep 13 2012 supersedes 001-dissoc-in.diff dated Sep 7 2012.  It fixes a typo (missing final &quot; in doc string), and adds a test case for the new function.&lt;/p&gt;</comment>
                    <comment id="29436" author="bronsa" created="Thu, 13 Sep 2012 14:27:24 -0500"  >&lt;p&gt;Thanks for the fix Andy&lt;/p&gt;</comment>
                    <comment id="29444" author="jafingerhut" created="Fri, 14 Sep 2012 20:24:31 -0500"  >&lt;p&gt;This proposed dissoc-in should be compared with the one in clojure.core.incubator which I just happened across.  I see they look different, but haven&apos;t examined to see if there are any behavior differences.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj&quot;&gt;https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29447" author="bronsa" created="Sat, 15 Sep 2012 06:43:55 -0500"  >&lt;p&gt;dissoc-in in clojure.core.incubator recursively removes empty maps&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (clojure.core.incubator/dissoc-in {:a {:b {:c 1}}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{}&lt;/p&gt;

&lt;p&gt;while the one in this patch doesn&apos;t (as I would expect)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (dissoc-in {:a {:b {:c 1}}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt;)&lt;br/&gt;
{:a {:b {}}}&lt;/p&gt;</comment>
                    <comment id="29459" author="stu" created="Mon, 17 Sep 2012 07:04:54 -0500"  >&lt;p&gt;Please do this work in the incubator.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11483" name="001-dissoc-in.diff" size="949" author="bronsa" created="Fri, 7 Sep 2012 06:30:47 -0500" />
                    <attachment id="11495" name="clj-1063-add-dissoc-in-patch-v2.txt" size="1650" author="jafingerhut" created="Thu, 13 Sep 2012 14:17:36 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

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

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

<item>
            <title>[CLJ-1049] Make reducer/folder support reduce-kv</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1049</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently, although rfn makes an effort to support reduce-kv, it is wasted effort since the return values of reducer and folder don&apos;t satisfy IKVReduce.&lt;/p&gt;

&lt;p&gt;I have a working patch for this, it&apos;s quite small. I have printed a CA but not sent it, so I won&apos;t reveal the patch yet...&lt;/p&gt;

&lt;p&gt;This also applies to ClojureScript.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15641">CLJ-1049</key>
            <summary>Make reducer/folder support reduce-kv</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 02:22:23 -0500</created>
                <updated>Sun, 23 Sep 2012 20:34:21 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29445" author="tomoj" created="Sat, 15 Sep 2012 00:47:17 -0500"  >&lt;p&gt;Hmm.. it&apos;s not quite as simple as I thought. My first patch simply had reducer/folder implement IKVReduce with `(clojure.core.protocols/kv-reduce coll (xf f1) init)`, but for map and mapcat, this results in strange behavior (reduce-kv reducefs being called with only 2 args).&lt;/p&gt;

&lt;p&gt;Patch 0001 includes modifications to map and mapcat so that the reduce-kv reducef will always be called with 3 args. The previous implementation of mapcat also had the converse problem: during non-kv reduce, if the mapcat fn returned a map, the reducef would be called with 3 args since maps reduce with reduce-kv.&lt;/p&gt;

&lt;p&gt;The patch gives behavior like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user&amp;gt; (-&amp;gt;&amp;gt; {1 {2 3 4 5} 6 {7 8 9 10}}
        (r/mapcat #(r/map + %2))
        (reduce-kv #(conj %1 [%2 %3]) []))
[[2 5] [4 9] [7 15] [9 19]]
user&amp;gt; (-&amp;gt;&amp;gt; [{2 3 4 5} {7 8 9 10}]
        (r/mapcat identity)
        (r/reduce conj []))
[[2 3] [4 5] [7 8] [9 10]]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="29528" author="tomoj" created="Sun, 23 Sep 2012 20:34:21 -0500"  >&lt;p&gt;Would like to discuss these changes (and auto-kv for maps) on clojure-dev, but my membership is still pending. My CA has been received. Anyone know who to contact to get my membership approved?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11497" name="0001-reduce-kv-transformations.diff" size="2180" author="tomoj" created="Sat, 15 Sep 2012 00:45:14 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-703] Improve writeClassFile performance</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-703</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/be0c45b3a4f3d46/36337ac7260d7d0a?lnk=gst&amp;amp;q=writeclassfile#36337ac7260d7d0a&quot;&gt;Discussion&lt;/a&gt; about timing issues when writing class files led to the the current implementation of synchronous writes to disk. This leads to bad performance/system-load when compiling Clojure code.&lt;/p&gt;

&lt;p&gt;This &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/23213b787d3ec60f#&quot;&gt;Discussion&lt;/a&gt; questioned the current implentation.&lt;/p&gt;

&lt;p&gt;Synchronous writes are not necessary and also do not ensure (crash while calling write) valid classfiles.&lt;/p&gt;

&lt;p&gt;These Patches (0001 is just a code cleanup for creating the directory structure) ensures atomic creation of classfiles by using File.renameTo()&lt;/p&gt;




</description>
                <environment></environment>
            <key id="14312">CLJ-703</key>
            <summary>Improve writeClassFile performance</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Jan 2011 12:58:38 -0600</created>
                <updated>Fri, 5 Oct 2012 19:08:06 -0500</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="26140" author="djpowell" created="Mon, 17 Jan 2011 14:16:19 -0600"  >
&lt;p&gt;Removing sync makes clojure build much faster.  I wonder why it was added in the first place?  I guess only Rich knows?  I assume that it is not necessary.&lt;/p&gt;

&lt;p&gt;If we are removing sync though, I wouldn&apos;t bother with the atomic rename stuff.  Doing that sort of thing can cause problems on some platforms, eg with search indexers and virus checkers momentarily locking files after they are created.  &lt;/p&gt;

&lt;p&gt;The patch seems to be assuming that sync is there for some reason, but my initial assumption would be that sync isn&apos;t necessary - perhaps it was working around some issue that no longer exists?&lt;/p&gt;
</comment>
                    <comment id="26142" author="juergenhoetzel" created="Wed, 19 Jan 2011 14:05:21 -0600"  >&lt;p&gt;Although its unlikely: there is a possible race condition &quot;loading a paritally written classfile&quot;?:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L393&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L393&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="28600" author="jszakmeister" created="Fri, 25 May 2012 04:22:12 -0500"  >&lt;p&gt;The new improve-writeclassfile-perf version of the patch combines the two previous patches into a single patch file and brings them up-to-date with master.  I can split the two changes back out into separate patch files if desired, but I figured out current tooling is more geared towards a single patch being applied.&lt;/p&gt;</comment>
                    <comment id="28601" author="jszakmeister" created="Fri, 25 May 2012 04:36:10 -0500"  >&lt;p&gt;FWIW, both fixes look sane.  The first one is a nice cleanup.  The second one is a little more interesting in that uses a rename operation to put the final file into place.  It removes the sync call, which does make things faster.  In general, if we&apos;re concerned about on-disk consistency, we should really have a combination of the two: write the full contents to a tmp file, sync it, and atomically rename to the destination file name.&lt;/p&gt;

&lt;p&gt;Neither the current master, nor the current patch will guarantee on-disk consistency across a machine wide crash.  The current master could crash before the sync() occurs, leaving the file in an inconsistent state.  With the patch, the OS may not get the file from file cache to disk before an OS level crash occurs, and leave the file in an inconsistent state as well.  The benefit of the patch version is that the whole file does atomically come into view at once.  It does have a nasty side effect of leaving around a temp file if the compiler crashes just before the rename though.&lt;/p&gt;

&lt;p&gt;Perhaps a little more work to catch an exception and clean up is in order?  In general, I like the patched version better.&lt;/p&gt;</comment>
                    <comment id="29611" author="ivan" created="Fri, 5 Oct 2012 19:07:32 -0500"  >&lt;p&gt;File.renameTo returns false on (most?) errors, but the patch doesn&apos;t check for failure.  Docs say &quot;The return value should always be checked to make sure that the rename operation was successful.&quot;  Failure might be especially likely on Windows, where files are opened by others without FILE_SHARE_DELETE.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10066" name="0001-use-File.mkdirs-instead-of-mkdir-every-single-direct.patch" size="1224" author="juergenhoetzel" created="Tue, 4 Jan 2011 12:58:38 -0600" />
                    <attachment id="10067" name="0002-Ensure-atomic-creation-of-class-files-by-renaming-a-.patch" size="1442" author="juergenhoetzel" created="Tue, 4 Jan 2011 12:58:38 -0600" />
                    <attachment id="11258" name="improve-writeclassfile-perf.patch" size="2684" author="jszakmeister" created="Fri, 25 May 2012 04:22:12 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-1087] clojure.data/diff uses set union on key seqs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1087</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;&lt;tt&gt;clojure.data/diff&lt;/tt&gt;, on line 118, defines:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java.util.Map
(diff-similar [a b]
  (diff-associative a b (set/union (keys a) (keys b))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Since &lt;tt&gt;keys&lt;/tt&gt; returns a key seq, this seems like an error. &lt;tt&gt;clojure.set/union&lt;/tt&gt; has strange and inconsistent behavior with regard to non-sets, and in this case the two key seqs are concatenated. Based on a cursory benchmark, it seems that this bug &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; is a slight performance gain when the maps have no common keys, and a significant performance loss when the maps have the same keys. The results are still correct because of the merging reduce in &lt;tt&gt;diff-associative&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The patch is easy (just call set on each key seq).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15753">CLJ-1087</key>
            <summary>clojure.data/diff uses set union on key seqs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tomoj">Tom Jack</reporter>
                        <labels>
                        <label>bug</label>
                        <label>performance</label>
                    </labels>
                <created>Mon, 15 Oct 2012 03:59:52 -0500</created>
                <updated>Mon, 15 Oct 2012 14:52:42 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29650" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500"  >&lt;p&gt;clj-1087-diff-perf-enhance-patch-v1.txt dated Oct 15 2012 implements Tom&apos;s suggested performance enhancement, although not exactly in the way he suggested.  It does calculate the union of the two key sequences.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11562" name="clj-1087-diff-perf-enhance-patch-v1.txt" size="760" author="jafingerhut" created="Mon, 15 Oct 2012 14:52:04 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-1088] repl/source could support protocol functions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1088</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; (source clojure.core.protocols/coll-reduce)
Source not found&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But since the protocol fn&apos;s var&apos;s metadata points to the protocol var, and the protocol var knows the file and line where it was defined, it would be trivial to improve &apos;source&apos; to look 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;user=&amp;gt; (source clojure.core.protocols/coll-reduce)
(defprotocol CollReduce
  &quot;Protocol &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; collection types that can implement reduce faster than
  first/next recursion. Called by clojure.core/reduce. Baseline
  implementation defined in terms of Iterable.&quot;
  (coll-reduce [coll f] [coll f val]))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15763">CLJ-1088</key>
            <summary>repl/source could support protocol functions</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="chouser@n01se.net">Chouser</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Oct 2012 09:53:35 -0500</created>
                <updated>Sun, 21 Oct 2012 12:41:12 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29737" author="chouser@n01se.net" created="Sun, 21 Oct 2012 10:00:50 -0500"  >&lt;p&gt;Add one-line patch to clojure.repl/source so that it will find the protocol definition for a given protocol function.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11592" name="0001-Add-support-for-protocol-fns-to-repl-source.-CLJ-1088.patch" size="1965" author="chouser@n01se.net" created="Sun, 21 Oct 2012 10:00:50 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1094] Zero-arity versions of every-pred and some-fn</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1094</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This patch adds zero-arity versions of every-pred and some-fn with these semantics.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(every-pred) === (constantly true)
(some-fn)    === (constantly nil)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These variants are useful in situations like the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;;; compute-preds-for may return zero or many predicate fns
(let [preds (compute-preds-for something)]
  (filter (apply every-pred preds) some-coll))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15780">CLJ-1094</key>
            <summary>Zero-arity versions of every-pred and some-fn</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                        <label>patch</label>
                        <label>test</label>
                    </labels>
                <created>Thu, 25 Oct 2012 07:08:28 -0500</created>
                <updated>Thu, 25 Oct 2012 07:12:35 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29799" author="tsdh" created="Thu, 25 Oct 2012 07:12:35 -0500"  >&lt;p&gt;This is the thread where Max Penet suggested to have 0-arity versions of the two fns:&lt;/p&gt;

&lt;p&gt;  &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/IRlN-4LH_U0&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/IRlN-4LH_U0&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11611" name="0001-Add-zero-arity-variants-for-every-pred-and-some-fn.patch" size="3462" author="tsdh" created="Thu, 25 Oct 2012 07:08:28 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1097] node-seq for clojure.zip</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1097</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Many times it&apos;s easier to get to a zipper node via (first (filter pred ...)) instead of manually walking the tree via next/up/down. Other times it&apos;s easier to process certain nodes via filter &amp;amp; map instead of again, walking the tree. This patch provides a single function called node-seq that uses zip/next to generate a lazy-seq of nodes. Tests provide two examples.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15803">CLJ-1097</key>
            <summary>node-seq for clojure.zip</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="halgari">Timothy Baldridge</reporter>
                        <labels>
                        <label>clojure.zip</label>
                    </labels>
                <created>Mon, 29 Oct 2012 21:37:18 -0500</created>
                <updated>Mon, 29 Oct 2012 21:37:18 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11641" name="node-seq.diff" size="1571" author="halgari" created="Mon, 29 Oct 2012 21:37:18 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1095] Allow map-indexed to accept multiple collections (a la map)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1095</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Bring external interface of map-indexed in line with map. Existing usages of map-indexed unchanged both in implementation and interface.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;examples&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(map vector (range 10 20) (range 30 35)) ;=&amp;gt; ([10 30] [11 31] [12 32] [13 33] [14 34])
(map-indexed vector (range 10 20) (range 30 35)) ;=&amp;gt; ([0 10 30] [1 11 31] [2 12 32] [3 13 33] [4 14 34])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The attached patch is not necessarily the best implementation (I haven&apos;t benchmarked it or tried any alternatives yet) but hopefully enough to start a conversation about whether this is an addition that is warranted. I know I wished for this behavior a few weeks ago though I ended up finding another way.&lt;/p&gt;

&lt;p&gt;(I haven&apos;t sent my CA yet, but I have it signed and ready to send in the next few days)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15784">CLJ-1095</key>
            <summary>Allow map-indexed to accept multiple collections (a la map)</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="bjeanes">Bo Jeanes</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 16:30:01 -0500</created>
                <updated>Thu, 8 Nov 2012 14:58:13 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29802" author="aaron" created="Thu, 25 Oct 2012 17:11:09 -0500"  >&lt;p&gt;Can you add a test for the improved functionality?&lt;/p&gt;</comment>
                    <comment id="29803" author="bjeanes" created="Thu, 25 Oct 2012 17:20:56 -0500"  >&lt;p&gt;You bet. I tried to before submitting this but found no existing tests for map-indexed to expand upon. Given that, I decided to just start the conversation first. If you think this is a good addition, I&apos;ll find a place to stick the tests and add a new patch file.&lt;/p&gt;</comment>
                    <comment id="29804" author="bjeanes" created="Thu, 25 Oct 2012 20:05:14 -0500"  >&lt;p&gt;Add two unit tests for &lt;tt&gt;map-indexed&lt;/tt&gt;. One tests old behavior (single collection) and the second tests mapping across 3 collections. &lt;/p&gt;

&lt;p&gt;There were no existing tests for &lt;tt&gt;map-indexed&lt;/tt&gt; that I could see to expand upon (using &lt;tt&gt;git grep map-indexed src/clojure&lt;/tt&gt;)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11615" name="0001-map-indexed-accepts-multiple-collections.patch" size="2422" author="bjeanes" created="Thu, 25 Oct 2012 16:30:01 -0500" />
                    <attachment id="11616" name="0002-Add-test-for-multi-collection-map-indexed-fn.patch" size="924" author="bjeanes" created="Thu, 25 Oct 2012 20:05: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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-842] clojure.pprint uses the old-style metadata.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-842</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I was looking through the implementation of clojure.pprint.* and found that it still uses the old-style metadata to mark vars as private - ^{:private true} instead of ^:private.&lt;/p&gt;

&lt;p&gt;I have migrated the metadata to the new style in the attached trivial patch, which can be used in case this is deemed to be an issue.&lt;/p&gt;

&lt;p&gt;FWIW, there are some other namespaces which use the old-style metadata as well; I am willing to fix those as well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14646">CLJ-842</key>
            <summary>clojure.pprint uses the old-style metadata.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ghoseb">Baishampayan Ghose</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Sep 2011 02:35:36 -0500</created>
                <updated>Wed, 14 Nov 2012 13:19:38 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29944" author="jafingerhut" created="Wed, 14 Nov 2012 13:19:38 -0600"  >&lt;p&gt;clj-842-update-clojure.pprint-metadata-v2.txt dated Nov 14 2012 is identical to Baishampayan Ghose&apos;s 0001-Migrate-the-metadata-in-clojure.pprint.-to-the-new-s.patch dated Sep 26, 2011, except it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10372" name="0001-Migrate-the-metadata-in-clojure.pprint.-to-the-new-s.patch" size="16175" author="ghoseb" created="Mon, 26 Sep 2011 02:35:36 -0500" />
                    <attachment id="11676" name="clj-842-update-clojure.pprint-metadata-v2.txt" size="16179" author="jafingerhut" created="Wed, 14 Nov 2012 13:19:38 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-849] Add a pseudo-variable containing the current line number</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-849</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Add a pseudo-variable (similar to &amp;#42;file*), containing the current line number. This should be available during AOT compilation. The name &quot;&amp;#42;line-number*&quot; might be good.&lt;/p&gt;

&lt;p&gt;It will be useful for diagnostic log messages. Using exception stack traces has poor runtime performance and the line number should be available to the compiler at minimal cost.&lt;/p&gt;</description>
                <environment>Any</environment>
            <key id="14672">CLJ-849</key>
            <summary>Add a pseudo-variable containing the current line number</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="grkuntzmd">G. Ralph Kuntz, MD</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Oct 2011 07:59:03 -0500</created>
                <updated>Wed, 14 Nov 2012 15:44:21 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="29947" author="cninja" created="Wed, 14 Nov 2012 15:41:34 -0600"  >&lt;p&gt;Adding initial patch. A symbol&apos;s position is now stored in its metadata, just like a seq when it is read with the LispReader. &lt;/p&gt;

&lt;p&gt;The Compiler.LINE and Compiler.COLUMN values are now updated as each symbol is analyzed. This provides more exact line and column numbers for Compiler errors which will resolve ticket &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-420&quot; title=&quot;Some compiler exceptions erroneously using REPL line numbers.&quot;&gt;CLJ-420&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Compiler.LINE variable has been interned as clojure.core/&lt;b&gt;line-number&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Adding extra metadata to symbols resulted in some tests failing due to the extra values. The failing tests have been updated to ignore the new metadata keys.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11678" name="CLJ-849-line-number-pesudo-variable.diff" size="9179" author="cninja" created="Wed, 14 Nov 2012 15:41:34 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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-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-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-1112] Var *loading-verbosely* should initialize from a JVM system property</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1112</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I often find myself adding :verbose to a (require) or (use) clause of my (ns) in order to debug problems (especially macros, or bad namespace declarations). It would be very nice if I could define a JVM system property (say -Dclojure.load-verbosely=true) to default &lt;b&gt;loading-verbosely&lt;/b&gt; to true for a REPL session, or as part of a build. &lt;/p&gt;

&lt;p&gt;Sometimes I just like to see that namespaces load as a measure of progress, when starting an application, or when running a set of tests.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15845">CLJ-1112</key>
            <summary>Var *loading-verbosely* should initialize from a JVM system property</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Wed, 21 Nov 2012 13:19:20 -0600</created>
                <updated>Thu, 22 Nov 2012 02:14:32 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30006" author="tsdh" created="Thu, 22 Nov 2012 02:12:02 -0600"  >&lt;p&gt;This patch implements the suggested feature.&lt;/p&gt;

&lt;p&gt;The new system property is called &lt;tt&gt;clojure.core.loading-verbosely&lt;/tt&gt; in analogy to the existing &lt;tt&gt;clojure.compile.warn-on-reflection&lt;/tt&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11697" name="0001-Allow-setting-loading-verbosely-by-system-property.patch" size="1456" author="tsdh" created="Thu, 22 Nov 2012 02:12:02 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1113] `reductions` reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1113</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;It would be nice to have a reducers implementation of the core `reductions` function.&lt;/p&gt;

&lt;p&gt;Initial implementation attempt included.  This version requires an initial reduction value parameter (vs using (f)) and includes that initial value in the final reduction.  I&apos;m not certain either of these decisions is optimal, but results in a function which most closely mimics `clojure.core/reductions`.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15848">CLJ-1113</key>
            <summary>`reductions` reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="llasram">Marshall T. Vandegrift</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Nov 2012 08:22:37 -0600</created>
                <updated>Fri, 23 Nov 2012 08:22:37 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11703" name="reductions-reducer.diff" size="2172" author="llasram" created="Fri, 23 Nov 2012 08:22:37 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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-1090] Indirect function calls through Var instances fail to clear locals</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1090</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you make a function call indirectly by invoking a Var object (which derefs itself and invokes the result), the invocation parameters remain in the thread&apos;s local stack for the duration of the function call, even though they are needed only long enough to be passed into the deref&apos;d function. As a result, passing a lazy seq into a function invoked in its Var form may run out of memory if the seq is forced inside that function. For example:&lt;/p&gt;

&lt;p&gt;(defn total &lt;span class=&quot;error&quot;&gt;&amp;#91;xs&amp;#93;&lt;/span&gt; (reduce + 0 xs))&lt;br/&gt;
(total (range 1000000000))   ; this works, though takes a while&lt;br/&gt;
(#&apos;total (range 1000000000)) ; this dies with out of memory error&lt;/p&gt;

&lt;p&gt;I can provide a patch if it would be useful. The fix should be trivial, something along the lines of wrapping each argN in clojure/lang/Var.java inside a Util.ret1(argN, argN = null) as is done in RestFn.java.&lt;/p&gt;</description>
                <environment>Probably all, but observed on Ubuntu 12.04, OpenJDK 6</environment>
            <key id="15768">CLJ-1090</key>
            <summary>Indirect function calls through Var instances fail to clear locals</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stfactual">Spencer Tipping</reporter>
                        <labels>
                        <label>performance</label>
                    </labels>
                <created>Mon, 22 Oct 2012 18:43:19 -0500</created>
                <updated>Fri, 30 Nov 2012 14:26:45 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29776" author="stfactual" created="Tue, 23 Oct 2012 13:37:16 -0500"  >&lt;p&gt;Sorry, I typo&apos;d the example. (defn total ...) should be (defn sum ...).&lt;/p&gt;</comment>
                    <comment id="30054" author="halgari" created="Tue, 27 Nov 2012 11:45:43 -0600"  >&lt;p&gt;fixed typeo in example&lt;/p&gt;</comment>
                    <comment id="30055" author="halgari" created="Tue, 27 Nov 2012 11:47:35 -0600"  >&lt;p&gt;Couldn&apos;t reproduce the exception, but the 2nd example did chew through about 4x the amount of memory. Vetting. &lt;/p&gt;</comment>
                    <comment id="30095" author="halgari" created="Thu, 29 Nov 2012 14:57:28 -0600"  >&lt;p&gt;adding a patch. Since most of Clojure ends up running this code in one way or another, I&apos;d assert that tests are included as part of the normal Clojure test process. &lt;/p&gt;

&lt;p&gt;Patch simply calls Util.ret1(argx, argx=null) on all invoke calls. &lt;/p&gt;</comment>
                    <comment id="30097" author="halgari" created="Thu, 29 Nov 2012 15:17:52 -0600"  >&lt;p&gt;And as a note, both examples in the original report now have extremely similar memory usages. &lt;/p&gt;</comment>
                    <comment id="30118" author="stfactual" created="Fri, 30 Nov 2012 14:22:14 -0600"  >&lt;p&gt;Sounds great, and the patch looks good too. Let me know if I need to do anything else.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11729" name="var-clear-locals.diff" size="19020" author="halgari" created="Thu, 29 Nov 2012 14:57:28 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

<item>
            <title>[CLJ-1102] Better handling of exceptions with empty stack traces</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1102</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I don&apos;t know what I did to cause some exceptions to be thrown while running Clojure tests that return a length 0 array from (.getStackTrace throwable), but according to the Java docs this is legal.  I searched all places in the Clojure code that call .getStackTrace and found two that don&apos;t handle this correctly, one of which causes an ArrayOutOfBoundsException (that is the one I found during my testing).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15814">CLJ-1102</key>
            <summary>Better handling of exceptions with empty stack traces</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Nov 2012 17:03:47 -0600</created>
                <updated>Fri, 30 Nov 2012 14:57:46 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29900" author="jafingerhut" created="Sun, 4 Nov 2012 17:07:36 -0600"  >&lt;p&gt;clj-1102-improve-empty-stack-trace-handling-v1.txt dated Nov 4 2012 improves the handling of .getStackTrace returning a length 0 array in two places.  I checked all other places .getStackTrace was called and they seem to already handle this case gracefully.&lt;/p&gt;</comment>
                    <comment id="30120" author="halgari" created="Fri, 30 Nov 2012 14:57:37 -0600"  >&lt;p&gt;Vetting.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11662" name="clj-1102-improve-empty-stack-trace-handling-v1.txt" size="1791" author="jafingerhut" created="Sun, 4 Nov 2012 17:07:36 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

<item>
            <title>[CLJ-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-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-1115] multi arity into</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1115</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Any reason why into isn&apos;t multi arity?&lt;/p&gt;

&lt;p&gt;(into to &amp;amp; froms) =&amp;gt; (reduce into to froms)&lt;/p&gt;


&lt;p&gt;(into #{} &lt;span class=&quot;error&quot;&gt;&amp;#91;3 3 4&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;2 1&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot;&amp;#93;&lt;/span&gt;) looks better than (reduce into #{} [&lt;span class=&quot;error&quot;&gt;&amp;#91;3 3 4&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;2 1&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot;&amp;#93;&lt;/span&gt;])&lt;/p&gt;</description>
                <environment></environment>
            <key id="15854">CLJ-1115</key>
            <summary>multi arity into</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="yongqli">Yongqian Li</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Nov 2012 07:50:56 -0600</created>
                <updated>Sun, 9 Dec 2012 07:39:55 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30051" author="halgari" created="Tue, 27 Nov 2012 11:25:46 -0600"  >&lt;p&gt;Seems to be a valid enhancement. I can&apos;t see any issues we&apos;d have with it. Vetted. &lt;/p&gt;</comment>
                    <comment id="30090" author="halgari" created="Thu, 29 Nov 2012 14:06:44 -0600"  >&lt;p&gt;Added patch &amp;amp; test. This patch retains the old performance characteristics of into in the case that there is only one collection argument. For example: (into [] &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;) . &lt;/p&gt;

&lt;p&gt;Since the multi-arity version will be slightly slower, I opted to provide it as a second body instead of unifying both into a single body. If someone has a problem with this, I can rewrite the patch. At least this way, into won&apos;t get slower. &lt;/p&gt;</comment>
                    <comment id="30195" author="richhickey" created="Sun, 9 Dec 2012 07:39:55 -0600"  >&lt;p&gt;This is a good example of an idea for an enhancement I haven&apos;t approved, and thus is not yet vetted.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11726" name="multi-arity-into.diff" size="3156" author="halgari" created="Thu, 29 Nov 2012 14:06:44 -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-1103] Make conj assoc dissoc and transient versions handle args similarly</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1103</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;A discussion came up in the Clojure Google group about conj giving an error when taking only a coll as an argument, as opposed to disj which works for this case:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z9mFxsTYTqQ&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z9mFxsTYTqQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I looked through the rest of the code for similar cases, and found that conj! assoc assoc! and disj! also had the same property, and there were some other differences between them in how different numbers of arguments were handled, such as:&lt;/p&gt;

&lt;p&gt;conj handles an arbitrary number of arguments, but conj! does not.&lt;br/&gt;
assoc checks for a final key with no value specified (&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1052&quot; title=&quot;assoc should throw exception if missing val for last key&quot;&gt;&lt;del&gt;CLJ-1052&lt;/del&gt;&lt;/a&gt;), but assoc! did not.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15815">CLJ-1103</key>
            <summary>Make conj assoc dissoc and transient versions handle args similarly</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Nov 2012 18:00:32 -0600</created>
                <updated>Sun, 9 Dec 2012 17:30:00 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29901" author="jafingerhut" created="Sun, 4 Nov 2012 18:04:54 -0600"  >&lt;p&gt;clj-1103-make-conj-assoc-dissoc-handle-args-similarly-v1.txt dated Nov 4 2012 makes conj conj! assoc assoc! dissoc dissoc! handle args similarly to each other.&lt;/p&gt;</comment>
                    <comment id="30197" author="bbloom" created="Sun, 9 Dec 2012 17:30:00 -0600"  >&lt;p&gt;I too ran into this and started an additional discussion here: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/wL5hllfhw4M/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/wL5hllfhw4M/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In particular, I don&apos;t buy the argument that (into coll xs) is sufficient, since into implies conj and there isn&apos;t an terse and idiomatic way to write (into map (parition 2 keyvals))&lt;/p&gt;

&lt;p&gt;So +1 from me&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11663" name="clj-1103-make-conj-assoc-dissoc-handle-args-similarly-v1.txt" size="8667" author="jafingerhut" created="Sun, 4 Nov 2012 18:04:54 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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-1128] Improve merge-with</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1128</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Set a first map as an initial value for reduce to&lt;br/&gt;
avoid merge-entry (series of contains? calls and etc) call on the first map.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15888">CLJ-1128</key>
            <summary>Improve merge-with</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="edtsech">Edward Tsech</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Dec 2012 13:29:35 -0600</created>
                <updated>Thu, 13 Dec 2012 17:41:39 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30225" author="edtsech" created="Thu, 13 Dec 2012 13:36:23 -0600"  >&lt;p&gt;Tests pass.&lt;/p&gt;</comment>
                    <comment id="30226" author="jafingerhut" created="Thu, 13 Dec 2012 14:32:13 -0600"  >&lt;p&gt;Edward, your patch replaces the expression (or m1 {}) with m1.  It was changed from m1 to (or m1 {}) in a commit on Oct 16, 2008 with descriptive text &quot;improved nil handling in merge, merge-with&quot;, so I am pretty sure it would be best to leave it as (or m1 {}).  I believe the intent is to allow all but one of the map arguments to merge-with be nil, and everything will still work.&lt;/p&gt;

&lt;p&gt;The rest of the patch for avoiding one merge call seems sound to me.&lt;/p&gt;

&lt;p&gt;Your change would be even better at preserving any metadata on the first non-nil map in the list, if instead of calling with the first map, it called it with the first non-nil item of the list, and then the rest of the list after that.&lt;/p&gt;</comment>
                    <comment id="30228" author="edtsech" created="Thu, 13 Dec 2012 17:41:39 -0600"  >&lt;p&gt;I figured out that `reduce1` did pass a head of the list for me. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; (&lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L887&quot;&gt;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L887&lt;/a&gt;)&lt;br/&gt;
But case with first nil argument is still valid. Correct me, please, if i&apos;m wrong.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure about `(or m1 {})`. I don&apos;t see any problems which can happen. Probably behaviour of functions which are used internally was changed since 2008.&lt;/p&gt;

&lt;p&gt;(contains? nil :a) ;=&amp;gt; false&lt;br/&gt;
(assoc nil :a 1) ;=&amp;gt; {:a 1}&lt;br/&gt;
(get nil :a) ;=&amp;gt; nil&lt;/p&gt;

&lt;p&gt;I could write some tests for that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11761" name="0001-Improve-merge-with.patch" size="851" author="edtsech" created="Thu, 13 Dec 2012 13:29:35 -0600" />
                    <attachment id="11762" name="0002-Improve-merge-with.patch" size="1077" author="edtsech" created="Thu, 13 Dec 2012 17:41:39 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1044] Enable refering to -&gt;type inside deftype</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1044</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Inside defrecord is possible to refer to -&amp;gt;type-ctor, that is not possible inside deftype.&lt;br/&gt;
This patch adds an implicit declare, as done in defrecord&lt;/p&gt;</description>
                <environment></environment>
            <key id="15634">CLJ-1044</key>
            <summary>Enable refering to -&gt;type inside deftype</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="bronsa">Nicola Mometto</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Aug 2012 08:02:50 -0500</created>
                <updated>Sat, 15 Dec 2012 07:35:38 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30164" author="halgari" created="Mon, 3 Dec 2012 11:29:57 -0600"  >&lt;p&gt;Seems valid. Vetting. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11442" name="001-enable-factory-ctor-inside-deftype.diff" size="835" author="bronsa" created="Sat, 18 Aug 2012 08:02:50 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-835] defmulti doc string doesn&apos;t mention needing to be passed a var for the value of :hierarchy</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-835</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The :hierarchy option for defmulti should be passed a var, but this is not mentioned in the doc string.&lt;/p&gt;

&lt;p&gt;The error message from passing the hierarchy directly is rather cryptic:&lt;/p&gt;

&lt;p&gt;Evaluation aborted on java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.IRef (SOURCE_FORM_44:19).&lt;/p&gt;</description>
                <environment>1.2, 1.3 beta3</environment>
            <key id="14599">CLJ-835</key>
            <summary>defmulti doc string doesn&apos;t mention needing to be passed a var for the value of :hierarchy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Sep 2011 15:09:00 -0500</created>
                <updated>Wed, 19 Dec 2012 07:59:17 -0600</updated>
                                    <version>Release 1.2</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26815" author="mbrandmeyer" created="Wed, 14 Sep 2011 15:11:10 -0500"  >&lt;p&gt;Modified doctoring to clarify the usage of &lt;tt&gt;:hierarchy&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="28429" author="scottlowe" created="Thu, 10 May 2012 17:16:19 -0500"  >&lt;p&gt;New patch: &apos;0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-835&quot; title=&quot;defmulti doc string doesn&amp;#39;t mention needing to be passed a var for the value of :hierarchy&quot;&gt;CLJ-835&lt;/a&gt;-Refine-doc-string-for-defmulti-hierarchy-opt.patch&apos; 10/May/12.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a new doc string patch in response to Andy Fingerhut&apos;s request posted here: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/i7H82fJYL-U&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/i7H82fJYL-U&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Andy&apos;s request stated &quot;Attached patch seems to have spelling mistakes, and perhaps could be worded more clearly.&quot;&lt;/p&gt;

&lt;p&gt;I hope my new patch is an improvement upon what was there.&lt;/p&gt;

&lt;p&gt;This patch supersedes &apos;0001-Clarify-docstring-for-defmulti.patch&apos; from 14/Sep/11.&lt;/p&gt;</comment>
                    <comment id="29195" author="fogus" created="Thu, 16 Aug 2012 14:49:50 -0500"  >&lt;p&gt;This is a million times better than what was there before, but (who knew!?) it could be better. A couple points of contention:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The order under the &lt;tt&gt;:hierarchy&lt;/tt&gt; section seems off. I would start with an overview of what a hierarchy is including a definition of the global hierarchy map (it&apos;s mentioned, but glossed over). I&apos;d then move on to an example impl. Finally, I&apos;d then add the discussion starting &quot;Multimethods expect...&quot; immediately followed by an example.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;In the &lt;tt&gt;isa?&lt;/tt&gt; example it would be great to show the return value.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;You mention that the hierarchy should be supplied as a reference, which is correct, however you talk about #&apos;.  The link between e.g. var and #&apos; could be a bit more explicit. Maybe the sentence about #&apos; could be parenthetical?&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;It&apos;s ok to finish with a very small example of its use in &lt;tt&gt;defmethod&lt;/tt&gt;, in fact a simple example specifying methods for &lt;tt&gt;::shape&lt;/tt&gt; and &lt;tt&gt;::circle&lt;/tt&gt; would clarify the intent nicely.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="30265" author="richhickey" created="Wed, 19 Dec 2012 07:58:57 -0600"  >&lt;p&gt;Please leave examples out of docs strings. Use precise language.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10361" name="0001-Clarify-docstring-for-defmulti.patch" size="1058" author="mbrandmeyer" created="Wed, 14 Sep 2011 15:11:10 -0500" />
                    <attachment id="11188" name="0001-CLJ-835-Refine-doc-string-for-defmulti-hierarchy-opt.patch" size="1885" author="scottlowe" created="Thu, 10 May 2012 17:16:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

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

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

<item>
            <title>[CLJ-980] Documentation for extend-type falsely implies that &amp; is allowed in protocol fn signatures</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-980</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The documentation for extend-type contains the following 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;(extend-type MyType 
    Countable
      (cnt [c] ...)
    Foo
      (bar [x y] ...)
      (baz ([x] ...) ([x y &amp;amp; zs] ...)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;x y &amp;amp; zs&amp;#93;&lt;/span&gt;&lt;/tt&gt; is not a valid parameter list for a protocol fn. The documentation should be appropriately amended.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15402">CLJ-980</key>
            <summary>Documentation for extend-type falsely implies that &amp; is allowed in protocol fn signatures</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="charles-dyfis-net">Charles Duffy</reporter>
                        <labels>
                        <label>documentation</label>
                    </labels>
                <created>Thu, 3 May 2012 12:08:35 -0500</created>
                <updated>Wed, 19 Dec 2012 08:00:13 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28599" author="jszakmeister" created="Fri, 25 May 2012 04:00:27 -0500"  >&lt;p&gt;v2 of the patch is simply converts the patch to git format.  I made sure that Mr. Duffy got proper attribution.  I also took a stab at a simple log message.  Any problems with the latter are mine, and I&apos;m happy to fix it up if necessary.&lt;/p&gt;</comment>
                    <comment id="29190" author="aaron" created="Wed, 15 Aug 2012 22:08:35 -0500"  >&lt;p&gt;This doesn&apos;t update the entire doc string. The expansion is updated, but the signature section isn&apos;t. Here&apos;s what shows up.&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; (doc extend-type)
-------------------------
clojure.core/extend-type
([t &amp;amp; specs])
Macro
  A macro that expands into an extend call. Useful when you are
  supplying the definitions explicitly inline, extend-type
  automatically creates the maps required by extend.  Propagates the
  class as a type hint on the first argument of all fns.

  (extend-type MyType 
    Countable
      (cnt [c] ...)
    Foo
      (bar [x y] ...)
      (baz ([x] ...) ([x y &amp;amp; zs] ...)))

  expands into:

  (extend MyType
   Countable
     {:cnt (fn [c] ...)}
   Foo
     {:baz (fn ([x] ...) ([x y ...] ...))
      :bar (fn [x y] ...)})
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="29267" author="tsdh" created="Sat, 25 Aug 2012 06:44:49 -0500"  >&lt;p&gt;This is very much related 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;/p&gt;

&lt;p&gt;NOTE: While varargs are not supported in protocol declarations, dynamic extension of a protocol via extend (extend-type, extend-protocol) &lt;b&gt;does&lt;/b&gt; allow for varargs and also destructuring, cause the method impls are actually normal clojure functions.&lt;/p&gt;

&lt;p&gt;So if a Foo protocol declares a (foo &lt;span class=&quot;error&quot;&gt;&amp;#91;this a b c&amp;#93;&lt;/span&gt;) method, you can extend/extend-type/extend-protocol it dynamically using (foo &lt;span class=&quot;error&quot;&gt;&amp;#91;this &amp;amp; more&amp;#93;&lt;/span&gt; (do-magick)) where `a b c` are conflated into the `more` parameter.&lt;/p&gt;

&lt;p&gt;However, that doesn&apos;t work for method implementations defined by deftype, defrecord, and reify.&lt;/p&gt;

&lt;p&gt;So with respect to the facts, the example in the docstring is actually correct, so I&apos;m not sure if it should be changed.  However, what&apos;s supported in which cases should be documented better as it is right now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11164" name="clojure--extend-type-doc-fix.diff" size="408" author="charles-dyfis-net" created="Thu, 3 May 2012 12:08:35 -0500" />
                    <attachment id="11257" name="extended-type-doc-fix-v2.patch" size="755" author="jszakmeister" created="Fri, 25 May 2012 04:00:27 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

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

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

<item>
            <title>[CLJ-1137] Metadata on a def gets evaluated twice</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1137</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Metadata on the symbol of a def special form is evaluated twice.&lt;/p&gt;

&lt;p&gt;(def ^{:foo (println &quot;HA&quot;)} a [])&lt;/p&gt;

&lt;p&gt;prints out HA HA.  Offending line is in Compiler$DefExpr, fixed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15915">CLJ-1137</key>
            <summary>Metadata on a def gets evaluated twice</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gshayban">Ghadi Shayban</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Dec 2012 11:32:28 -0600</created>
                <updated>Fri, 21 Dec 2012 11:32:28 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11772" name="CLJ-1137-eval-metadata-once.diff" size="889" author="gshayban" created="Fri, 21 Dec 2012 11:32:28 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1120] Introduce ex-message and ex-cause to abstract away the platform in dealing with ExceptionInfo</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1120</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As described in the title. See &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-429&quot; title=&quot;Data Conveying Exception: ex-data and ex-info&quot;&gt;&lt;del&gt;CLJS-429&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15872">CLJ-1120</key>
            <summary>Introduce ex-message and ex-cause to abstract away the platform in dealing with ExceptionInfo</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="michalmarczyk">Micha&#322; Marczyk</assignee>
                                <reporter username="michalmarczyk">Micha&#322; Marczyk</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Dec 2012 06:19:15 -0600</created>
                <updated>Fri, 21 Dec 2012 23:03:36 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30177" author="michalmarczyk" created="Thu, 6 Dec 2012 06:23:10 -0600"  >&lt;p&gt;The attached patch implements ex-message and ex-cause to work on arbitrary Throwables.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11749" name="0001-CLJ-1120-ex-message-ex-cause.patch" size="1357" author="michalmarczyk" created="Thu, 6 Dec 2012 06:23:10 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1104] Concurrent with-redefs do not unwind properly, leaving a var permanently changed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1104</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;On 1.4 and latest master:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defn ten [] 10)&lt;br/&gt;
#&apos;user/ten&lt;br/&gt;
user&amp;gt; (doall (pmap #(with-redefs [ten (fn [] %)] (ten)) (range 20 100)))&lt;br/&gt;
(20 21 22 23 24 25 34 27 28 29 30 31 32 33 34 35 36 37 38 39 39 35 42 43 44 45 48 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 79 87 88 89 90 91 92 93 94 95 97 92 98 99)&lt;br/&gt;
user&amp;gt; (ten)&lt;br/&gt;
79&lt;/p&gt;

&lt;p&gt;Not sure if this is a bug per se, but the doc doesn&apos;t mention lack of concurrency safety and my expectation was that the original value would always be restored after any (arbitrarily interleaved) sequence of with-redefs calls. &lt;/p&gt;</description>
                <environment>Mac OS, Java 6</environment>
            <key id="15816">CLJ-1104</key>
            <summary>Concurrent with-redefs do not unwind properly, leaving a var permanently changed</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2012 17:46:19 -0600</created>
                <updated>Fri, 21 Dec 2012 23:05:10 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29907" author="timmc" created="Wed, 7 Nov 2012 20:50:49 -0600"  >&lt;p&gt;The with-redefs doc (v1.4.0) says &quot;These temporary changes will be visible in all threads.&quot; That sounds non-thread-safe to me.&lt;/p&gt;

&lt;p&gt;In general, changes to var root bindings are not thread safe.&lt;/p&gt;</comment>
                    <comment id="29908" author="bendlas" created="Thu, 8 Nov 2012 09:17:31 -0600"  >&lt;p&gt;As I understand it, with-redefs is mainly used in test suites to mock out vars. It was introduced when vars became static by default and a lot of testsuites had been using binding for mocking. Maybe the docstring should be amended with something along the lines of: When using this you have to ensure that only a single thread is interacting with redef&apos;d vars.&lt;/p&gt;</comment>
                    <comment id="30030" author="stu" created="Sun, 25 Nov 2012 18:41:17 -0600"  >&lt;p&gt;Behavior find as is, doc string change would be fine.&lt;/p&gt;</comment>
                    <comment id="30032" author="jafingerhut" created="Sun, 25 Nov 2012 18:57:16 -0600"  >&lt;p&gt;Patch clj-1104-doc-unsafety-of-concurrent-with-redefs-v1.txt dated Nov 25 2012 updates doc string of with-redefs to make it clear that concurrent use is unsafe.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11708" name="clj-1104-doc-unsafety-of-concurrent-with-redefs-v1.txt" size="1091" author="jafingerhut" created="Sun, 25 Nov 2012 18:57:16 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

<item>
            <title>[CLJ-1134] star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1134</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The star-directive in &lt;tt&gt;clojure.pprint/cl-format&lt;/tt&gt; with an at-prefix (&lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt;) does not obey its specifications according to &lt;a href=&quot;http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node200.html#SECTION002633000000000000000&quot;&gt;Common Lisp the Language, 2nd Edition&lt;/a&gt;. There are two bugs within &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; as of right now:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;n@&amp;#42;&lt;/tt&gt; is supposed to jump forward over more than one argument, it jumps one step backward as if it had seen &lt;tt&gt;&amp;#126;:&amp;#42;&lt;/tt&gt;. For instance, &lt;tt&gt;(cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)&lt;/tt&gt; will return &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and not &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; as expected.&lt;/li&gt;
	&lt;li&gt;When &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt; is seen, the formatter is supposed to jump to the first argument (as &lt;tt&gt;n&lt;/tt&gt; defaults to &lt;tt&gt;0&lt;/tt&gt;, see specification linked above). However, whenever a &lt;tt&gt;&amp;#126;@&amp;#42;&lt;/tt&gt;-directive is seen, the formatter jumps to the second argument instead.&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;What%28smallsetof%29stepswillreproducetheproblem%3F&quot;&gt;&lt;/a&gt;What (small set of) steps will reproduce the problem?&lt;/h4&gt;

&lt;p&gt;Inside a clean Clojure repl, perform these steps:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (require &apos;[clojure.pprint :refer [cl-format]])
nil
user=&amp;gt; (cl-format nil &quot;~D ~3@*~D&quot; 0 1 2 3)
&quot;0 0&quot;                                           ;; Expected: &quot;0 3&quot;
user=&amp;gt; (cl-format nil &quot;~D~D~D~D ~@*~D&quot; 0 1 2 3)
&quot;0123 1&quot;                                        ;; Expected: &quot;0123 0&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;Whatistheexpectedoutput%3FWhatdoyouseeinstead%3F&quot;&gt;&lt;/a&gt;What is the expected output? What do you see instead?&lt;/h4&gt;

&lt;p&gt;The expected output is &lt;tt&gt;&quot;0 3&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 0&quot;&lt;/tt&gt;, but is &lt;tt&gt;&quot;0 0&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;0123 1&quot;&lt;/tt&gt; as shown above.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Whatversionareyouusing%3F&quot;&gt;&lt;/a&gt;What version are you using?&lt;/h4&gt;

&lt;p&gt;Tested on both &lt;tt&gt;1.4.0&lt;/tt&gt; and &lt;tt&gt;1.5.0-beta2&lt;/tt&gt;, both have the defect described.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Pleaseprovideanyadditionalinformationbelow.&quot;&gt;&lt;/a&gt;Please provide any additional information below.&lt;/h4&gt;

&lt;p&gt;The format strings which reproduces the problem has been compared with the &lt;tt&gt;format&lt;/tt&gt; function from the Common Lisp implementations SBCL, CLisp and Clozure. All of them print the expected output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15907">CLJ-1134</key>
            <summary>star-directive in clojure.pprint/cl-format with an at-prefix (&quot;~n@*&quot;) do not obey its specifications</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hypirion">Jean Niklas L&apos;orange</reporter>
                        <labels>
                        <label>bug</label>
                        <label>pprint</label>
                    </labels>
                <created>Tue, 18 Dec 2012 20:34:25 -0600</created>
                <updated>Wed, 26 Dec 2012 19:57:30 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30261" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600"  >&lt;p&gt;Patch attached.&lt;/p&gt;

&lt;p&gt;It may be easier to read the changes the patch does from within JIRA instead from the commit message, so I&apos;ve added it here:&lt;/p&gt;

&lt;p&gt;This solves two issues as specified by #&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1134&quot; title=&quot;star-directive in clojure.pprint/cl-format with an at-prefix (&amp;quot;~n@*&amp;quot;) do not obey its specifications&quot;&gt;CLJ-1134&lt;/a&gt;. Issue #1 is solved by doing a&lt;br/&gt;
relative jump forward within &lt;tt&gt;absolute-reposition&lt;/tt&gt; in &lt;tt&gt;cl_format.clj&lt;/tt&gt;, line 114 by&lt;br/&gt;
switching &lt;tt&gt;(- (:pos navigator) position)&lt;/tt&gt; with &lt;tt&gt;(- position (:pos navigator))&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Issue #2 is handled by changing the default &lt;tt&gt;n&lt;/tt&gt;-parameter to &lt;tt&gt;*&lt;/tt&gt; depending on&lt;br/&gt;
whether the &lt;tt&gt;@&lt;/tt&gt;-prefix is placed or not. If it is placed, then &lt;tt&gt;n&lt;/tt&gt; defaults to&lt;br/&gt;
0, otherwise it defaults to 1.&lt;/p&gt;

&lt;p&gt;In addition, new tests have been appended to &lt;tt&gt;test_cl_format.clj&lt;/tt&gt; to ensure the&lt;br/&gt;
correctness of this patch. The tests have been tested on the Common Lisp&lt;br/&gt;
implementation GNU CLISP 2.49, which presumably handle the &lt;tt&gt;~n@*&lt;/tt&gt;&lt;br/&gt;
correctly. This patch and GNU CLISP returns the same output for each format&lt;br/&gt;
call, sans case for printed symbols; Common Lisp has case-insensitive symbols,&lt;br/&gt;
whereas Clojure has not.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11767" name="clj-1134-star-directive-in-cl-format.txt" size="4067" author="hypirion" created="Tue, 18 Dec 2012 21:28:03 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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-1030] Misleading ClassCastException when coercing a String to int</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1030</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Observed behaviour&lt;/p&gt;

&lt;p&gt;(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character&lt;/p&gt;

&lt;p&gt;Expected behaviour&lt;br/&gt;
(int &quot;0&quot;) =&amp;gt;&lt;br/&gt;
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer&lt;br/&gt;
or &lt;br/&gt;
IllegalArgumentException&lt;/p&gt;</description>
                <environment></environment>
            <key id="15591">CLJ-1030</key>
            <summary>Misleading ClassCastException when coercing a String to int</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ordnungswidrig">Philipp Meier</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Wed, 25 Jul 2012 06:13:21 -0500</created>
                <updated>Sun, 6 Jan 2013 20:52:40 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29532" author="jafingerhut" created="Mon, 24 Sep 2012 11:20:07 -0500"  >&lt;p&gt;If someone wants to improve the behavior of int in this case, they should also consider similar improvements to the error messages for unchecked-int, char, and unchecked-char.&lt;/p&gt;</comment>
                    <comment id="30383" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600"  >&lt;p&gt;Patch improved-int-char-casting-error-messages.diff on January 6, 2013.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11793" name="improved-int-char-casting-error-messages.diff" size="3855" author="michael-drogalis" created="Sun, 6 Jan 2013 20:45:00 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1086] Support arity-1 for -&gt;&gt;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1086</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently (as of Clojure 1.4) -&amp;gt;&amp;gt; doesn&apos;t support arity-1, though -&amp;gt; does. Arity-1 for -&amp;gt;&amp;gt; would be useful to let somebody comment out forms as follows:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(-&amp;gt;&amp;gt; foo
  #_(bar baz)
  #_quux)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Discussion: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/_IVl0Tb7Au4&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/_IVl0Tb7Au4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My name on contributor list page &lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt; is: Shantanu Kumar&lt;/p&gt;</description>
                <environment>Clojure and ClojureScript</environment>
            <key id="15748">CLJ-1086</key>
            <summary>Support arity-1 for -&gt;&gt;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kumarshantanu">Shantanu Kumar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Oct 2012 13:39:09 -0500</created>
                <updated>Sat, 12 Jan 2013 18:48:06 -0600</updated>
                                    <version>Release 1.1</version>
                <version>Release 1.2</version>
                <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29909" author="jafingerhut" created="Thu, 8 Nov 2012 13:37:03 -0600"  >&lt;p&gt;Shantanu, you give your name on the contributing page, but I don&apos;t see it there.  Is your CA in transit, perhaps?&lt;/p&gt;</comment>
                    <comment id="29910" author="kumarshantanu" created="Thu, 8 Nov 2012 13:43:15 -0600"  >&lt;p&gt;@Andy I can see my name on the contributors page when I search for the text &quot;Shantanu&quot;. My CA was submitted more than a year ago.&lt;/p&gt;</comment>
                    <comment id="29911" author="jafingerhut" created="Thu, 8 Nov 2012 13:53:45 -0600"  >&lt;p&gt;Right you are.  I somehow accidentally got my browser to enable case matching, and was expecting it to search case insensitively.  Sorry for the noise.&lt;/p&gt;</comment>
                    <comment id="30427" author="vemv" created="Sat, 12 Jan 2013 18:48:06 -0600"  >&lt;p&gt;Just for the record, the patch provided at &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1121&lt;/a&gt; addresses this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11556" name="thread-last-arity-1.diff" size="835" author="kumarshantanu" created="Fri, 12 Oct 2012 13:39:09 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1148] adds docstring support to defonce, and stops it from stomping existing metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1148</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Two issues here:&lt;/p&gt;

&lt;p&gt;1) defonce doesn&apos;t support docstrings, although def does, so it would be nice to bring the two in line with each other&lt;/p&gt;

&lt;p&gt;2) defonce can stomp metadata, like this:&lt;/p&gt;

&lt;p&gt;(defonce ^:private foo 5)&lt;br/&gt;
#&apos;user/foo&lt;br/&gt;
(meta #&apos;foo) --&amp;gt; the private is there&lt;br/&gt;
(defone foo 10)&lt;br/&gt;
foo is still 5&lt;br/&gt;
(meta #&apos;foo) --&amp;gt; the private has been lost&lt;/p&gt;</description>
                <environment></environment>
            <key id="15966">CLJ-1148</key>
            <summary>adds docstring support to defonce, and stops it from stomping existing metadata</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="joegallo">Joe Gallo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jan 2013 17:16:40 -0600</created>
                <updated>Thu, 17 Jan 2013 17:16:40 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11805" name="0001-new-defonce-hotness.patch" size="1226" author="joegallo" created="Thu, 17 Jan 2013 17:16:40 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-1060] &apos;list*&apos; returns not a list</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1060</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Function &apos;list?&apos; returns sequence, but not a list.&lt;br/&gt;
It is a bit confusing.&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; (list? (list* 1 &apos;(2 3)))
&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15670">CLJ-1060</key>
            <summary>&apos;list*&apos; returns not a list</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="azhlobich">Andrei Zhlobich</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Sep 2012 06:32:23 -0500</created>
                <updated>Fri, 18 Jan 2013 09:41:40 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29457" author="stu" created="Mon, 17 Sep 2012 06:52:32 -0500"  >&lt;p&gt;should the docstring for list* change to say it returns a seq?&lt;/p&gt;</comment>
                    <comment id="30057" author="halgari" created="Tue, 27 Nov 2012 11:58:18 -0600"  >&lt;p&gt;Is there a reason why we can&apos;t have list* actually return a list? The cost of creating a list vs a cons is negligible.&lt;/p&gt;</comment>
                    <comment id="30369" author="mnicky" created="Fri, 4 Jan 2013 14:02:16 -0600"  >&lt;p&gt;The question is what to do with the one-argument case of list*, because in cases like: (list* {:a 1 :b 2}) it doesn&apos;t return IPersistentList as well. I propose just applying &apos;list&apos;.&lt;/p&gt;

&lt;p&gt;I added patch &apos;list-star-fix.diff&apos; (dated 04/Jan/2013) with Cons implementing IPersistentList and doing (apply list args) in one-argument case of list*. To be able to use &apos;apply&apos; in list* I had to declare it before the definition of list* in the source code. The apply itself also uses list*, but luckily not the one-argument version of list*, so it should be safe... The patch also contains simple unit tests.&lt;/p&gt;

&lt;p&gt;Discussion is also here: &lt;a href=&quot;https://groups.google.com/forum/#!topic/clojure/co8lcKymfi8&quot;&gt;https://groups.google.com/forum/#!topic/clojure/co8lcKymfi8&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30370" author="michalmarczyk" created="Fri, 4 Jan 2013 16:11:56 -0600"  >&lt;p&gt;(apply list args) would make (list* (range)) hang, where currently it returns a partially-realized lazy seq. Also, even for non-lazy seqs &amp;#8211; possibly lists themselves &amp;#8211; it would always build a new list from scratch, right?&lt;/p&gt;

&lt;p&gt;Also, if I&apos;m reading the patch correctly, it would make 2+-ary list&amp;#42; overloads and cons return lists &amp;#8211; that is, IPersistentList instances &amp;#8211; always (Conses would now be lists), but repeatedly calling next on such a list might eventually produce a non-list. The only way around that would be to make all seqs into IPersistentLists &amp;#8211; that doesn&apos;t seem desirable at first glance...?&lt;/p&gt;

&lt;p&gt;On a side note, for the case where the final &quot;args&quot; argument is in fact a list, we already have a &quot;prepend many items&quot; function, namely conj. list&amp;#42; currently acts as the vararg variant of cons (in line with Lisp tradition); I&apos;m actually quite happy with that.&lt;/p&gt;</comment>
                    <comment id="30372" author="michalmarczyk" created="Fri, 4 Jan 2013 16:19:30 -0600"  >&lt;p&gt;I&apos;m in favour of the &quot;list&quot; -&amp;gt; &quot;seq&quot; tweak to the docstring though, assuming impl remains unchanged.&lt;/p&gt;</comment>
                    <comment id="30376" author="mnicky" created="Fri, 4 Jan 2013 18:13:37 -0600"  >&lt;p&gt;Yep, these are all valid points, thanks! I see this as a question whether the list* function is a list constructor or not. If yes (and it would be possible to implement it in a satisfactory way), it should probably return a list.&lt;/p&gt;

&lt;p&gt;We could avoid building a new list by sth 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;(&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (list? args)
  args
  (apply list args))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(btw, &apos;vec&apos; also creates a new vector even when the argument itself is a vector)&lt;/p&gt;

&lt;p&gt;The contract of next seems to be to return a seq, not a list - its docstring reads: &lt;em&gt;&quot;Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.&quot;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Btw, in some Lisp/Scheme impls I checked, cons seems to be a list as well. E.g. in CLisp (and similar in Guile and Racket):&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; (listp (cons 2 &apos;()))
T
&amp;gt; (listp (list* 1 2 &apos;()))
T&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11792" name="list-star-fix.diff" size="2783" author="mnicky" created="Fri, 4 Jan 2013 13:50:20 -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-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-1151] Minor Code Cleanup in core.reducers: use required walk, drop this for coll</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1151</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;First, core.reducers requires clojure.walk :as walk, but does not use the alias.  &lt;br/&gt;
Second, the two arity implementation of coll-reduce in function reducer uses &apos;this&apos;, whereas similar implementations in that file use &apos;coll&apos;.  AFAICT it makes no difference to use &apos;coll&apos; (all tests pass, no change in performance) and it is more in line with the rest of the code.&lt;/p&gt;

&lt;p&gt;The two things seem small enough to be put into one cleanup case.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15972">CLJ-1151</key>
            <summary>Minor Code Cleanup in core.reducers: use required walk, drop this for coll</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="ska2342">Stefan Kamphausen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Jan 2013 16:43:30 -0600</created>
                <updated>Mon, 21 Jan 2013 16:43:30 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11810" name="tiny-reducers-cleanup.diff" size="1172" author="ska2342" created="Mon, 21 Jan 2013 16:43:30 -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-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-1082] Subvecs of primitive vectors cannot be reduced</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1082</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I could reproduce on current 10/05 git.&lt;/p&gt;

&lt;p&gt;Reduce doesn&apos;t work on subvecs of primitive vectors.&lt;br/&gt;
Root cause seems to be that RT/subvec and APersistentVector$SubVector make assumptions about implementation&lt;/p&gt;

&lt;p&gt;If reduce on a subvec doesn&apos;t work then neither will nice ops like fold.&lt;/p&gt;

&lt;p&gt;How to cause: &lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;prim-vec (into (vector-of :long) (range 10000))&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (reduce + (subvec prim-vec 1 500)))&lt;/p&gt;

&lt;p&gt;-&amp;gt;&amp;gt; ClassCastException clojure.core.Vec cannot be cast to clojure.lang.PersistentVector  clojure.lang.APersistentVector$SubVector.iterator (APersistentVector.java:523)&lt;/p&gt;
</description>
                <environment>1.7.0-08, OS X 10.8</environment>
            <key id="15733">CLJ-1082</key>
            <summary>Subvecs of primitive vectors cannot be reduced</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gshayban">Ghadi Shayban</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Oct 2012 18:49:21 -0500</created>
                <updated>Sat, 26 Jan 2013 07:29:55 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30056" author="halgari" created="Tue, 27 Nov 2012 11:52:48 -0600"  >&lt;p&gt;Confirmed to be broken on master. Vetting. Not sure what it&apos;s going to take to fix this, however. If this is of intrest for you, you might want to help push it along by providing a patch. &lt;/p&gt;</comment>
                    <comment id="30058" author="jafingerhut" created="Tue, 27 Nov 2012 12:09:26 -0600"  >&lt;p&gt;There is no code or ticket for this yet, but I wanted to mention that I&apos;ve begun working on an implementation of RRB-Tree (Relaxed Radix Balanced Tree) vectors for Clojure (see discussion at &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/xnbtzTVEK9A&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/xnbtzTVEK9A&lt;/a&gt;).  Assuming it is no big deal to get reducers to work on such vectors, subvec could be implemented in O(log n) time in such a way that the result was the same concrete type of vector as you started with, and thus reducers would work on them, too.&lt;/p&gt;

&lt;p&gt;It would mean O(log n) time for subvec instead of today&apos;s O(1), but this would likely fix other limitations that exist today with subvec&apos;s, e.g. &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-761&quot; title=&quot;print-dup generates call to nonexistent method for APersistentVector$SubVector&quot;&gt;CLJ-761&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="30461" author="mikera" created="Sun, 20 Jan 2013 05:14:04 -0600"  >&lt;p&gt;I have a fix for this and a regression test in the tree below:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mikera/clojure/tree/winfix&quot;&gt;https://github.com/mikera/clojure/tree/winfix&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not sure how best to make this into a patch though - I also have the pprint fix in here (&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt;)&lt;/p&gt;</comment>
                    <comment id="30462" author="mikera" created="Sun, 20 Jan 2013 18:41:50 -0600"  >&lt;p&gt;Attached a patch that I created with: &lt;/p&gt;

&lt;p&gt;git format-patch winfix --stdout HEAD~3..HEAD &amp;gt; clj-1082.patch&lt;/p&gt;

&lt;p&gt;Does this do the trick? I had to use the HEAD~3..HEAD to just get the most recent 3 commits and exclude the pprint changes that I needed in order to build on Windows.&lt;/p&gt;</comment>
                    <comment id="30463" author="mikera" created="Sun, 20 Jan 2013 18:42:24 -0600"  >&lt;p&gt;Patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1082&quot; title=&quot;Subvecs of primitive vectors cannot be reduced&quot;&gt;CLJ-1082&lt;/a&gt;, containing 3 commits&lt;/p&gt;</comment>
                    <comment id="30465" author="jafingerhut" created="Mon, 21 Jan 2013 01:11:04 -0600"  >&lt;p&gt;Mike, your patch clj-1082.patch applies cleanly to latest master for me, so looks like you found one way to do it.&lt;/p&gt;

&lt;p&gt;Another would be as follows, and closer to the directions on the JIRA workflow page: &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; (but not identical).  Note that these commands would work on Mac OS X or Linux.  I&apos;m not sure what the correct corresponding command would be on Windows for the &quot;git am&quot; step below, unless that just happens to work because Windows and/or git implement the input redirection with &quot;&amp;lt;&quot; somehow.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Check out a fresh repo&lt;br/&gt;
$ git clone git://github.com/clojure/clojure.git&lt;br/&gt;
$ cd clojure&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Apply the patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt; to the master branch.  This step isn&apos;t on the JIRA workflow page.&lt;br/&gt;
$ git am --keep-cr -s &amp;lt; clj-1076-fix-tests-on-windows-patch-v1.txt&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Create a branch for yourself&lt;br/&gt;
$ git checkout -b fix-clj-1082&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;After editing to make your changes, commit them to the current fix-clj-1082 branch&lt;br/&gt;
$ git commit -a -m &quot;fixed annoying bug, refs #42&quot;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;From there on down it is the same as the instructions on the JIRA workflow page.  The &quot;git format-patch master --stdout &amp;gt; file.patch&quot; will create a patch for the changes you have made in the current branch fix-clj-1082 starting from the master branch, which has the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1076&quot; title=&quot;pprint tests fail on Windows, expecting \n&quot;&gt;CLJ-1076&lt;/a&gt; fix because of the &apos;git am&apos; command above.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11807" name="clj-1082.patch" size="3892" author="mikera" created="Sun, 20 Jan 2013 18:42:24 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

<item>
            <title>[CLJ-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-1080] Eliminate many uses of reflection in Clojure code</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1080</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There are dozens of uses of reflection in Clojure code that can be eliminated by adding suitable type hints.  This patch adds the necessary type hints for most of those.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15729">CLJ-1080</key>
            <summary>Eliminate many uses of reflection in Clojure code</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 30 Sep 2012 11:36:18 -0500</created>
                <updated>Thu, 7 Feb 2013 08:54:50 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29581" author="jafingerhut" created="Sun, 30 Sep 2012 11:39:03 -0500"  >&lt;p&gt;Patch clj-1080-eliminate-many-reflection-warnings-patch-v1.txt dated Sep 30 2012 adds type hints to eliminate many uses of reflection in Clojure core code.&lt;/p&gt;</comment>
                    <comment id="29945" author="jafingerhut" created="Wed, 14 Nov 2012 13:26:02 -0600"  >&lt;p&gt;clj-1080-eliminate-many-reflection-warnings-patch-v2.txt dated Nov 14 2012 is identical to the previous patch (to be removed soon), except it applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="30563" author="jafingerhut" created="Thu, 7 Feb 2013 08:54:33 -0600"  >&lt;p&gt;clj-1080-eliminate-many-reflection-warnings-patch-v3.txt dated Feb 7 2013 is identical to the previous patch (to be removed soon), except it applies cleanly to latest master.  One type hint in the patch was added due to a different change, and was no longer needed in the patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11841" name="clj-1080-eliminate-many-reflection-warnings-patch-v3.txt" size="19090" author="jafingerhut" created="Thu, 7 Feb 2013 08:54:33 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-706] make use of deprecated namespaces/vars easier to spot</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-706</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;From the mailing list &lt;a href=&quot;http://groups.google.com/group/clojure/msg/c41d909bd58e4534&quot;&gt;http://groups.google.com/group/clojure/msg/c41d909bd58e4534&lt;/a&gt;. It is easy to use deprecated namespaces without knowing you are doing so. The documentation warnings are small, and there is no compiler warning.&lt;/p&gt;

&lt;p&gt;Some possibilities include:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;much more visible deprecation styling in the documentation&lt;/li&gt;
	&lt;li&gt;stderr warnings when referencing a deprecated thing.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I don&apos;t love the idea of stderr warnings on all the time. Rich: is there an approach to this that you would like to see a patch for?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14315">CLJ-706</key>
            <summary>make use of deprecated namespaces/vars easier to spot</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jan 2011 20:39:01 -0600</created>
                <updated>Wed, 13 Feb 2013 00:38:18 -0600</updated>
                                                                            <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="26099" author="richhickey" created="Fri, 7 Jan 2011 09:38:32 -0600"  >&lt;p&gt;I don&apos;t mind warning to stderr&lt;/p&gt;</comment>
                    <comment id="29815" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500"  >&lt;p&gt;706-deprecated-var-warning.diff adds warnings when using deprecated vars. The other three patches clean up deprecation warnings.&lt;/p&gt;</comment>
                    <comment id="29816" author="jafingerhut" created="Fri, 26 Oct 2012 14:23:20 -0500"  >&lt;p&gt;Great stuff.  I looked through the first patch, and didn&apos;t see anything in there that lets someone disable deprecation warnings from the command line, the way that &lt;b&gt;warn-on-reflection&lt;/b&gt; can today be set to true with a command line option.&lt;/p&gt;

&lt;p&gt;Is that something important to have for deprecation warnings?&lt;/p&gt;</comment>
                    <comment id="29835" author="jafingerhut" created="Sun, 28 Oct 2012 16:57:00 -0500"  >&lt;p&gt;I was hoping it would be quick and easy to add source file, line, and column info to the deprecation warning messages.  It isn&apos;t as easy as adding them to the format() call, because the method analyzeSymbol doesn&apos;t receive these values as args.  Is this deprecation check being done in a place where it is not easy to relate it to the source file, line, and column?  Could it be done in a place where that info is easily available?&lt;/p&gt;</comment>
                    <comment id="29864" author="gshayban" created="Mon, 29 Oct 2012 01:02:25 -0500"  >&lt;p&gt;Another patch - this time to warn on loading deprecated namespaces, instead of vars. This patch requires the first one.&lt;/p&gt;

&lt;p&gt;Re: line/column, I&apos;ll figure out how to thread the compile context through if it&apos;s desired.&lt;/p&gt;

&lt;p&gt;Re: Compile flag.  I have a patch for this also, but I&apos;m still verifying how to invoke.  How is warn-on-reflection set by command line?&lt;/p&gt;</comment>
                    <comment id="29865" author="jafingerhut" created="Mon, 29 Oct 2012 01:43:58 -0500"  >&lt;p&gt;Re: Compile flag.  Don&apos;t hold off on implementing a flag if you want to, but it might be worth hearing from others whether such a command line option is even desired.  I was asking in hopes of eliciting such a response.&lt;/p&gt;

&lt;p&gt;For the way that it is handled in the Clojure compiler, search for REFLECTION_WARNING_PROP and related code in Compile.java.  If you invoke the Clojure compiler directly via a Java command line, use -Dclojure.compile.warn-on-reflection=true (default is false).  See the recent email thread sent to Clojure Dev Google group if you want to know how to do it via ant or Maven.  Link: &lt;a href=&quot;https://mail.google.com/mail/?shva=1#label/clojure-dev/13aa0e34530196c3&quot;&gt;https://mail.google.com/mail/?shva=1#label/clojure-dev/13aa0e34530196c3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is also a separate command-line flag called &lt;b&gt;compiler-options&lt;/b&gt; (see Compile.java) that is implemented as a map inside the compiler.  It was added more recently than &lt;b&gt;warn-on-reflection&lt;/b&gt;, and might be the preferred method to add more such options, to avoid having to continue to add more arguments to the pushThreadBindings calls done in several places.&lt;/p&gt;</comment>
                    <comment id="29867" author="gshayban" created="Mon, 29 Oct 2012 10:36:00 -0500"  >&lt;p&gt;Thanks, Andy.&lt;/p&gt;

&lt;p&gt;Alternately for the last ns patch, it is equivalent to call (print-method msg &lt;b&gt;err&lt;/b&gt;), rather than binding &lt;b&gt;out&lt;/b&gt; to &lt;b&gt;err&lt;/b&gt;, may be more readable.  I&apos;ll be glad to send that in if it&apos;s preferable.&lt;/p&gt;</comment>
                    <comment id="30581" author="jafingerhut" created="Wed, 13 Feb 2013 00:38:18 -0600"  >&lt;p&gt;706-deprecated-var-warning-patch-v2.txt dated Feb 12 2013 is identical to 706-deprecated-var-warning.diff dated Oct 26 2012, except it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11617" name="706-deprecated-var-warning.diff" size="6119" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11851" name="706-deprecated-var-warning-patch-v2.txt" size="6099" author="jafingerhut" created="Wed, 13 Feb 2013 00:38:18 -0600" />
                    <attachment id="11619" name="706-fix-deprecation-warnings-agents.diff" size="1106" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11620" name="706-fix-deprecation-warnings-on-replicate.diff" size="3031" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11618" name="706-fix-deprecation-warning-test-junit.diff" size="2669" author="lvanderhart" created="Fri, 26 Oct 2012 13:37:06 -0500" />
                    <attachment id="11638" name="706-warning-on-deprecated-ns.diff" size="942" author="gshayban" created="Mon, 29 Oct 2012 01:02:25 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-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>1</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-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-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-970] extend/implement parameterized types (generics)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-970</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When extending parameterized types, class files can track the original signatures of the superclass and super interfaces so that the original types can be obtained at run time.  This runtime reflection is used in some Java frameworks, and implementing it in Clojure can enable interop.  See &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/5efd692804df3f47/1336e591c2eedfa1&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/5efd692804df3f47/1336e591c2eedfa1&lt;/a&gt; for examples of this request.&lt;/p&gt;

&lt;p&gt;This proposal checks the :parameters keyword in type meta information.  If a parameter is found, it is added to the class signature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15324">CLJ-970</key>
            <summary>extend/implement parameterized types (generics)</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="jim.blomo">Jim Blomo</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Apr 2012 01:33:49 -0500</created>
                <updated>Fri, 1 Mar 2013 09:46:59 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="28143" author="jim.blomo" created="Sat, 14 Apr 2012 11:30:17 -0500"  >&lt;p&gt;2012-04-14 extend-implement-parameterized-types.diff is the correctly formatted `git format-patch master` for this change.  It supersedes clojure-parameterized-generics.diff from 2012-04-10.&lt;/p&gt;</comment>
                    <comment id="29230" author="jafingerhut" created="Sun, 19 Aug 2012 05:00:31 -0500"  >&lt;p&gt;Patch clj-970-extend-implement-parameterized-types-patch2.txt dated Aug 19 2012 is identical to Jim Blomo&apos;s patch extend-implement-parameterized-types.diff dated Apr 14 2012, except it has updated context lines so that it applies cleanly to latest master as of today.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11450" name="clj-970-extend-implement-parameterized-types-patch2.txt" size="5525" author="jafingerhut" created="Sun, 19 Aug 2012 05:00:31 -0500" />
                    <attachment id="11049" name="extend-implement-parameterized-types.diff" size="5594" author="jim.blomo" created="Sat, 14 Apr 2012 11:30:17 -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-1073] Make print-sequential interruptible</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1073</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This allows print-sequential to be interrupted by Thread.interrupt(), rather than requiring clients to resort to Thread.stop(). This is especially helpful when printing very large sequences.&lt;/p&gt;

&lt;p&gt;See also clojure-dev discussion at &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/vs0RNUQXiYE/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/vs0RNUQXiYE/discussion&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15713">CLJ-1073</key>
            <summary>Make print-sequential interruptible</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Fri, 21 Sep 2012 16:10:46 -0500</created>
                <updated>Fri, 1 Mar 2013 10:18:01 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29522" author="jafingerhut" created="Fri, 21 Sep 2012 19:04:21 -0500"  >&lt;p&gt;In a quickly hacked up performance test on Mac OS X 10.6.8 + Oracle/Apple JDK 1.6.0_35 which I can attach, I saw about a 9% to 10% slowdown for Colin&apos;s patch in printing large vectors.&lt;/p&gt;

&lt;p&gt;I have a modified patch that only calls Thread/interrupted after every 20 items are printed, and with that version the slowdown versus the original code was about 3% to 4%.&lt;/p&gt;

&lt;p&gt;Colin, would there be any down side to checking Thread/interrupted less often for your purposes?&lt;/p&gt;

&lt;p&gt;To run performance test, edit attachment compile.sh to point at your clojure.jar, put file perftest-print.clj in the same directory, and run ./compile.sh    It should work on Mac or Linux.&lt;/p&gt;</comment>
                    <comment id="29523" author="jafingerhut" created="Sat, 22 Sep 2012 10:47:08 -0500"  >&lt;p&gt;clj-1073-allow-thread-interrupt-in-print-sequential-patch.txt dated Sep 22 2012 is similar to Colin&apos;s patch 0001-Allow-thread-interruption-in-print-sequential.patch dated Sep 21 2012, except it only checks interrupted status every 20 (or maybe 21?) times through the loop in print-sequential.  It is the one that is 3-4% slower than the current latest master Clojure code in my performance test mentioned above, versus Colin&apos;s patch which is about 9-10% slower on that test.&lt;/p&gt;</comment>
                    <comment id="29700" author="stu" created="Fri, 19 Oct 2012 15:31:32 -0500"  >&lt;p&gt;Is this primarily intended for dev-time use? I wouldn&apos;t want to lose performance for this if there is any way to implement it as a dev-time feature.&lt;/p&gt;</comment>
                    <comment id="29701" author="trptcolin" created="Fri, 19 Oct 2012 16:27:09 -0500"  >&lt;p&gt;Andy: The only caveat I can think of with checking Thread/interrupted less often is in the case of deeply nested collections.&lt;/p&gt;

&lt;p&gt;Stu: Dev-time use was the original reason for opening this, yes. But I can imagine it being needed for anytime a thread can be interrupted, whether that&apos;s by ctrl-c or other means.&lt;/p&gt;

&lt;p&gt;My original thinking, performance-wise, was that once we&apos;re already doing IO, we&apos;re probably not too concerned with CPU-bound checks like this, so I didn&apos;t bother with it. I guess with an SSD that&apos;s not as likely to be true.&lt;/p&gt;

&lt;p&gt;Locally (w/ my SSD), I&apos;m seeing that Andy&apos;s benchmark of printing a million numbers is about a second slower than the baseline with my original patch (12.08s -&amp;gt; 13.10s), and about the same with Andy&apos;s patch (12.08s -&amp;gt; 11.75s). Decreasing to a thousand numbers doesn&apos;t really show any difference (every version completes in ~1.3s). Bumping to 2 million adds 2 seconds above the baseline with my patch, and Andy&apos;s is again just a bit faster than the baseline (somehow). Bumping to 5 million runs me out of heap space &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="29913" author="jafingerhut" created="Thu, 8 Nov 2012 16:16:24 -0600"  >&lt;p&gt;clj-1073-add-print-interruptibly-patch-v1.txt dated Nov 8 2012 is the same idea as Colin&apos;s patch 0001-Allow-thread-interruption-in-print-sequential.patch dated Sep 21 2012, except it only checks (Thread/interrupted) if a new var &lt;b&gt;print-interruptibly&lt;/b&gt; is true.  Its default value is false.&lt;/p&gt;

&lt;p&gt;Performance results of the perftest-print.clj program, as driven by the test.sh script, for Clojure 1.5-beta1 and with two different patches.  All run times are elapsed, in seconds, and sorted in increasing order for easier comparison.&lt;/p&gt;

&lt;p&gt;Executive summary: Performance results when &lt;b&gt;print-interruptibly&lt;/b&gt; is left at default false value are pretty much same as today.  With &lt;b&gt;print-interruptibly&lt;/b&gt; bound to true, performance results are slower, as expected, and about the same as with Colin&apos;s patch.&lt;/p&gt;

&lt;p&gt;Original 1.5-beta1 unchanged:&lt;br/&gt;
13.75 13.80 13.83 13.87 13.93&lt;/p&gt;

&lt;p&gt;With this new &lt;b&gt;print-interruptibly&lt;/b&gt; patch, with &lt;b&gt;print-interruptibly&lt;/b&gt;&lt;br/&gt;
at default false value:&lt;br/&gt;
13.86 13.91 14.01 14.08 14.14&lt;/p&gt;

&lt;p&gt;With this new &lt;b&gt;print-interruptibly&lt;/b&gt; patch, with &lt;b&gt;print-interruptibly&lt;/b&gt;&lt;br/&gt;
bound to true while printing (so a slightly modified version of&lt;br/&gt;
perftest-print.clj that does (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*print-interruptibly* true&amp;#93;&lt;/span&gt;&lt;br/&gt;
...) around the heart of the code):&lt;br/&gt;
15.29 15.44 15.45 15.62 15.63&lt;/p&gt;

&lt;p&gt;With patch 0001-Allow-thread-interruption-in-print-sequential.patch&lt;br/&gt;
applied:&lt;br/&gt;
15.38 15.46 15.48 15.49 15.50&lt;/p&gt;</comment>
                    <comment id="29933" author="trptcolin" created="Mon, 12 Nov 2012 13:37:10 -0600"  >&lt;p&gt;Andy&apos;s latest patch looks good &amp;amp; makes it easy for the REPL and other interruptible scenarios to opt into the &quot;safe&quot; behavior. I would personally have preferred to have the &quot;safe&quot; behavior on by default, but can understand the performance concerns, and this gets me what I really wanted.&lt;/p&gt;</comment>
                    <comment id="30122" author="halgari" created="Fri, 30 Nov 2012 15:09:07 -0600"  >&lt;p&gt;Vetting as it sounds like the performance issues are taken care of. &lt;/p&gt;</comment>
                    <comment id="30580" author="jafingerhut" created="Wed, 13 Feb 2013 00:28:34 -0600"  >&lt;p&gt;clj-1073-add-print-interruptibly-patch-v2.txt dated Feb 12 2013 is identical to clj-1073-add-print-interruptibly-patch-v1.txt dated Nov 8 2012 (soon to be removed) except that it applies cleanly to latest master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11517" name="0001-Allow-thread-interruption-in-print-sequential.patch" size="1260" author="trptcolin" created="Fri, 21 Sep 2012 16:10:46 -0500" />
                    <attachment id="11850" name="clj-1073-add-print-interruptibly-patch-v2.txt" size="3902" author="jafingerhut" created="Wed, 13 Feb 2013 00:28:34 -0600" />
                    <attachment id="11519" name="perftest-print.clj" size="284" author="jafingerhut" created="Fri, 21 Sep 2012 19:05:46 -0500" />
                    <attachment id="11518" name="test.sh" size="298" author="jafingerhut" created="Fri, 21 Sep 2012 19:05:34 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

<item>
            <title>[CLJ-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-991] partition-by reducer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-991</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description></description>
                <environment></environment>
            <key id="15428">CLJ-991</key>
            <summary>partition-by reducer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                        <label>enhancement</label>
                        <label>patch</label>
                        <label>patch,</label>
                    </labels>
                <created>Thu, 10 May 2012 20:08:20 -0500</created>
                <updated>Mon, 4 Mar 2013 14:49:42 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="29140" author="richhickey" created="Tue, 14 Aug 2012 13:52:39 -0500"  >&lt;p&gt;I&apos;d like to see something much faster than this.&lt;/p&gt;</comment>
                    <comment id="29161" author="hiredman" created="Wed, 15 Aug 2012 01:58:59 -0500"  >&lt;p&gt;For reference here is a benchmark of a non-reducers (seq based) process that uses partition-by&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (def x (vec (range 1e6)))
#&apos;user/x
user=&amp;gt; (bench (reduce + (map count (partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 60
             Execution time mean : 1.072157 sec  95.0% CI: (1.070606 sec, 1.073381 sec)
    Execution time std-deviation : 165.818282 ms  95.0% CI: (163.873585 ms, 168.271261 ms)
         Execution time lower ci : 972.562000 ms  95.0% CI: (972.562000 ms, 973.301850 ms)
         Execution time upper ci : 1.419148 sec  95.0% CI: (1.419148 sec, 1.419148 sec)

Found 7 outliers in 60 samples (11.6667 %)
	low-severe	 2 (3.3333 %)
	low-mild	 5 (8.3333 %)
 Variance from outliers : 85.8489 % Variance is severely inflated by outliers
nil
user=&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Same again using r/partition-by from reducer-partition-by.diff&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (bench (r/reduce + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 60
             Execution time mean : 1.418350 sec  95.0% CI: (1.417738 sec, 1.418948 sec)
    Execution time std-deviation : 66.736477 ms  95.0% CI: (66.186568 ms, 67.610777 ms)
         Execution time lower ci : 1.370419 sec  95.0% CI: (1.370419 sec, 1.370419 sec)
         Execution time upper ci : 1.544151 sec  95.0% CI: (1.544151 sec, 1.544156 sec)

Found 10 outliers in 60 samples (16.6667 %)
	low-severe	 2 (3.3333 %)
	low-mild	 8 (13.3333 %)
 Variance from outliers : 33.5591 % Variance is moderately inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(using &lt;a href=&quot;https://github.com/hugoduncan/criterium&quot;&gt;https://github.com/hugoduncan/criterium&lt;/a&gt; for benchmarking)&lt;/p&gt;</comment>
                    <comment id="29163" author="hiredman" created="Wed, 15 Aug 2012 02:17:20 -0500"  >&lt;p&gt;same again for r/partition-by from reducers-partition-by2.diff&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (bench (r/reduce + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 180
             Execution time mean : 307.596806 ms  95.0% CI: (307.271339 ms, 307.961550 ms)
    Execution time std-deviation : 34.060809 ms  95.0% CI: (33.613169 ms, 34.416837 ms)
         Execution time lower ci : 285.339333 ms  95.0% CI: (285.339333 ms, 285.339333 ms)
         Execution time upper ci : 385.087950 ms  95.0% CI: (385.087950 ms, 385.087950 ms)

Found 10 outliers in 60 samples (16.6667 %)
	low-severe	 4 (6.6667 %)
	low-mild	 6 (10.0000 %)
 Variance from outliers : 73.8053 % Variance is severely inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;same again driven using r/fold (for grins) instead of r/reduce&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (bench (r/fold + (r/map count (r/partition-by #(or (zero? (mod % 3)) (zero? (mod % 5))) x))))
Evaluation count             : 360
             Execution time mean : 215.214486 ms  95.0% CI: (214.915417 ms, 215.664236 ms)
    Execution time std-deviation : 36.588464 ms  95.0% CI: (36.305548 ms, 36.847846 ms)
         Execution time lower ci : 185.575000 ms  95.0% CI: (185.575000 ms, 185.575000 ms)
         Execution time upper ci : 287.605175 ms  95.0% CI: (286.547833 ms, 287.605175 ms)

Found 6 outliers in 60 samples (10.0000 %)
	low-severe	 3 (5.0000 %)
	low-mild	 3 (5.0000 %)
 Variance from outliers : 87.6303 % Variance is severely inflated by outliers
nil
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;reducers-partition-by2.diff is faster, but I am not wild about introducing a type and a protocol. also not sure about the CollFold impl.&lt;/p&gt;</comment>
                    <comment id="29167" author="richhickey" created="Wed, 15 Aug 2012 06:58:45 -0500"  >&lt;p&gt;Let&apos;s leave fold out for this first patch, please.&lt;/p&gt;</comment>
                    <comment id="29184" author="hiredman" created="Wed, 15 Aug 2012 14:34:40 -0500"  >&lt;p&gt;reducer-partition-by3.diff is a cleaned up version of reducer-partition-by2.diff without fold&lt;/p&gt;</comment>
                    <comment id="29736" author="devn" created="Sat, 20 Oct 2012 19:07:00 -0500"  >&lt;p&gt;Per Andy Fingerhut&apos;s email reducer-partition-by3.diff was failing to apply. This patch should apply cleanly to current master.&lt;/p&gt;</comment>
                    <comment id="29886" author="jafingerhut" created="Thu, 1 Nov 2012 18:59:50 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete to None, since the reason for its being marked Incomplete seems to have been addressed with the latest patch.&lt;/p&gt;</comment>
                    <comment id="30697" author="hiredman" created="Mon, 4 Mar 2013 14:49:42 -0600"  >&lt;p&gt;should this be assigned to someone?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11427" name="reducer-partition-by2.diff" size="3061" author="hiredman" created="Wed, 15 Aug 2012 02:11:03 -0500" />
                    <attachment id="11435" name="reducer-partition-by3.diff" size="2636" author="hiredman" created="Wed, 15 Aug 2012 14:34:40 -0500" />
                    <attachment id="11591" name="reducer-partition-by4.diff" size="2647" author="devn" created="Sat, 20 Oct 2012 19:07:00 -0500" />
                    <attachment id="11190" name="reducer-partition-by.diff" size="2657" author="hiredman" created="Thu, 10 May 2012 20:08:20 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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-1177] clojure.java.io/resource and non-ASCII characters</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1177</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;clojure.java.io/resource corrupts path containing UTF-8 characters without issuing 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;user=&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;java.runtime.version&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;1.8.0-ea-b79&quot;&lt;/span&gt;
user=&amp;gt; (clojure-version)
&lt;span class=&quot;code-quote&quot;&gt;&quot;1.5.0&quot;&lt;/span&gt;
user=&amp;gt; (&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;/getProperty &lt;span class=&quot;code-quote&quot;&gt;&quot;user.dir&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;
user=&amp;gt; (clojure.java.io/resource &lt;span class=&quot;code-quote&quot;&gt;&quot;myfile.txt&quot;&lt;/span&gt;)
#&amp;lt;URL file:/dir/d%c3%a9f/resources/myfile.txt&amp;gt;
user=&amp;gt; (slurp (clojure.java.io/resource &lt;span class=&quot;code-quote&quot;&gt;&quot;myfile.txt&quot;&lt;/span&gt;) :encoding &lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;)
FileNotFoundException /dir/d&#195;&#169;f/resources/myfile.txt (No such file or directory)  java.io.FileInputStream.open (FileInputStream.java:-2)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="16062">CLJ-1177</key>
            <summary>clojure.java.io/resource and non-ASCII characters</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="trevor">Trevor Wennblom</reporter>
                        <labels>
                        <label>bug</label>
                        <label>enhancement</label>
                    </labels>
                <created>Thu, 7 Mar 2013 16:54:43 -0600</created>
                <updated>Sun, 10 Mar 2013 17:56:52 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30713" author="jafingerhut" created="Fri, 8 Mar 2013 00:10:22 -0600"  >&lt;p&gt;Below is a workaround, at least.  I don&apos;t know, but perhaps the as-file method for URLs in io.clj of Clojure, the part that converts %hh sequences to a character with code point in the range 0 through 255, is at least partly at fault here.  I don&apos;t know right now if it is possible to modify that code to handle the general case of whatever character encoding munging is going on here to when .getResource creates the URL object.&lt;/p&gt;


&lt;p&gt;clojure.java.io/resource is documented to return a Java object of type java.net.URL, which seems like it does %hh escaping of many characters.  Reference &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; to a Java bug from 2001 where a Java user was surprised by the then-recent change in behavior of the getResource method &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Doing a little searching I found this StackOverflow question &lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;, which has what might be a workaround.  I tried it on my Mac OS X 10.6 system running JDK 1.6 and it seemed to work:&lt;/p&gt;

&lt;p&gt;(slurp (.getContent (clojure.java.io/resource &quot;abc&#237;d/foo.txt&quot;)))&lt;/p&gt;

&lt;p&gt;That getContent is a method for class java.net.URL &lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485&quot;&gt;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485&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;http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#getResource%28java.lang.String%29&quot;&gt;http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#getResource%28java.lang.String%29&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://stackoverflow.com/questions/13013629/best-international-alternative-to-javas-getclass-getresource&quot;&gt;http://stackoverflow.com/questions/13013629/best-international-alternative-to-javas-getclass-getresource&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URL.html#getContent%28%29&quot;&gt;http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URL.html#getContent%28%29&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30716" author="trevor" created="Fri, 8 Mar 2013 09:56:22 -0600"  >&lt;p&gt;Hi Andy,&lt;/p&gt;

&lt;p&gt;Thanks for the background and suggestions, that&apos;s very helpful.&lt;/p&gt;

&lt;p&gt;I&apos;m gradually learning Clojure with no Java experience. In this case I was searching for the preferred Clojure way to access items in directories declared under :resource-paths in a Leiningen project.clj file. Perhaps clojure.java.io/resource isn&apos;t the best way to do this as it&apos;s possibly too tied to the expectation for a URI instead of a more general IRI.&lt;/p&gt;

&lt;p&gt;You&apos;re suggested workaround did work for my use case:&lt;/p&gt;

&lt;p&gt;(slurp (.getContent (clojure.java.io/resource &quot;abc&#237;d/foo.txt&quot;)))&lt;/p&gt;

&lt;p&gt;but hopefully there would be more native/direct Clojure way to accomplish the same eventually.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if java.net.IDN would be useful internally as a fix in clojure.java.io/resource &#8212; I&apos;m assuming not since it wasn&apos;t added until Java 6.&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&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;user=&amp;gt; (&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &apos;java.net.IDN)
java.net.IDN
user=&amp;gt; (java.net.IDN/toASCII &lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;xn--/dir/df-gya&quot;&lt;/span&gt;
user=&amp;gt; (java.net.IDN/toUnicode &lt;span class=&quot;code-quote&quot;&gt;&quot;xn--/dir/df-gya&quot;&lt;/span&gt;)
&lt;span class=&quot;code-quote&quot;&gt;&quot;/dir/d&#233;f&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/net/IDN.html&quot;&gt;http://docs.oracle.com/javase/6/docs/api/java/net/IDN.html&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30717" author="jafingerhut" created="Fri, 8 Mar 2013 13:30:05 -0600"  >&lt;p&gt;Patch clj-1177-patch-v1.txt dated Mar 8 2013 is an attempt to solve this issue, in what I think may be a correct way.  As specified in RFC 3986, when taking a Unicode string and making a URL of it, it should be encoded in UTF-8 and then each individual byte is subject to the %HH hex encoding.  This patch reverses that to turn URLs into file names.&lt;/p&gt;

&lt;p&gt;Tested on Mac OS X 10.6 with a command line like this (it doesn&apos;t work without the -Dfile.encoding=UTF-8 option on my Mac, probably because the default encoding is MacRoman):&lt;/p&gt;

&lt;p&gt;% java -cp clojure.jar:path/to/resource -Dfile.encoding=UTF-8 clojure.main&lt;br/&gt;
user=&amp;gt; (require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.java.io :as io&amp;#93;&lt;/span&gt;)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (io/resource &quot;abc&#237;d/foo.txt&quot;)&lt;br/&gt;
#&amp;lt;URL &lt;a href=&quot;file:/Users/jafinger/clj/clj-ns-browser/resource/abc%c3%add/foo.txt&quot;&gt;file:/Users/jafinger/clj/clj-ns-browser/resource/abc%c3%add/foo.txt&lt;/a&gt;&amp;gt;&lt;br/&gt;
user=&amp;gt; (slurp (io/resource &quot;abc&#237;d/foo.txt&quot;))&lt;br/&gt;
&quot;The quick brown fox jumped over the l&#225;zy d&#246;g!\n&quot;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11900" name="clj-1177-patch-v1.txt" size="2673" author="jafingerhut" created="Fri, 8 Mar 2013 13:30:05 -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-1169] Add filename and line number to defn parameter declaration error</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1169</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When mistyping parameter list in defn declaration, e.g.&lt;/p&gt;

&lt;p&gt;(defn test&lt;br/&gt;
 (some-error))&lt;/p&gt;

&lt;p&gt;error message shows name of parameter (without quotes), but not function name, filename or line number:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Parameter declaration some-error should be a vector&lt;br/&gt;
        at clojure.core$assert_valid_fdecl.invoke(core.clj:6567)&lt;br/&gt;
        at clojure.core$sigs.invoke(core.clj:220)&lt;br/&gt;
        at clojure.core$defn.doInvoke(core.clj:294)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:467)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:427)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:172)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
        at clojure.lang.Compiler.macroexpand1(Compiler.java:6366)&lt;br/&gt;
        at clojure.lang.Compiler.macroexpand(Compiler.java:6427)&lt;br/&gt;
        at clojure.lang.Compiler.eval(Compiler.java:6495)&lt;br/&gt;
        at clojure.lang.Compiler.load(Compiler.java:6952)&lt;br/&gt;
        at clojure.lang.Compiler.loadFile(Compiler.java:6912)&lt;br/&gt;
        at clojure.main$load_script.invoke(main.clj:283)&lt;br/&gt;
        at clojure.main$init_opt.invoke(main.clj:288)&lt;br/&gt;
        at clojure.main$initialize.invoke(main.clj:316)&lt;br/&gt;
        at clojure.main$null_opt.invoke(main.clj:349)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:427)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:419)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:163)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;/p&gt;
</description>
                <environment>Windows</environment>
            <key id="16024">CLJ-1169</key>
            <summary>Add filename and line number to defn parameter declaration error</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="metaclass">Andrei Kleschinski</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Feb 2013 03:25:06 -0600</created>
                <updated>Sun, 10 Mar 2013 17:58:32 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30642" author="metaclass" created="Fri, 22 Feb 2013 05:39:32 -0600"  >&lt;p&gt;Proposed patch for issue&lt;br/&gt;
Process exceptions in macroexpand1 and wraps them in CompilerException with source,line,column information.&lt;/p&gt;

&lt;p&gt;Also patch adds quotes around invalid symbol name in error message to make them more distinguishable from rest of message.&lt;/p&gt;
</comment>
                    <comment id="30672" author="jafingerhut" created="Fri, 1 Mar 2013 09:32:21 -0600"  >&lt;p&gt;Patch 0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1169&quot; title=&quot;Add filename and line number to defn parameter declaration error&quot;&gt;CLJ-1169&lt;/a&gt;-proposed-patch.patch dated Feb 22 2013 causes several tests to fail.  Run &quot;./antsetup.sh&quot; then &quot;ant&quot; to see which ones (or &quot;mvn package&quot;).&lt;/p&gt;</comment>
                    <comment id="30676" author="metaclass" created="Fri, 1 Mar 2013 10:25:47 -0600"  >&lt;p&gt;Fix for failed unit-tests&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11872" name="0001-CLJ-1169-proposed-patch.patch" size="2504" author="metaclass" created="Fri, 22 Feb 2013 05:39:32 -0600" />
                    <attachment id="11885" name="0002-CLJ-1169-fix-unit-tests.patch" size="3230" author="metaclass" created="Fri, 1 Mar 2013 10:25:47 -0600" />
                    <attachment id="11871" name="defn_error_message.clj" size="34" author="metaclass" created="Fri, 22 Feb 2013 03:25:06 -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-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-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-1004] ArrayChunk implements Seqable</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1004</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve found it helpful to be able to iterate over ArrayChunks.  Implementing Seqable means they can be used by most collections functions.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15485">CLJ-1004</key>
            <summary>ArrayChunk implements Seqable</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="jim.blomo">Jim Blomo</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 May 2012 18:53:55 -0500</created>
                <updated>Mon, 25 Mar 2013 23:10:02 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28636" author="jim.blomo" created="Mon, 28 May 2012 19:55:02 -0500"  >&lt;p&gt;2012-05-28 implements the seq method for vec and vector-of. It uses the array backing ArrayChunk to construct a sequence.  Simple tests are included.&lt;/p&gt;</comment>
                    <comment id="30673" author="stu" created="Fri, 1 Mar 2013 09:44:37 -0600"  >&lt;p&gt;Please add discussion of motivating use cases.&lt;/p&gt;</comment>
                    <comment id="30822" author="jim.blomo" created="Mon, 25 Mar 2013 23:10:02 -0500"  >&lt;p&gt;This was motivated by the desire to implement chunk-sequence-aware functions in Clojure elegantly.  Currently, dealing with ArrayChunks in Clojure is clumsy because few of the functions dealing with collections will work with non-seqables.  This functionality will mostly be used by implementers since end users shouldn&apos;t care if their sequence is chunked or not.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11264" name="arraychunk-seq-10004.diff" size="2946" author="jim.blomo" created="Mon, 28 May 2012 19:55: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-1026] Mixed end-of-line endings in the source code</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1026</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;While examining some of the Clojure source code, I discovered that some files had mixed line endings, or CRLF line endings on a non-Windows box.  Using &lt;tt&gt;.gitattributes&lt;/tt&gt;, we can correct that so that files have the right endings for the platform that it&apos;s on.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15579">CLJ-1026</key>
            <summary>Mixed end-of-line endings in the source code</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jszakmeister">John Szakmeister</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Jul 2012 14:25:22 -0500</created>
                <updated>Sat, 30 Mar 2013 08:44:15 -0500</updated>
                                                                            <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28990" author="jszakmeister" created="Tue, 17 Jul 2012 14:26:39 -0500"  >&lt;p&gt;Patch to fix line endings and introduce .gitattributes.&lt;/p&gt;</comment>
                    <comment id="29011" author="stu" created="Fri, 20 Jul 2012 16:47:34 -0500"  >&lt;p&gt;This looks like a change to every line in the world, which makes it hard to vet. Also: will it render incompatible all other outstanding patches at the time it is applied?&lt;/p&gt;</comment>
                    <comment id="29019" author="jszakmeister" created="Sat, 21 Jul 2012 06:52:36 -0500"  >&lt;p&gt;You can use &lt;tt&gt;git diff -w $(git merge-base HEAD master)&lt;/tt&gt; to see the actual diff minus the line ending change.  Here it is inline:&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;:: git diff -w $(git merge-base HEAD master)
diff --git a/.gitattributes b/.gitattributes
&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; file mode 100644
index 0000000..7b89cfa
--- /dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
+++ b/.gitattributes
@@ -0,0 +1,6 @@
+*.txt           text
+*.clj           text
+*.html          text
+*.js            text
+*.css           text
+*.java          text diff=java&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also, no, it won&apos;t render all the outstanding patches incompatible.  For one, it seems like the files that have the eols mixed or in CRLF aren&apos;t touched much.  I also went through the majority of outstanding patches and couldn&apos;t fix one that conflicts.  Secondly, &lt;tt&gt;format-patch&lt;/tt&gt; emits the patch inline and is intended to be sent via email.  SMTP says that all lines must end with CRLF, so line endings are effectively lost.  So git will convert it to the right line ending on application.&lt;/p&gt;

&lt;p&gt;It can conflict with any outstanding &lt;b&gt;branches&lt;/b&gt; that you may have.  Supplying the renormalization option on merge can help:&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;git merge -X renormalize &amp;lt;branch-name&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or, you can enable this by default for your repository:&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;git config --local merge.renormalize &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you think it&apos;s too much trouble, let&apos;s just drop it though.&lt;/p&gt;</comment>
                    <comment id="29104" author="stu" created="Fri, 10 Aug 2012 13:15:58 -0500"  >&lt;p&gt;Patch does not apply on my working copy of Clojure. I am using&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;git am -s ...
/Users/stu/repos/clojure/.git/rebase-apply/patch:344: trailing whitespace.
  p {  	
/Users/stu/repos/clojure/.git/rebase-apply/patch:350: space before tab in indent.
  	margin-left: 0.5in;
error: patch failed: epl-v10.html:1
error: epl-v10.html: patch does not apply
error: patch failed: src/jvm/clojure/asm/AnnotationVisitor.java:1
error: src/jvm/clojure/asm/AnnotationVisitor.java: patch does not apply
error: patch failed: src/jvm/clojure/asm/AnnotationWriter.java:1
error: src/jvm/clojure/asm/AnnotationWriter.java: patch does not apply
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am willing to do this, just inept. &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="29105" author="jafingerhut" created="Fri, 10 Aug 2012 13:21:40 -0500"  >&lt;p&gt;Stuart, I updated 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; a while back when I had trouble applying some patches involving files with carriage return line endings.  I did some Googling on git docs and found the option &apos;--keep-cr&apos; that seems to help in such cases.  Try that out.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11384" name="0001-Introduce-end-of-line-normalization.patch" size="1078968" author="jszakmeister" created="Tue, 17 Jul 2012 14:26:39 -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-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-1191] Improve apropos to show some indication of namespace of symbols found</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1191</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;apropos does find all symbols in all namespaces that match the argument, but the return value gives no clue as to which namespace the found symbols are in.  It can even return multiple occurrences of the same symbol, which only gives a clue that the symbol exists in more than one namespace, but not which ones.  For example:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (apropos &quot;replace&quot;)&lt;br/&gt;
(postwalk-replace prewalk-replace replace re-quote-replacement replace replace-first)&lt;/p&gt;

&lt;p&gt;It would be nice if the returned symbols could indicate the namespace, either always, or if the found symbol is not in the current namespace.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16128">CLJ-1191</key>
            <summary>Improve apropos to show some indication of namespace of symbols 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="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Apr 2013 19:52:30 -0500</created>
                <updated>Fri, 5 Apr 2013 13:34:10 -0500</updated>
                                    <version>Release 1.5</version>
                <version>Release 1.6</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30876" author="jafingerhut" created="Thu, 4 Apr 2013 20:25:56 -0500"  >&lt;p&gt;Path clj-1191-patch-v1.txt enhances apropos to put a namespace/ qualifier before every symbol found that is not in the current namespace &lt;b&gt;ns&lt;/b&gt;.  It also finds the shortest namespace alias if there is more than one.  Examples of output with patch:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (apropos &quot;replace&quot;)&lt;br/&gt;
(replace clojure.string/re-quote-replacement clojure.string/replace clojure.string/replace-first clojure.walk/postwalk-replace clojure.walk/prewalk-replace)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (require &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.string :as str&amp;#93;&lt;/span&gt;)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (apropos &quot;replace&quot;)&lt;br/&gt;
(replace clojure.walk/postwalk-replace clojure.walk/prewalk-replace str/re-quote-replacement str/replace str/replace-first)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (in-ns &apos;clojure.string)&lt;br/&gt;
#&amp;lt;Namespace clojure.string&amp;gt;&lt;br/&gt;
clojure.string=&amp;gt; (clojure.repl/apropos &quot;replace&quot;)&lt;br/&gt;
(re-quote-replacement replace replace-by replace-first replace-first-by replace-first-char replace-first-str clojure.core/replace clojure.walk/postwalk-replace clojure.walk/prewalk-replace)&lt;/p&gt;</comment>
                    <comment id="30879" author="trptcolin" created="Fri, 5 Apr 2013 13:34:10 -0500"  >&lt;p&gt;+1 &lt;/p&gt;

&lt;p&gt;apropos as it already stands is quite helpful for already-referred vars, but not for vars that are only in other nses.&lt;/p&gt;

&lt;p&gt;This update includes the information someone would need to further investigate the output.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11942" name="clj-1191-patch-v1.txt" size="2704" author="jafingerhut" created="Thu, 4 Apr 2013 20:25:56 -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-976] Implement reader literal and print support for PersistentQueue data structure</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-976</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure&apos;s PersistentQueue structure has been in the language for quite some time now and has found its way into a fair share of codebases. However, the creation of queues is a two step operation often of the form:&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;(conj clojure.lang.PersistentQueue/EMPTY :a :b :c)

;=&amp;gt; #&amp;lt;PersistentQueue clojure.lang.PersistentQueue@78d5f6bc&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A better experience might be the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;#queue [:a :b :c]

;=&amp;gt; #queue [:a :b :c]

(pop #queue [:a :b :c])

;=&amp;gt; #queue [:b :c]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This syntax is proposed and discussed in the Clojure-dev group at &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/GQqus5Wycno&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/GQqus5Wycno&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open question: Should the queue literal&apos;s arguments eval?  The implications of this are illustrated 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;;; non-eval case
#queue [1 2 (+ 1 2)]

;=&amp;gt; #queue [1 2 (+ 1 2)]


;; eval case
#queue [1 2 (+ 1 2)]

;=&amp;gt; #queue [1 2 3]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The answer to this open question will determine the implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15370">CLJ-976</key>
            <summary>Implement reader literal and print support for PersistentQueue data structure</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="fogus">Fogus</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                        <label>data-structures</label>
                        <label>queue</label>
                        <label>reader</label>
                        <label>tagged-literals</label>
                    </labels>
                <created>Fri, 27 Apr 2012 09:31:36 -0500</created>
                <updated>Sat, 6 Apr 2013 08:07:20 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="28290" author="steveminer@gmail.com" created="Fri, 27 Apr 2012 10:18:19 -0500"  >&lt;p&gt;I think the non-eval behavior would be consistent with the other reader literals in Clojure 1.4.  It&apos;s definitely better for interop where some other language implementation could be expected to handle a few literal representations, but not the evaluation of Clojure expressions.  Use a regular function if the args need evaluation.&lt;/p&gt;</comment>
                    <comment id="28291" author="cemerick" created="Fri, 27 Apr 2012 10:19:50 -0500"  >&lt;p&gt;The precedent of records seems relevant:&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; (defrecord A [b])
user.A
=&amp;gt; #user.A[(+ 4 5)]
#user.A{:b (+ 4 5)}
=&amp;gt; #user.A{:b (+ 4 5)}
#user.A{:b (+ 4 5)}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This continues to make sense, as otherwise queues would need to print with an extra &lt;tt&gt;(quote &#8230;)&lt;/tt&gt; form around lists &#8212; which records neatly avoid:&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; (A. &apos;(+ 4 5))
#user.A{:b (+ 4 5)}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Does this mean that a &lt;tt&gt;queue&lt;/tt&gt; fn (analogous to &lt;tt&gt;vector&lt;/tt&gt;, maybe) will also make an appearance?  It&apos;d be handy for HOF usage.&lt;/p&gt;</comment>
                    <comment id="28293" author="fogus" created="Fri, 27 Apr 2012 11:00:12 -0500"  >&lt;p&gt;Added a patch for the tagged literal support ONLY. This is only one part of the total solution. This provides the read-string and printing capability. I&apos;d like more discussion around the eval side before I get dive into the compiler.&lt;/p&gt;</comment>
                    <comment id="28298" author="pmbauer" created="Fri, 27 Apr 2012 18:45:48 -0500"  >&lt;p&gt;In addition to Chas&apos; observations on consistency with record literals, would eval in queue literals open up the same security hole as #=, needing to respect *&lt;b&gt;read-eval&lt;/b&gt;*?&lt;br/&gt;
When needing eval inside a queue literal, embedding a #= seems more apropos.&lt;/p&gt;</comment>
                    <comment id="28385" author="fogus" created="Fri, 4 May 2012 13:14:29 -0500"  >&lt;p&gt;Evalable queue literal support.&lt;/p&gt;</comment>
                    <comment id="28430" author="jafingerhut" created="Thu, 10 May 2012 17:54:13 -0500"  >&lt;p&gt;Neither of the patches &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-tagged-parse-support-only.diff dated Apr 27, 2012 nor &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval.diff dated May 4, 2012 apply cleanly to latest master as of May 10, 2012.&lt;/p&gt;</comment>
                    <comment id="28454" author="fogus" created="Fri, 11 May 2012 10:15:35 -0500"  >&lt;p&gt;Updated patch file to merge with latest master.&lt;/p&gt;</comment>
                    <comment id="29008" author="fogus" created="Fri, 20 Jul 2012 13:14:37 -0500"  >&lt;p&gt;New patch with support fixed for syntax-quote.&lt;/p&gt;</comment>
                    <comment id="29212" author="stuart.sierra" created="Fri, 17 Aug 2012 12:41:10 -0500"  >&lt;p&gt;Patch does not apply as of commit f5f4faf95051f794c9bfa0315e4457b600c84cef&lt;/p&gt;</comment>
                    <comment id="29214" author="fogus" created="Fri, 17 Aug 2012 15:06:18 -0500"  >&lt;p&gt;Weird. I was able to download the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff patch and apply it to HEAD as of just now (f5f4faf95051f794c9bfa0315e4457b600c84cef). There were whitespace warnings, but the patch applied, compiles and passes all tests.&lt;/p&gt;
</comment>
                    <comment id="29217" author="jafingerhut" created="Fri, 17 Aug 2012 19:29:01 -0500"  >&lt;p&gt;With latest head I was able to successfully apply patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff with this command:&lt;/p&gt;

&lt;p&gt;git am --keep-cr -s &amp;lt; &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff&lt;/p&gt;

&lt;p&gt;with some warnings, but successfully applied.  If I try it without the --keep-cr option, the patch fails to apply.  I believe this is often a sign that either one of the files being patched, or the patch itself, contains CR/LF line endings, which some of the Clojure source files definitely do.&lt;/p&gt;

&lt;p&gt;The command above (with --keep-cr) is currently the one recommended for applying patches on 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; in section &quot;Screening Tickets&quot;.  I added the suggested --keep-cr option after running across another patch that applied with the option, but not without it.&lt;/p&gt;
</comment>
                    <comment id="29281" author="jafingerhut" created="Tue, 28 Aug 2012 17:45:26 -0500"  >&lt;p&gt;Presumptuously changing Approval from Incomplete back to Test, since the latest patch does apply cleanly if --keep-cr option is used.&lt;/p&gt;</comment>
                    <comment id="29408" author="richhickey" created="Sat, 8 Sep 2012 06:48:32 -0500"  >&lt;p&gt;this needs more time&lt;/p&gt;</comment>
                    <comment id="29480" author="fogus" created="Tue, 18 Sep 2012 08:15:58 -0500"  >&lt;p&gt;Rich, &lt;/p&gt;

&lt;p&gt;Do you mind providing a little more detail?  I would be happy to make any changes if needed. However, if it&apos;s just a matter of its relationship to EDN and/or waiting until the next release then I am happy to wait.  In either case, I&apos;d like to complete this or push it to the back of my mind. Thanks.&lt;/p&gt;</comment>
                    <comment id="29602" author="jafingerhut" created="Fri, 5 Oct 2012 07:49:12 -0500"  >&lt;p&gt;clj-976-queue-literal-eval-and-synquote-patch-v2.txt dated Oct 5 2012 is identical to Fogus&apos;s patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff dated Jul 20 2012.  It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="29665" author="jafingerhut" created="Tue, 16 Oct 2012 12:20:27 -0500"  >&lt;p&gt;clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated oct 16 2012 is identical to Fogus&apos;s patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt;-queue-literal-eval-and-synquote.diff dated Jul 20 2012. It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="29730" author="jafingerhut" created="Sat, 20 Oct 2012 12:26:05 -0500"  >&lt;p&gt;Fogus, with the recent commit of a 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;, my touched-up patch clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated Oct 16 2012 doesn&apos;t apply cleanly.  In this case it isn&apos;t simply a few lines of context that have changed, it is the interfaces that PersistentQueue implements have been changed.  It might be best if you take a look at the latest code and the patch and consider how it should be updated.&lt;/p&gt;</comment>
                    <comment id="30884" author="steveminer@gmail.com" created="Sat, 6 Apr 2013 08:07:20 -0500"  >&lt;p&gt;Related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1078&quot; title=&quot;Added queue, queue* and queue? to clojure.core&quot;&gt;CLJ-1078&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11392" name="CLJ-976-queue-literal-eval-and-synquote.diff" size="15932" author="fogus" created="Fri, 20 Jul 2012 13:14:37 -0500" />
                    <attachment id="11566" name="clj-976-queue-literal-eval-and-synquote-patch-v3.txt" size="15688" author="jafingerhut" created="Tue, 16 Oct 2012 12:20:26 -0500" />
                    <attachment id="11200" name="CLJ-976-queue-literal-eval.diff" size="13229" author="fogus" created="Fri, 11 May 2012 10:15:35 -0500" />
                </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>
                                            <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-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-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-1185] `reductions should respect `reduced</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1185</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This returns 16:&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;(reduce (fn [acc x]
          (let [x&apos; (* x x)]
            (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&amp;gt; x&apos; 10)
              (reduced x&apos;)
              x&apos;)))
        (range))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But replacing `reduce with `reductions will never terminate:&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;(reductions (fn [acc x]
              (let [x&apos; (* x x)]
                (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&amp;gt; x&apos; 10)
                  (reduced x&apos;)
                  x&apos;)))
            (range))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because `reductions ignores &apos;clojure.lang.Reduced, it never tests for `reduced?&lt;/p&gt;

&lt;p&gt;I know that I only just discovered the `reduced, function, but `reductions is a big part of my debugging process, so it&apos;s unfortunate that they don&apos;t work together.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16094">CLJ-1185</key>
            <summary>`reductions should respect `reduced</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="bbloom">Brandon Bloom</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Mar 2013 18:09:34 -0500</created>
                <updated>Wed, 10 Apr 2013 17:08:45 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30775" author="bbloom" created="Sat, 16 Mar 2013 18:10:44 -0500"  >&lt;p&gt;Attaching patch&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11921" name="CLJ-1181-v001.patch" size="1024" author="bbloom" created="Sat, 16 Mar 2013 18:10: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="10001">Code</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-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-1036] Util/hasheq should be hashing a BigInteger to the same values as Long, and BigInt</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1036</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The doc string for &lt;tt&gt;hash&lt;/tt&gt; states that it defines a hash code function that is consistent with &lt;tt&gt;=&lt;/tt&gt;, but for java.math.BigInteger &lt;tt&gt;hash&lt;/tt&gt; is not consistent with &lt;tt&gt;=&lt;/tt&gt;.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (apply = [(Long. -1) -1N (biginteger -1)])
true
user=&amp;gt; (map hash [(Long. -1) -1N (biginteger -1)])
(0 0 -1)
user=&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It is possible to have a PHM with two key/value pairs where the keys are equal, and the hash codes are different:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (biginteger -1) :oops! -1N :one)
{-1N :one, -1 :oops!}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The expected behavior is the same as PersistentArrayMap, which does not have this issue, because it does not hash its keys:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (assoc clojure.lang.PersistentArrayMap/EMPTY (biginteger -1) :oops! -1N :one)
{-1 :one}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This same misbehavior also occurs for Doubles and Floats:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;thalia.core=&amp;gt; (apply = [(Float. 1e9) (Double. 1e9)])
true
thalia.core=&amp;gt; (map hash [(Float. 1e9) (Double. 1e9)])
(1315859240 1104006501)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

&lt;p&gt;The rationale for the changes to hasheq for Float and Double types is the same as the rationale for the change for BigInteger: without that change, Float and Double types that are = can have different hasheq values.&lt;/p&gt;</comment>
                    <comment id="29939" author="pjstadig" created="Wed, 14 Nov 2012 05:18:58 -0600"  >&lt;p&gt;Although you are correct that Double and Float are &lt;tt&gt;=&lt;/tt&gt;, but have different hashes:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (apply = [(Double. -1.0) (Float. -1.0)])
true
user=&amp;gt; (map hash [(Double. -1.0) (Float. -1.0)])
(-1074790400 -1082130432)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I could not get the same errant behavior out of PHM:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (assoc clojure.lang.PersistentHashMap/EMPTY (Float. -1.0) :oops! (Double. -1.0) :one)
{-1.0 :one}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-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-1182] Regexp are never equal</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1182</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following (= #&quot;asd&quot; #&quot;asd&quot;) will return false in CLJ, even if they are the same.&lt;/p&gt;

&lt;p&gt;Consequently, everything with a regexp in it (lists, vectors, maps...) will never be equal.&lt;/p&gt;

&lt;p&gt;It seems to have been fixed for CLJS, but not for CLJ.&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/clojurescript/commit/e35c3a57472fa62ae41591418a73794dc8ac6dde&quot;&gt;https://github.com/clojure/clojurescript/commit/e35c3a57472fa62ae41591418a73794dc8ac6dde&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16083">CLJ-1182</key>
            <summary>Regexp are never equal</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="olenhad">Omer Iqbal</assignee>
                                <reporter username="frozenlock">Christian Fortin</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Tue, 12 Mar 2013 13:28:59 -0500</created>
                <updated>Sat, 13 Apr 2013 21:13:52 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="30746" author="olenhad" created="Tue, 12 Mar 2013 16:08:55 -0500"  >&lt;p&gt;added an implementation for the equiv method if both args are java.util.regex.Pattern&lt;/p&gt;</comment>
                    <comment id="30749" author="jafingerhut" created="Tue, 12 Mar 2013 17:54:40 -0500"  >&lt;p&gt;Omer, could you also include in your patch a few test cases?  At least one that validates that two regex&apos;s that should be equal, are equal, and another that two regex&apos;s that should be different, are non-equal.  Preferably the first of those tests should fail with the existing Clojure code, and pass with your changes.&lt;/p&gt;</comment>
                    <comment id="30754" author="olenhad" created="Wed, 13 Mar 2013 05:39:13 -0500"  >&lt;p&gt;I updated the patch with some tests. Hope I added them in the correct file. I also changed the implementation a bit, by instead of adding another implementation of equiv with a different signature, checking the type of the Object in the equiv method with signature (Object k1, Object k2).&lt;br/&gt;
For the sake of consistency I also added an EquivPred implementation, though I&apos;m not entirely sure when its used.&lt;/p&gt;</comment>
                    <comment id="30757" author="jafingerhut" created="Wed, 13 Mar 2013 13:04:58 -0500"  >&lt;p&gt;All comments here refer to the patch named fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1182&quot; title=&quot;Regexp are never equal&quot;&gt;CLJ-1182&lt;/a&gt;.diff dated Mar 13, 2013.&lt;/p&gt;

&lt;p&gt;The location for the new tests looks reasonable.  However, note that your new patch has your old changes plus some new ones, not just the new ones.  In particular, the new signature for equiv is still in your latest patch.  You should start from a clean pull of the latest Clojure master and make only the changes you want when creating a patch, not build on top of previous changes you have made.&lt;/p&gt;

&lt;p&gt;Also, there are several whitespace-only changes in your patch that should not be included.&lt;/p&gt;</comment>
                    <comment id="30758" author="olenhad" created="Wed, 13 Mar 2013 13:39:09 -0500"  >&lt;p&gt;I uploaded a clean patch, removing the whitespace diff and only adding the latest changes. Thanks for clarifying the workflow!&lt;br/&gt;
Just to clarify, this refers to the patch named fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1182&quot; title=&quot;Regexp are never equal&quot;&gt;CLJ-1182&lt;/a&gt;.diff dated Mar 13 1:34 PM&lt;/p&gt;</comment>
                    <comment id="30835" author="stu" created="Fri, 29 Mar 2013 05:46:25 -0500"  >&lt;p&gt;I am recategorizing this as an enhancement, because if this is a bug it is a bug in Java &amp;#8211; the Java Patterns class documents being immutable, but apparently does not implement .equals.&lt;/p&gt;

&lt;p&gt;Other recent &quot;make Clojure more complicated to work around problems in Java&quot; patches have been rejected, and I suspect this one will be too, because it might impact the performance of equality everywhere.&lt;/p&gt;</comment>
                    <comment id="30940" author="stu" created="Fri, 12 Apr 2013 09:04:57 -0500"  >&lt;p&gt;At first pass, Rich and I both believe that, as regex equality is undecidable, that Java made the right choice in using identity for equality, that this ticket should be declined, and the ClojureScript should revert to match.&lt;/p&gt;

&lt;p&gt;But leaving this ticket open for now so that ClojureScript dev can weigh in.&lt;/p&gt;</comment>
                    <comment id="30941" author="michael-drogalis" created="Fri, 12 Apr 2013 09:32:14 -0500"  >&lt;p&gt;What do you mean when you say &quot;undecidable&quot;?&lt;/p&gt;</comment>
                    <comment id="30942" author="aredington" created="Fri, 12 Apr 2013 10:03:45 -0500"  >&lt;p&gt;If Regex instances were interned by the reader, but still used identity for equality, then code like&lt;/p&gt;

&lt;p&gt;(= #&quot;abc&quot; #&quot;abc&quot;)&lt;/p&gt;

&lt;p&gt;would return true, but it wouldn&apos;t diverge in the definition of equality for regular expressions between Java and Clojure.&lt;/p&gt;</comment>
                    <comment id="30943" author="fogus" created="Fri, 12 Apr 2013 10:13:02 -0500"  >&lt;p&gt;Undecidable means that for any given regular expression, there is no single way to write it.  For example #&quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;a&amp;#93;&lt;/span&gt;&quot; #&quot;a&quot; both match the same strings, but are they the same?  Maybe.  But how can we decide if /any/ given regular expression matches all of the same strings as any other?  The answer is, you can&apos;t.  Java does provide a Pattern#pattern method that returns the string that was used to build it, but I&apos;m not sure if that could/should be used as a basis for equality given the potential perf hit.&lt;/p&gt;</comment>
                    <comment id="30944" author="bendlas" created="Fri, 12 Apr 2013 10:31:54 -0500"  >&lt;p&gt;I posted in Stu&apos;s thread: &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/OTPNJQbPtds/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/OTPNJQbPtds/discussion&lt;/a&gt;&lt;br/&gt;
TL;DR: Disagree with undecidability, agree with reverting to identity based equality&lt;/p&gt;</comment>
                    <comment id="30945" author="michael-drogalis" created="Fri, 12 Apr 2013 10:32:49 -0500"  >&lt;p&gt;That makes sense to me. Thanks Fogus.&lt;/p&gt;</comment>
                    <comment id="30947" author="bendlas" created="Fri, 12 Apr 2013 21:42:19 -0500"  >&lt;p&gt;From my post to the ml thread, it might not be entirely clear, why I don&apos;t think we should implement equality for host regexes:&lt;/p&gt;

&lt;p&gt;It would involve parsing and would leave a lot of room for errors and platform-idiosycracies to leak. And it would be different for every platform.&lt;/p&gt;

&lt;p&gt;As Alexander said, I also think this ticket could be resolved by interning regex literals, akin to keywords. That, however, would warrant a design page first, because there are tradeoffs to be made about how far the interning should go.&lt;/p&gt;</comment>
                    <comment id="30948" author="richhickey" created="Sat, 13 Apr 2013 08:51:17 -0500"  >&lt;p&gt;Why are we spending time on this? Where is the problem statement? Does someone actually need this for a real world purpose not solved by using regex strings as keys?&lt;/p&gt;</comment>
                    <comment id="30957" author="michael-drogalis" created="Sat, 13 Apr 2013 21:13:52 -0500"  >&lt;p&gt;It was prompted as a matter of consistency, which I think is valid. I can&apos;t think of a good reason to use regex&apos;s as keys though.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11913" name="fix-CLJ-1182.diff" size="2628" author="olenhad" created="Wed, 13 Mar 2013 13:34:11 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10120">Triaged</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-1204] hash is inconsistent with = for many BigInteger values</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1204</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The function &lt;tt&gt;hash&lt;/tt&gt; is documented to be consistent with &lt;tt&gt;=&lt;/tt&gt;.  For many BigInteger values, &lt;tt&gt;hash&lt;/tt&gt; is inconsistent with &lt;tt&gt;=&lt;/tt&gt;.  This leads to incorrect behavior for data structures like hash maps that use &lt;tt&gt;hash&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 = [-1 -1N (biginteger -1)])
true
user&amp;gt; (map hash [-1 -1N (biginteger -1)])
(0 0 -1)

;; Incorrect return value with multiple keys = to each other
user&amp;gt; (assoc (hash-map -1N :should-be-replaced) (biginteger -1) :new-val)
{-1N :should-be-replaced, -1 :new-val}

;; array-map gives correct value, since it uses =, not hash
user&amp;gt; (assoc (array-map -1N :should-be-replaced) (biginteger -1) :new-val)
{-1N :new-val}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="16150">CLJ-1204</key>
            <summary>hash is inconsistent with = for many BigInteger values</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>Thu, 18 Apr 2013 19:54:05 -0500</created>
                <updated>Thu, 25 Apr 2013 18:42:40 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30971" author="jafingerhut" created="Thu, 18 Apr 2013 20:10:38 -0500"  >&lt;p&gt;Patch clj-1204-make-hash-consistent-with-equal-for-bigintegers-v1.txt dated Apr 18 2013 takes the following approach to the issue:&lt;/p&gt;

&lt;p&gt;Change the behavior of hasheq so that when given a BigInteger value that could fit into a long, returns the same hash code as that long value.&lt;/p&gt;

&lt;p&gt;hasheq continues to return x.hashCode() if the BigInteger value does not fit into a long.  This is consistent with the hash value returned by a BigInt value that does not fit into a long.&lt;/p&gt;

&lt;p&gt;New tests are included, some of which fail without the change to hasheq, but pass with the change.&lt;/p&gt;</comment>
                    <comment id="30973" author="jafingerhut" created="Thu, 18 Apr 2013 20:19:54 -0500"  >&lt;p&gt;Overwrite patch with one that leaves out some unnecessary code.&lt;/p&gt;</comment>
                    <comment id="31002" author="jafingerhut" created="Thu, 25 Apr 2013 18:42:40 -0500"  >&lt;p&gt;Changing priority to minor, since I suppose one could work around this issue, if you were diligent about it, by converting all BigIntegers to BigInts before they are ever used in a place where they are hashed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11964" name="clj-1204-make-hash-consistent-with-equal-for-bigintegers-v1.txt" size="2173" author="jafingerhut" created="Thu, 18 Apr 2013 20:19:54 -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-1118] inconsistent numeric comparison semantics between BigDecimal and other Numerics</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1118</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user&amp;gt; &lt;b&gt;clojure-version&lt;/b&gt;&lt;br/&gt;
{:major 1, :minor 5, :incremental 0, :qualifier &quot;beta1&quot;}&lt;br/&gt;
user&amp;gt; (== 2.0 2.0M)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2 2.0M)&lt;br/&gt;
false                  &amp;lt;-- this one is not like the others&lt;br/&gt;
user&amp;gt; (== 2 2.0)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2N 2.0)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (== 2 (double 2.0M))&lt;br/&gt;
true&lt;/p&gt;


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

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

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

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

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

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

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

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

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

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

&lt;p&gt;By changing == behavior for BigDecimal by modifying the BigDecimalOps.equiv() method, that also changes the behavior of = when comparing BigDecimal values to other numbers.  hash should be consistent with =, so now hash should return same value for all numerically equal BigDecimal values.  This patch should achieve that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11960" name="clj-1118-make-double-equals-true-for-more-bigdecimals-patch-v3.txt" size="4136" author="jafingerhut" created="Mon, 15 Apr 2013 21:07:44 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-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>3</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-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-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-1209] Teach clojure.test reporting about ex-info/ex-data</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1209</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When clojure.test/deftest does error reports on unexpected exceptions it currently ignores ExceptionInfo and the valuable ex-data it carries. So this patch simple prints this data, it might be helpful to pprint or format it in another way but this was good enough for me.&lt;/p&gt;

&lt;p&gt;See example from my tests: &lt;a href=&quot;https://gist.github.com/thheller/5559391&quot;&gt;https://gist.github.com/thheller/5559391&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="16182">CLJ-1209</key>
            <summary>Teach clojure.test reporting about ex-info/ex-data</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="thheller">Thomas Heller</reporter>
                        <labels>
                    </labels>
                <created>Sat, 11 May 2013 04:12:35 -0500</created>
                <updated>Sat, 11 May 2013 04:12:35 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11989" name="clj-test-print-ex-data.diff" size="1313" author="thheller" created="Sat, 11 May 2013 04:12:35 -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-1117] Partition does not follow docs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1117</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The doc for partition states &quot;In case there are not enough padding elements, return a partition with less than n items.&quot;&lt;/p&gt;

&lt;p&gt;However, the behavior of this function is as follows:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (partition 3 (range 10))&lt;br/&gt;
((0 1 2) (3 4 5) (6 7 8))&lt;br/&gt;
user=&amp;gt; (partition 4 (range 10))&lt;br/&gt;
((0 1 2 3) (4 5 6 7))&lt;br/&gt;
user=&amp;gt; (partition 5 (range 10))&lt;br/&gt;
((0 1 2 3 4) (5 6 7 8 9))&lt;/p&gt;

&lt;p&gt;Either the doc should be updated to make it clear that not providing a pad will mean that items are dropped, or the functionality of partition should be fixed to the following:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (partition 3 (range 10))&lt;br/&gt;
((0 1 2) (3 4 5) (6 7 8) (9))&lt;/p&gt;</description>
                <environment>OS X, 10.8</environment>
            <key id="15864">CLJ-1117</key>
            <summary>Partition does not follow docs</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="halgari">Timothy Baldridge</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Nov 2012 13:28:02 -0600</created>
                <updated>Fri, 17 May 2013 10:14:56 -0500</updated>
                                    <version>Release 1.6</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30091" author="jafingerhut" created="Thu, 29 Nov 2012 14:15:09 -0600"  >&lt;p&gt;That would be a potentially breaking change for some people&apos;s code that uses partition.  partition-all behaves as you wish.&lt;/p&gt;

&lt;p&gt;Also, your concern with the documentation is for when there are padding elements specified as an argument, but your examples don&apos;t specify any padding elements.&lt;/p&gt;</comment>
                    <comment id="30094" author="halgari" created="Thu, 29 Nov 2012 14:55:11 -0600"  >&lt;p&gt;I agree, but I think the docs should then explicitly state: &quot;if no padding is given, not all input elements may be returned in the output partitions&quot; or something to that line. &lt;/p&gt;</comment>
                    <comment id="30101" author="jafingerhut" created="Thu, 29 Nov 2012 16:43:22 -0600"  >&lt;p&gt;More precise documentation of current behavior is always welcome in my opinion.&lt;/p&gt;</comment>
                    <comment id="31099" author="cldwalker" created="Fri, 17 May 2013 10:14:56 -0500"  >&lt;p&gt;I&apos;ve uploaded a patch that calls out when and how partition drops tail elements:&lt;br/&gt;
&quot;If a pad collection is not supplied, any tail elements that remain from dividing the input collection length by n will not be included in a partition.&quot;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11994" name="clj-1117.patch" size="1392" author="cldwalker" created="Fri, 17 May 2013 10:14:56 -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-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, 24 May 2013 08:24:38 -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="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-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="stu">Stuart Halloway</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Dec 2012 20:28:37 -0600</created>
                <updated>Fri, 24 May 2013 08:48:42 -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="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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-944] compiler makes different concrete maps then the reader</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-944</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I (Stu) agree with Nicola&apos;s assessment in the comments: the single real problem here is that the compiler&apos;s MapExpr parser emits maps differently from other map-makers, e.g. RT&apos;s factory functions. &lt;/p&gt;

&lt;p&gt;Patch clj944-plus-tests does three things:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;has the compiler emit map types consistent with the reader (like the previous &quot;0002&quot; patch)&lt;/li&gt;
	&lt;li&gt;adds tests&lt;/li&gt;
	&lt;li&gt;removes broken tests&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Original report follows:&lt;/p&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>compiler makes different concrete maps then the reader</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>Fri, 24 May 2013 09:03:46 -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;compiler makes different concrete maps then the reader&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;compiler makes different concrete maps then the reader&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="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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1187] Clojure loses quoted metadata 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 metadata 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, 24 May 2013 09:14:44 -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 metadata 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>
                    <comment id="31139" author="cldwalker" created="Fri, 24 May 2013 09:14:44 -0500"  >&lt;p&gt;Looks good&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="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="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>Fri, 24 May 2013 09:42:41 -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>
                    <comment id="31140" author="cldwalker" created="Fri, 24 May 2013 09:42:41 -0500"  >&lt;p&gt;Looks good&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="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-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;Summary: Delays get into a corrupt state if an exception thrown, allowing deref to behave differently on back-to-back calls.  Patch causes Delay to rethrow the original exception, includes tests.&lt;/p&gt;

&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;</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="stu">Stuart Halloway</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Mar 2013 15:06:15 -0600</created>
                <updated>Fri, 24 May 2013 11:02:21 -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="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="10002">Code and Test</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;Summary: patch leaves version.properties file out of sources JAR, where it causes problems for tools.&lt;/p&gt;

&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="stu">Stuart Halloway</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, 24 May 2013 11:13:59 -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="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-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;h2&gt;&lt;a name=&quot;Patches&quot;&gt;&lt;/a&gt;Patches&lt;/h2&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Stu&amp;#93;&lt;/span&gt; All three patches should be applied IMO.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;0002 makes &lt;tt&gt;instance?&lt;/tt&gt; respect lexical bindings&lt;/li&gt;
	&lt;li&gt;0003 makes &lt;tt&gt;instance?&lt;/tt&gt;&apos;s compiled form check arity, consistent with higher-order behavior&lt;/li&gt;
	&lt;li&gt;0001 has a minimal test for both 0002 and 0003.&lt;/li&gt;
&lt;/ul&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="stu">Stuart Halloway</assignee>
                                <reporter username="bendlas">Herwig Hochleitner</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Feb 2013 13:21:16 -0600</created>
                <updated>Fri, 24 May 2013 11:29:14 -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="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="10002">Code and Test</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, 24 May 2013 11:46:12 -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="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="10002">Code and Test</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;Summary: The &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 patch is constructed per Rich&apos;s feedback, and appears good to me &lt;span class=&quot;error&quot;&gt;&amp;#91;Stu&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&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="stu">Stuart Halloway</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Oct 2011 15:10:53 -0500</created>
                <updated>Fri, 24 May 2013 12:12:20 -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="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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1107] &apos;get&apos; should throw exception on non-Associative argument</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1107</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The implementation of clojure.core/get returns null if its argument is not a valid associative collection. However, calling &apos;get&apos; on something which is neither nil nor an Associative collection is almost certainly a bug, and should be indicated by an exception.&lt;/p&gt;

&lt;p&gt;This behavior can obscure common programmer errors such as:&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 a (atom {:a 1 :b 2})

(:foo a)   ; forgot to deref a
;;=&amp;gt; nil&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-932&quot; title=&quot;contains? should throw exception on non-keyed collections&quot;&gt;&lt;del&gt;CLJ-932&lt;/del&gt;&lt;/a&gt; was accepted as a similar enhancement to &apos;clojure.core/contains?&apos;&lt;/p&gt;

&lt;p&gt;Attached patch 0001 throws an IllegalArgumentException as the fall-through case of RT.getFrom.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15823">CLJ-1107</key>
            <summary>&apos;get&apos; should throw exception on non-Associative argument</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="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Nov 2012 13:20:33 -0600</created>
                <updated>Fri, 24 May 2013 12:31:42 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31147" author="jafingerhut" created="Fri, 24 May 2013 12:31:42 -0500"  >&lt;p&gt;Patch clj-1107-throw-on-get-for-unsupported-types-patch-v2.txt dated May 24 2013 is identical to 0001-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1107&quot; title=&quot;&amp;#39;get&amp;#39; should throw exception on non-Associative argument&quot;&gt;CLJ-1107&lt;/a&gt;-Throw-exception-for-get-called-on-unsupport.patch dated Nov 13 2012, except it applies cleanly to latest master.  A recent commit for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1099&quot; title=&quot;better error message when passing non-seq to seq&quot;&gt;&lt;del&gt;CLJ-1099&lt;/del&gt;&lt;/a&gt; changed many IllegalArgumentException occurrences to Throwable in the tests, which is the only thing changed in this updated patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11672" name="0001-CLJ-1107-Throw-exception-for-get-called-on-unsupport.patch" size="3204" author="stuart.sierra" created="Tue, 13 Nov 2012 13:57:31 -0600" />
                    <attachment id="12004" name="clj-1107-throw-on-get-for-unsupported-types-patch-v2.txt" size="3090" author="jafingerhut" created="Fri, 24 May 2013 12:31: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-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, 24 May 2013 12:45:25 -0500</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>
                    <comment id="31149" author="jafingerhut" created="Fri, 24 May 2013 12:45:25 -0500"  >&lt;p&gt;Patch clj-669-use-java.nio-in-do-copy-for-files-patch-v2.txt dated May 24 2013 is identical to patch 0001-use-java.nio-in-do-copy-method-for-Files.patch dated Nov 27 2010 except it applies cleanly to latest master.  The older patch conflicts with a recent commit for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1072&quot; title=&quot;Replace old metadata reader macro syntax&quot;&gt;&lt;del&gt;CLJ-1072&lt;/del&gt;&lt;/a&gt; that updates the obsolete #^ syntax for metadata.&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" />
                    <attachment id="12005" name="clj-669-use-java.nio-in-do-copy-for-files-patch-v2.txt" size="1155" author="jafingerhut" created="Fri, 24 May 2013 12:45: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-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;Summary: still needs decision on implementation approach.&lt;/p&gt;

&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, 24 May 2013 13:25:25 -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>
                    <comment id="31152" author="stu" created="Fri, 24 May 2013 13:25:25 -0500"  >&lt;p&gt;I am marking this incomplete because there does not yet seem to be plurality, much less consensus or unanimity, on approach.&lt;/p&gt;

&lt;p&gt;Personally I am in favor of a solution based on a predicate that gets handed the class name and compiled bits, and then can choose whether to write the class. Pretty close to Stuart Sierra&apos;s compile-write-classes.  Might be possible to flow more information than classname to the predicate.&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="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>cemerick</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1074] Read/print round-trip for +/-Infinity and NaN</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1074</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;A few float-related forms (namely, Double/POSITIVE_INFINITY, Double/NEGATIVE_INFINITY, Double/NaN) are not eval-able after a round-trip via &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;(read-string (binding [*print-dup* &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;] (pr-str f))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;The two options I see are to provide print-method implementations for these and their Float cousins, or to make Infinity, -Infinity, +Infinity, and NaN readable values. Since it sounds like edn may want to provide a spec for these values (see  &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/LeJpOhHxESs/discussion&quot;&gt;https://groups.google.com/d/topic/clojure-dev/LeJpOhHxESs/discussion&lt;/a&gt; and &lt;a href=&quot;https://github.com/edn-format/edn/issues/2&quot;&gt;https://github.com/edn-format/edn/issues/2&lt;/a&gt;), I think making these values directly readable as already printed is preferable. Something like Double/POSITIVE_INFINITY seems too low-level from edn&apos;s perspective, as it would refer to a Java class and constant.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching a patch implementing reader support for Infinity, -Infinity, +Infinity, and NaN.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15714">CLJ-1074</key>
            <summary>Read/print round-trip for +/-Infinity and NaN</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="trptcolin">Colin Jones</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Fri, 21 Sep 2012 19:13:48 -0500</created>
                <updated>Sat, 25 May 2013 12:39:35 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30167" author="halgari" created="Mon, 3 Dec 2012 11:34:16 -0600"  >&lt;p&gt;Please bring this up on clojure-dev. We&apos;ll be able to vet this ticket after that. &lt;/p&gt;
</comment>
                    <comment id="30168" author="trptcolin" created="Mon, 3 Dec 2012 13:18:40 -0600"  >&lt;p&gt;Should I respond to my original clojure-dev post about this (linked in the issue description above), or start a new one?&lt;/p&gt;</comment>
                    <comment id="31150" author="jafingerhut" created="Fri, 24 May 2013 13:11:13 -0500"  >&lt;p&gt;Patch clj-1074-read-infinity-and-nan-patch-v2.txt dated May 24 2013 is identical to 0001-Read-Infinity-and-NaN.patch dated Sep 21 2012, except it applies cleanly to latest master.  The older patch conflicts with a recent commit made for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-873&quot; title=&quot;Allow the function / to be referred to in namespaces other than clojure.core&quot;&gt;CLJ-873&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="31157" author="bronsa" created="Sat, 25 May 2013 11:55:54 -0500"  >&lt;p&gt;clj-1074-read-infinity-and-nan-patch-v2-plus-edn-reader.patch is the same as clj-1074-read-infinity-and-nan-patch-v2.txt except it patches EdnReader too, but it must be applied after #&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-873&quot; title=&quot;Allow the function / to be referred to in namespaces other than clojure.core&quot;&gt;CLJ-873&lt;/a&gt; 0001-Fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-873&quot; title=&quot;Allow the function / to be referred to in namespaces other than clojure.core&quot;&gt;CLJ-873&lt;/a&gt;-for-EdnReader-too.patch get merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11520" name="0001-Read-Infinity-and-NaN.patch" size="1544" author="trptcolin" created="Fri, 21 Sep 2012 19:13:48 -0500" />
                    <attachment id="12010" name="clj-1074-read-infinity-and-nan-patch-v2-plus-edn-reader.patch" size="2429" author="bronsa" created="Sat, 25 May 2013 11:55:54 -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-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="4" iconUrl="http://dev.clojure.org/jira/images/icons/status_reopened.gif">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="chrismgray">Chris Gray</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Nov 2011 09:48:56 -0600</created>
                <updated>Sat, 25 May 2013 14:05:26 -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>
                    <comment id="31138" author="bronsa" created="Fri, 24 May 2013 08:39:11 -0500"  >&lt;p&gt;clojure.lang.EdnReader should get patched aswell.&lt;/p&gt;</comment>
                    <comment id="31156" author="bronsa" created="Sat, 25 May 2013 11:48:21 -0500"  >&lt;p&gt;I&apos;m reopening it, attaching a patch for EdnReader&lt;/p&gt;</comment>
                    <comment id="31158" author="jafingerhut" created="Sat, 25 May 2013 12:37:12 -0500"  >&lt;p&gt;Nicola, I noticed yesterday that LispReader.java still contains values SLASH and CLOJURE_SLASH that are no longer used after the patch was applied yesterday for this ticket.  Would you mind including the removal of those in your patch, too?&lt;/p&gt;</comment>
                    <comment id="31159" author="bronsa" created="Sat, 25 May 2013 14:05:26 -0500"  >&lt;p&gt;Andy, I&apos;ve updated 0001-Fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-873&quot; title=&quot;Allow the function / to be referred to in namespaces other than clojure.core&quot;&gt;CLJ-873&lt;/a&gt;-for-EdnReader-too.patch to remove SLASH and CLOJURE_SLASH as you suggested.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12011" name="0001-Fix-CLJ-873-for-EdnReader-too.patch" size="2494" author="bronsa" created="Sat, 25 May 2013 14:05:26 -0500" />
                    <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="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>Tue, 28 May 2013 11:50:25 -0500</updated>
                                    <version>Backlog</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</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>
                    <comment id="31160" author="gfredericks" created="Sat, 25 May 2013 20:11:40 -0500"  >&lt;p&gt;We could get the same performance characteristics as SubVector by creating a TransientSubVector based on an underlying TransientVector, right?&lt;/p&gt;

&lt;p&gt;Preparing a patch to that effect.&lt;/p&gt;</comment>
                    <comment id="31161" author="gfredericks" created="Sat, 25 May 2013 22:58:13 -0500"  >&lt;p&gt;Text from the commit msg:&lt;/p&gt;

&lt;p&gt;Made two assumptions:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;It&apos;s okay for TransientSubVector to delegate the ensureEditable&lt;br/&gt;
    functionality to the underlying TransientVector (sometimes&lt;br/&gt;
    explicitely, sometimes implicitely) &amp;#8211; calling ensureEditable&lt;br/&gt;
    explicitely also requires that the field for the underlying vector&lt;br/&gt;
    be the concrete TransientVector type rather than the&lt;br/&gt;
    ITransientVector interface.&lt;/li&gt;
	&lt;li&gt;When an operation that would throw an exception on a&lt;br/&gt;
    PersistentVector happens from the wrong thread (or after&lt;br/&gt;
    persistent!), we throw that exception rather than the&lt;br/&gt;
    IllegalAccessError that transients throw when accessed&lt;br/&gt;
    inappropriately.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                    <attachment id="12013" name="CLJ-787-p1.patch" size="5870" author="gfredericks" created="Sat, 25 May 2013 22:58:13 -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-1189] Map-destructuring :or fumble needs compiler warning</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1189</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Here is a map-destructuring blunder that I wish the compiler warned about: &lt;/p&gt;

&lt;p&gt;(defn server&lt;br/&gt;
  [{servlet ::servlet&lt;br/&gt;
    type ::type&lt;br/&gt;
    :or {::type :jetty}&lt;br/&gt;
    :as service-map}]&lt;/p&gt;

&lt;p&gt;It would be splendid to get a warning that :or keys that are not symbols being bound have no effect. &lt;/p&gt;

&lt;p&gt;The incomplete code snippet above comes from Pedestal.service 0.1.0. &lt;/p&gt;

&lt;p&gt;Here is a complete one-line example with the coding error: &lt;/p&gt;

&lt;p&gt;user&amp;gt; (defn picnic &lt;span class=&quot;error&quot;&gt;&amp;#91;{botulism :botulism :or {:botulism 6}}&amp;#93;&lt;/span&gt; botulism) &lt;br/&gt;
#&apos;user/picnic &lt;br/&gt;
user&amp;gt; (picnic {}) &lt;br/&gt;
nil &lt;br/&gt;
user&amp;gt; ;; I intended 6. &lt;/p&gt;</description>
                <environment></environment>
            <key id="16118">CLJ-1189</key>
            <summary>Map-destructuring :or fumble needs compiler warning</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="pbwolf">Phill Wolf</reporter>
                        <labels>
                    </labels>
                <created>Sun, 31 Mar 2013 08:02:44 -0500</created>
                <updated>Tue, 28 May 2013 11:52:12 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31163" author="gfredericks" created="Sun, 26 May 2013 08:25:15 -0500"  >&lt;p&gt;Should this be a warning or an exception? I don&apos;t know of any similar example of the compiler giving a warning, so I would expect the latter.&lt;/p&gt;</comment>
                    <comment id="31165" author="gfredericks" created="Sun, 26 May 2013 09:54:14 -0500"  >&lt;p&gt;Added a patch that throws an exception when :or is not a map or its keys are not symbols. Also some tests.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12014" name="CLJ-1189-p1.patch" size="2850" author="gfredericks" created="Sun, 26 May 2013 09:54: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="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-1162] Error Message when calling deref on a non-IDeref is unhelpful</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1162</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you just type &quot;@1&quot; is the repl, on previous versions you&apos;ll get an error that Long cannot be cast to IDeref.  In 1.5, the error message is that it cannot be cast to java.util.concurrent.Future.  This is because it assumes that anything that isn&apos;t an IDeref is automatically a Future.  The deref method should generate a custom error stating that the type you&apos;ve passed in is neither an IDeref nor a Future. &lt;/p&gt;</description>
                <environment>Found this on ubuntu, lein 2, Clojure 1.5 snapshot, but it&amp;#39;s obvious from inspection</environment>
            <key id="16003">CLJ-1162</key>
            <summary>Error Message when calling deref on a non-IDeref is unhelpful</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="julian">Julian Birch</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Feb 2013 03:01:23 -0600</created>
                <updated>Tue, 28 May 2013 11:54:55 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="31171" author="gfredericks" created="Sun, 26 May 2013 15:00:33 -0500"  >&lt;p&gt;Attached a patch that implements the old behavior (can&apos;t cast to IDeref), which strikes me as good enough considering the support for j.u.c.Future seems rather an edge case (being that clojure&apos;s futures are themselves IDeref).&lt;/p&gt;

&lt;p&gt;The weirdest thing I did was to use clojure.core/cast to unconditionally throw a ClassCastException. Let me know if that&apos;s weird and I&apos;ll do something different.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12016" name="CLJ-1162-p1.patch" size="1792" author="gfredericks" created="Sun, 26 May 2013 15:00: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>
                                            <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-1078] Added queue, queue* and queue? to clojure.core</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1078</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Original patch added functions for PersistentQueue. queue, queue? and queue* match the list functions of the same naming conventions. Patches include updates to tests. &lt;/p&gt;

&lt;p&gt;In the updated patch, &quot;queue&quot; accepts a single collection argument as per Rich&apos;s suggestion, and does not provide a &quot;queue*&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15723">CLJ-1078</key>
            <summary>Added queue, queue* and queue? to clojure.core</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="halgari">Timothy Baldridge</reporter>
                        <labels>
                        <label>data-structures</label>
                        <label>queue</label>
                    </labels>
                <created>Wed, 26 Sep 2012 23:38:59 -0500</created>
                <updated>Fri, 31 May 2013 10:05:34 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="29551" author="jafingerhut" created="Fri, 28 Sep 2012 08:43:06 -0500"  >&lt;p&gt;Timothy, I tried applying both of these Sep 26, 2012 patches to latest Clojure master as of that date.  I had to apply 0001-make-PersistentQueue-ctor-public.patch by hand since it failed to apply using git or patch.  It built fine, but failed to pass several of the Clojure tests.  Have you looked into those test failures to see if you can find the cause and fix them?  I tested on Ubuntu 11.10 with Oracle JDK 1.6 and 1.7, and saw similar failures with both.&lt;/p&gt;</comment>
                    <comment id="29817" author="halgari" created="Fri, 26 Oct 2012 17:23:06 -0500"  >&lt;p&gt;Fixed the patch. Tests pass, created the patch, applied it to a different copy of the source and the tests still pass. So this new patch should be good to go.&lt;/p&gt;</comment>
                    <comment id="29818" author="jafingerhut" created="Fri, 26 Oct 2012 17:43:43 -0500"  >&lt;p&gt;Timothy, I&apos;m not sure how you are getting successful results when applying this patch.  Can you try the steps below and see what happens for you?  I get errors trying to apply the patch with latest Clojure master as of Oct 26, 2012.  Also please use the steps on the JIRA workflow page to create a git format patch (&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; under &quot;Development&quot; heading).&lt;/p&gt;

&lt;p&gt;% git clone git://github.com/clojure/clojure.git&lt;br/&gt;
% cd clojure&lt;br/&gt;
% patch -p1 &amp;lt; queues.patch&lt;br/&gt;
patching file src/clj/clojure/core.clj&lt;br/&gt;
patching file src/jvm/clojure/lang/PersistentQueue.java&lt;br/&gt;
Hunk #1 FAILED at 32.&lt;br/&gt;
1 out of 1 hunk FAILED &amp;#8211; saving rejects to file src/jvm/clojure/lang/PersistentQueue.java.rej&lt;br/&gt;
patching file test/clojure/test_clojure/data_structures.clj&lt;br/&gt;
Hunk #1 succeeded at 123 with fuzz 2.&lt;br/&gt;
Hunk #2 succeeded at 861 with fuzz 2.&lt;br/&gt;
Hunk #3 FAILED at 872.&lt;br/&gt;
1 out of 3 hunks FAILED &amp;#8211; saving rejects to file test/clojure/test_clojure/data_structures.clj.rej&lt;br/&gt;
patching file test/clojure/test_clojure/java_interop.clj&lt;/p&gt;</comment>
                    <comment id="29821" author="halgari" created="Fri, 26 Oct 2012 18:08:27 -0500"  >&lt;p&gt;I was using git apply. I tried the method you show above, and now I&apos;m seeing the same issues you show above. &lt;/p&gt;</comment>
                    <comment id="29822" author="jafingerhut" created="Fri, 26 Oct 2012 18:26:54 -0500"  >&lt;p&gt;Just so you know, the preferred way to create and apply patches are the &quot;git format-patch master --stdout &amp;gt; patch.txt&quot; to create a patch (after doing the branching commands described on the JIRA workflow page to create a branch for your changes), and the &quot;git am --keep-cr -s &amp;lt; patch.txt&quot; to apply a patch.  If a patch was created that way and applies cleanly with that command, then you are definitely good to go.&lt;/p&gt;

&lt;p&gt;The &quot;patch -p1 &amp;lt; patch.txt&quot; command is just a secondary method sometimes used to try to apply patches that aren&apos;t in the format produced above, or have errors when applying using that method.&lt;/p&gt;</comment>
                    <comment id="29824" author="halgari" created="Fri, 26 Oct 2012 21:15:43 -0500"  >&lt;p&gt;Just so you know, the preferred way to create and apply patches are the &quot;git format-patch master --stdout &amp;gt; patch.txt&quot; to create a patch (after doing the branching commands described on the JIRA workflow page to create a branch for your changes), and the &quot;git am --keep-cr -s &amp;lt; patch.txt&quot; to apply a patch. If a patch was created that way and applies cleanly with that command, then you are definitely good to go.&lt;/p&gt;

&lt;p&gt;The &quot;patch -p1 &amp;lt; patch.txt&quot; command is just a secondary method sometimes used to try to apply patches that aren&apos;t in the format produced above, or have errors when applying using that method.&lt;/p&gt;</comment>
                    <comment id="29825" author="halgari" created="Fri, 26 Oct 2012 21:16:07 -0500"  >&lt;p&gt;added patch&lt;/p&gt;</comment>
                    <comment id="29826" author="jafingerhut" created="Fri, 26 Oct 2012 21:37:45 -0500"  >&lt;p&gt;That one applies cleanly and passes all tests.  It should show up on the next list of prescreened patches.  Thanks.&lt;/p&gt;</comment>
                    <comment id="30086" author="richhickey" created="Thu, 29 Nov 2012 09:54:51 -0600"  >&lt;p&gt;we don&apos;t use the queue* convention elsewhere, e.g. vec and vector. I think queue should take a collection like vec and set. (queue &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;) could be made to &apos;adopt&apos; the collection as front.&lt;/p&gt;</comment>
                    <comment id="30215" author="jafingerhut" created="Tue, 11 Dec 2012 13:00:59 -0600"  >&lt;p&gt;Patch queue.patch dated Oct 26 2012 no longer applies cleanly after recent &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; commits, but only because of one line of changed patch context.  It still applies cleanly with &quot;patch -p1 &amp;lt; queue.patch&quot;.  Not bothering to update the stale patch given Rich&apos;s comments suggesting more substantive changes.&lt;/p&gt;</comment>
                    <comment id="30883" author="steveminer@gmail.com" created="Sat, 6 Apr 2013 08:06:15 -0500"  >&lt;p&gt;See also &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-976&quot; title=&quot;Implement reader literal and print support for PersistentQueue data structure&quot;&gt;CLJ-976&lt;/a&gt; (tagged literal support for PersistentQueue)&lt;/p&gt;</comment>
                    <comment id="31137" author="eigenhombre" created="Thu, 23 May 2013 20:54:15 -0500"  >&lt;p&gt;Don&apos;t want to step on Timothy B&apos;s toes here, but it looks straightforward to adopt his patch to implement Rich&apos;s suggestion.  I&apos;d offer to give it a whack if nobody else wants the ticket now.&lt;/p&gt;</comment>
                    <comment id="31164" author="eigenhombre" created="Sun, 26 May 2013 09:04:43 -0500"  >&lt;p&gt;Discussion initiated on clojure-dev: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/2BOqHm24Vc4&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/2BOqHm24Vc4&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="31189" author="eigenhombre" created="Fri, 31 May 2013 09:58:24 -0500"  >&lt;p&gt;This patch (if accepted) supersedes Timothy Baldridge&apos;s patch; it implements &quot;queue&quot; and &quot;queue?&quot; (but not &quot;queue*&quot;); &quot;queue&quot; accepts a collection rather than being a variadic function, as per Rich&apos;s suggestion.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12018" name="clj-1048-queue-takes-collections.diff" size="4726" author="eigenhombre" created="Fri, 31 May 2013 09:58:24 -0500" />
                    <attachment id="11622" name="queue.patch" size="6548" author="halgari" created="Fri, 26 Oct 2012 21:16: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>
                                            <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, 7 Jun 2013 14:01:34 -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>
                    <comment id="31146" author="stu" created="Fri, 24 May 2013 11:35:04 -0500"  >&lt;p&gt;Timothy: Why the empty catch block? I don&apos;t see anything in the try block whose failure we would want to ignore.&lt;/p&gt;</comment>
                    <comment id="31188" author="halgari" created="Thu, 30 May 2013 14:02:13 -0500"  >&lt;p&gt;The demunge function is created inside of a .clj file. So it is possible that we could hit this exception before demunge exists. The try simply says &quot;if we can get a better error message, use it. Otherwise, fall back to the old (half-broken) method of getting method names&quot;&lt;/p&gt;</comment>
                    <comment id="31220" author="jafingerhut" created="Fri, 7 Jun 2013 14:01:34 -0500"  >&lt;p&gt;Presumptuously changing approval from Incomplete back to its former value of Vetted after Timothy responded to what I believe is the reason it was marked Incomplete (Stu&apos;s question).&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-1200] RestFn &amp; ArraySeq performance</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1200</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I was profiling one of my projects and noticed a hotspot inside functions using rest arguments.&lt;/p&gt;

&lt;p&gt;Most overloads of RestFn.invoke will construct an ArraySeq object. The ArraySeq constructor calls java.lang.Class.getComponentType, which seems to be pretty slow. The array&apos;s component type is cached in a field on the ArraySeq object for the sole purpose of passing it to Reflector.prepRet. I&apos;m not entirely sure of the total utility of prepRet, but it&apos;s clearly a no-op when passed Object.class, such as the case with the non-specialized base class of ArraySeq: the component type of object[] is Object.class.&lt;/p&gt;

&lt;p&gt;The attached patch eliminates the component type field from ArraySeq and passes Object.class to prepRet directly. It may be possible to eliminate calls to prepRet all together, but I&apos;ll assume that&apos;s a different ticket. With this patch, ArraySeq initialization no longer shows up as a hotspot when profiling.&lt;/p&gt;

&lt;p&gt;Before the patch:&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; (dotimes [n 10] (time (dotimes [i 5000000] ((fn [&amp;amp; args]) 1 2 3 4))))
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 874.742 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 900.277 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 911.164 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 872.132 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 885.495 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 897.537 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 879.691 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 888.52 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 871.556 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 1088.682 msecs&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After the patch:&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; (dotimes [n 10] (time (dotimes [i 5000000] ((fn [&amp;amp; args]) 1 2 3 4))))
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 628.144 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 634.163 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 617.397 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 622.714 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 646.743 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 648.708 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 629.223 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 638.058 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 725.473 msecs&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;Elapsed time: 636.909 msecs&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That&apos;s about a 30% reduction in execution time.&lt;/p&gt;

&lt;p&gt;Granted it only represents a change of 52 nanoseconds per RestFn invoke (181 ns to 129 ns), but this actually was a pretty decent win for a library that makes makes almost exclusively variadic function calls in a tight loop.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16141">CLJ-1200</key>
            <summary>RestFn &amp; ArraySeq performance</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bbloom">Brandon Bloom</reporter>
                        <labels>
                        <label>patch</label>
                    </labels>
                <created>Sun, 14 Apr 2013 21:49:05 -0500</created>
                <updated>Fri, 7 Jun 2013 19:35:06 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="31221" author="ztellman" created="Fri, 7 Jun 2013 17:40:38 -0500"  >&lt;p&gt;As a data point, I was recently profiling a Hadoop job where the code made heavy use of &apos;partial&apos;, which apparently unlike &apos;comp&apos; and &apos;juxt&apos;, always uses apply &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;.  As a result, .getComponentType accounted for 41% of the overall compute time.  This might be as much a comment on the implementation of partial as anything else, but it certainly shows that this can have a significant effect on performance.&lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L2388&quot;&gt;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L2388&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="31222" author="hiredman" created="Fri, 7 Jun 2013 17:46:43 -0500"  >&lt;p&gt;prepRet usage appears to be all about enforcing canonical Boolean values, so I think using Object.class is not the best. Maybe splitting ArraySeq in to ArraySeq and ArraySeqBoolean would be better. ArraySeq would no longer do a prepRet and ArraySeqBoolean would&lt;/p&gt;</comment>
                    <comment id="31223" author="hiredman" created="Fri, 7 Jun 2013 19:19:48 -0500"  >&lt;p&gt;ArraySeq actually already has specialized implementations, and interestingly the specialized boolean implementation doesn&apos;t call prepRet&lt;/p&gt;</comment>
                    <comment id="31224" author="hiredman" created="Fri, 7 Jun 2013 19:35:06 -0500"  >&lt;p&gt;The ArraySeq split I proposed above will fail if you have an array of Objects that happen to be Booleans, it seems like the best bet would be something like preRet that did a instanceof Boolean check without the requirement of passing in a class&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11958" name="no-getComponentType--v001.patch" size="3501" author="bbloom" created="Sun, 14 Apr 2013 21:49:05 -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-1216] Evaling ((fn [do] do) 1) returns nil while ((fn [do] do do) 1) returns 1</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1216</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user=&amp;gt; ((fn &lt;span class=&quot;error&quot;&gt;&amp;#91;do&amp;#93;&lt;/span&gt; do) 1)&lt;br/&gt;
nil&lt;/p&gt;

&lt;p&gt;user=&amp;gt; ((fn &lt;span class=&quot;error&quot;&gt;&amp;#91;do&amp;#93;&lt;/span&gt; (do do)) 1)&lt;br/&gt;
1&lt;/p&gt;

&lt;p&gt;user=&amp;gt; ((fn [] do))&lt;br/&gt;
nil&lt;/p&gt;

&lt;p&gt;user=&amp;gt; ((fn [] do do))&lt;br/&gt;
CompilerException java.lang.RuntimeException: Unable to resolve symbol: do in this context, compiling:(NO_SOURCE_PATH:0:0) &lt;/p&gt;</description>
                <environment></environment>
            <key id="16222">CLJ-1216</key>
            <summary>Evaling ((fn [do] do) 1) returns nil while ((fn [do] do do) 1) returns 1</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>Sun, 9 Jun 2013 16:29:14 -0500</created>
                <updated>Sun, 9 Jun 2013 16:31:22 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31238" author="bronsa" created="Sun, 9 Jun 2013 16:31:22 -0500"  >&lt;p&gt;This patch creates a DoExpr class and makes DoExpr.Parser the DO special form parser.&lt;/p&gt;

&lt;p&gt;DoExpr.Parser simply removes the &apos;do&apos; symbol and delegates to BodyExpr, that was previously done by BodyExpr incorrectly.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12025" name="0001-Create-a-DoExpr.Parser-class-that-delegates-to-BodyE.patch" size="2181" author="bronsa" created="Sun, 9 Jun 2013 16:31:22 -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-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>Sun, 9 Jun 2013 16:31:55 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="31169" author="gfredericks" created="Sun, 26 May 2013 14:13:28 -0500"  >&lt;p&gt;Attached a patch that changes IPersistentCollection to ISeq on the referenced line, and a regression test.&lt;/p&gt;</comment>
                    <comment id="31236" author="bronsa" created="Sun, 9 Jun 2013 14:52:11 -0500"  >&lt;p&gt;As found out on #clojure, there are still some cases where the symbol &quot;do&quot; behaves in unexpected ways that this patch doesn&apos;t address.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; ((fn &lt;span class=&quot;error&quot;&gt;&amp;#91;do&amp;#93;&lt;/span&gt; do) 1)&lt;br/&gt;
nil&lt;br/&gt;
user=&amp;gt; (let &lt;span class=&quot;error&quot;&gt;&amp;#91;do 1&amp;#93;&lt;/span&gt; do)&lt;br/&gt;
nil&lt;/p&gt;</comment>
                    <comment id="31237" author="gfredericks" created="Sun, 9 Jun 2013 15:00:21 -0500"  >&lt;p&gt;Presumably the same issue is the difference between&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 5] &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; x)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which returns &lt;tt&gt;5&lt;/tt&gt; and&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 5] &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; x)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt; which gives a compile error.&lt;/p&gt;</comment>
                    <comment id="31239" author="bronsa" created="Sun, 9 Jun 2013 16:31:55 -0500"  >&lt;p&gt;This is actually a different bug.&lt;br/&gt;
I created another ticket with patch+test see &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1216&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1216&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12015" name="CLJ-1184-p1.patch" size="1676" author="gfredericks" created="Sun, 26 May 2013 14:13:28 -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>Mon, 10 Jun 2013 01:57:52 -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>
                    <comment id="31153" author="cldwalker" created="Fri, 24 May 2013 14:23:24 -0500"  >&lt;p&gt;I&apos;ve added clj-827-unsigned-bit-shift-right-with-tests.patch which builds off of Tim&apos;s patch and adds tests. I also renamed the new fn to unsigned-bit-shift-right after chatting with Rich.&lt;/p&gt;

&lt;p&gt;@Michal - This may mean you need to rename the cljs fn. After this lands on master, I can open a ticket with a patch if you&apos;d like.&lt;/p&gt;</comment>
                    <comment id="31192" author="michalmarczyk" created="Fri, 31 May 2013 15:43:02 -0500"  >&lt;p&gt;@Gabriel: Thanks! &lt;tt&gt;bit-shift-right-zero-fill&lt;/tt&gt; is not marked private in ClojureScript, so it&apos;ll be a breaking change; if it&apos;s going to happen eventually (that is, if the name is settled), I suppose it&apos;s best to make it without waiting for Clojure.&lt;/p&gt;

&lt;p&gt;At any rate, I went ahead and created &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-514&quot; title=&quot;Coordinate with Clojure on unsigned-bit-shift-right function name&quot;&gt;CLJS-514&lt;/a&gt; to track the coordination effort. No patch attached; if you&apos;d like to do the patching on both sides, that would be cool, otherwise I&apos;ll be happy to provide the CLJS patch.&lt;/p&gt;</comment>
                    <comment id="31208" author="cldwalker" created="Mon, 3 Jun 2013 10:10:17 -0500"  >&lt;p&gt;@Michal - I didn&apos;t mark it private. Are we taking about the same with-tests.patch? I&apos;ll try to get around to the cljs patch but feel free to beat me to it if I&apos;m slow.&lt;/p&gt;</comment>
                    <comment id="31242" author="michalmarczyk" created="Mon, 10 Jun 2013 01:57:52 -0500"  >&lt;p&gt;@Gabriel: I mean it&apos;s not marked private in ClojureScript, so ClojureScript already exports the ...-zero-fill name, technically speaking. As per David Nolen&apos;s comment on &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-514&quot; title=&quot;Coordinate with Clojure on unsigned-bit-shift-right function name&quot;&gt;CLJS-514&lt;/a&gt;, this is probably not a big deal.&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" />
                    <attachment id="12007" name="clj-827-unsigned-bit-shift-right-with-tests.patch" size="9110" author="cldwalker" created="Fri, 24 May 2013 14:19:49 -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-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="stu">Stuart Halloway</assignee>
                                <reporter username="tcrawley">Toby Crawley</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Dec 2012 15:01:15 -0600</created>
                <updated>Fri, 14 Jun 2013 10:56:13 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>9</votes>
                        <watches>8</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>
                    <comment id="31141" author="stu" created="Fri, 24 May 2013 09:43:33 -0500"  >&lt;p&gt;Does Tomcat create warnings for Clojure, as described e.g. &lt;a href=&quot;http://stackoverflow.com/questions/5292349/is-this-very-likely-to-create-a-memory-leak-in-tomcat&quot;&gt;here&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;If so, does this patch make the warnings go away?&lt;/p&gt;</comment>
                    <comment id="31142" author="tcrawley" created="Fri, 24 May 2013 09:56:14 -0500"  >&lt;p&gt;Stu: that&apos;s a good question. I&apos;ll take a look at Tomcat this afternoon.&lt;/p&gt;</comment>
                    <comment id="31143" author="stu" created="Fri, 24 May 2013 10:04:04 -0500"  >&lt;p&gt;The code that calls transaction.remove() seems unncessarily subtle.   There are two exits from the method, and only one is protected by the finally block.&lt;/p&gt;

&lt;p&gt;If the &quot;outer&quot; case was a top-level if, the logic would be more clear, and only the &quot;outer&quot; case would need try/finally, which might reduce the performance penalty in the case of deeply nested dosyncs.&lt;/p&gt;

&lt;p&gt;Did your transaction overhead of 4-6 microseconds test only one level of dosync, or many?&lt;/p&gt;</comment>
                    <comment id="31144" author="stu" created="Fri, 24 May 2013 10:13:35 -0500"  >&lt;p&gt;Because the unwind code calls &lt;tt&gt;remove&lt;/tt&gt; at the top (as opposed to &lt;tt&gt;set(null)&lt;/tt&gt;), the code should now be safe for use with Clojure-defined &lt;tt&gt;ThreadLocal&lt;/tt&gt; subclasses.&lt;/p&gt;

&lt;p&gt;Therefore, Var&apos;s use of an &lt;tt&gt;initialValue&lt;/tt&gt; should be irrelevant to this patch, and it should be possible to fix this bug with a patch half the size of the current patch, touching only &lt;tt&gt;LockingTransaction.runInTransaction&lt;/tt&gt; and &lt;tt&gt;Var.popThreadBindings&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="31263" author="tcrawley" created="Fri, 14 Jun 2013 07:38:45 -0500"  >&lt;h3&gt;&lt;a name=&quot;re%3ATomcatThreadLocalwarnings&quot;&gt;&lt;/a&gt;re: Tomcat ThreadLocal warnings&lt;/h3&gt;

&lt;p&gt;With Clojure 1.5.1 using my test app (linked below), I see:&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;Jun 14, 2013 6:35:22 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/leak] created a ThreadLocal with key of type [clojure.lang.Var$1] (value [clojure.lang.Var$1@4902919]) and a value of type [clojure.lang.Var.Frame] (value [clojure.lang.Var$Frame@147a2aa6]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jun 14, 2013 6:35:22 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/leak] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@608602ca]) and a value of type [clojure.lang.LockingTransaction] (value [clojure.lang.LockingTransaction@7e214d47]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With the original patch (threadlocal-removal-tcrawley-2012-12-11.diff) and the one attached today (threadlocal-removal-tcrawley-2013-06-14.diff), I no longer see these warnings.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;re%3Athe%7B%7BLockingTransaction.runInTransaction%7D%7Dchanges&quot;&gt;&lt;/a&gt;re: the &lt;tt&gt;LockingTransaction.runInTransaction&lt;/tt&gt; changes&lt;/h3&gt;

&lt;p&gt;In today&apos;s patch (threadlocal-removal-tcrawley-2013-06-14.diff), I modified &lt;tt&gt;runInTransaction&lt;/tt&gt; to have one exit point, and only wrap a call to &lt;tt&gt;run&lt;/tt&gt; with a try/finally in the outer transaction case. It does introduce two locations where &lt;tt&gt;run&lt;/tt&gt; can be called to preserve the case where an inner transaction has null info:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; runInTransaction(Callable fn) &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception{
	LockingTransaction t = transaction.get();
        &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; ret;
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(t == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
            transaction.set(t = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LockingTransaction());
            &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
                ret = t.run(fn);
            } &lt;span class=&quot;code-keyword&quot;&gt;finally&lt;/span&gt; {
                transaction.remove();
            }
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(t.info != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                ret = fn.call();
            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                ret = t.run(fn);
            }
        }

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; ret;
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, this will likely not reduce the speed penalty I observed in my testing, as I was only using a single level of &lt;tt&gt;dosync&lt;/tt&gt; when capturing timing data.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;re%3Aremoving%7B%7BinitialValue%7D%7Dfrom%7B%7Bdvals%7D%7D&quot;&gt;&lt;/a&gt;re: removing &lt;tt&gt;initialValue&lt;/tt&gt; from &lt;tt&gt;dvals&lt;/tt&gt;&lt;/h3&gt;

&lt;p&gt;My original solution kept &lt;tt&gt;initialValue&lt;/tt&gt;, but I then apparently discovered cases where the leak still occurred (see the &lt;a href=&quot;https://groups.google.com/d/topic/clojure-dev/3CXDe8_9G58/discussion&quot;&gt;mailing list thread&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Unfortunately, I can neither recreate that case, nor find in my notes, test code, or the clojure code a reason why keeping &lt;tt&gt;initialValue&lt;/tt&gt; would allow the ThreadLocals to leak when &lt;tt&gt;popThreadBindings&lt;/tt&gt; is patched (assuming one doesn&apos;t call &lt;tt&gt;Var.getThreadBindings&lt;/tt&gt; from Java without calling &lt;tt&gt;Var.popThreadBindings&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;Therefore, I&apos;ve attached a simpler patch (threadlocal-removal-tcrawley-2013-06-14.diff) that just patches &lt;tt&gt;LockingTransaction.runInTransaction&lt;/tt&gt; and &lt;tt&gt;Var.popThreadBindings&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;ve also created a &lt;a href=&quot;https://github.com/tobias/threadlocal-leak-check&quot;&gt;project&lt;/a&gt; that demonstrates the leak with 1.5.1, and that the leak does not appear with this patch applied to 1.6.0-master. See its &lt;a href=&quot;https://github.com/tobias/threadlocal-leak-check#threadlocal-leak-check&quot;&gt;README&lt;/a&gt; for usage details.&lt;/p&gt;

&lt;p&gt;The patched version of 1.6.0-master is available as &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojars.tcrawley/clojure &amp;quot;1.6.0-clearthreadlocals&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt; if anyone wants to give it a try in their own projects. Note that since its group isn&apos;t &apos;org.clojure&apos;, you may need to add exclusions to your project to prevent another version of clojure being included.&lt;/p&gt;</comment>
                    <comment id="31265" author="jafingerhut" created="Fri, 14 Jun 2013 10:56:13 -0500"  >&lt;p&gt;Presumptuously changing ticket approval from Incomplete back to its former Vetted state, since Toby&apos;s comments and new patch seem to address the comments that led Stu to change it to Incomplete.&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" />
                    <attachment id="12029" name="threadlocal-removal-tcrawley-2013-06-14.diff" size="2157" author="tcrawley" created="Fri, 14 Jun 2013 07:39:16 -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-1217] for consumes sequence argument more eagerly than necessary</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1217</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In a call like (do (for &lt;span class=&quot;error&quot;&gt;&amp;#91;x (do (println &amp;quot;realized&amp;quot;) nil)&amp;#93;&lt;/span&gt; x) nil), no elements of the for comprehension are ever requested, and so it is not actually necessary to evaluate the inner do-block. However, this expression causes &quot;realized&quot; to be printed, because the first sequence-expression in for is evaluated even if no items are ever requested from the output lazy-seq.&lt;/p&gt;

&lt;p&gt;It&apos;s not documented whether this is intended or unintentional, but I was surprised by this behavior, and a brief unscientific survey on #clojure suggests that other users, even &quot;old hands&quot; who&apos;ve been using clojure for years, don&apos;t expect this either.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a patch that wraps the problematic expression in a lazy-seq call. This is not quite ideal, because it means that the first iteration is &quot;lazied&quot; twice, as in ((fn step &lt;span class=&quot;error&quot;&gt;&amp;#91;s&amp;#93;&lt;/span&gt; (lazy-seq ...)) (lazy-seq xs)), but a change to make this not happen would be much broader in scope, and this seemed the least dangerous.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16228">CLJ-1217</key>
            <summary>for consumes sequence argument more eagerly than necessary</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="amalloy">Alan Malloy</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jun 2013 14:35:23 -0500</created>
                <updated>Fri, 14 Jun 2013 14:36:08 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="12030" name="0001-Don-t-realize-seq-exprs-in-for-unless-necessary.patch" size="841" author="amalloy" created="Fri, 14 Jun 2013 14:35: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>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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