<!--
RSS generated by JIRA (4.4#649-r158309) at Wed Jun 19 16:58:56 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/10003/SearchRequest-10003.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>All active Clojure issues (Clojure JIRA)</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?requestId=10003</link>
        <description>All open, in progress, or reopened Clojure project issues, sorted by priority ascending then key descending.</description>
                <language>en-us</language>
                        <issue start="0" end="290" total="290"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJ-459] RFE: modify description of &quot;assoc&quot;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-459</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The documentation for &quot;assoc&quot; in clojure.core should probably &lt;br/&gt;
include&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(assoc vector index val)
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
and

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

<item>
            <title>[CLJ-326] add :as-of option to refer</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-326</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Discussed here: &lt;a href=&quot;http://groups.google.com/group/clojure-dev/msg/74af612909dcbe56&quot;&gt;http://groups.google.com/group/clojure-dev/msg/74af612909dcbe56&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;(ns foo (:refer-clojure :as-of &quot;1.1&quot;)) is equivalent to (ns foo (:refer-clojure :only &lt;span class=&quot;error&quot;&gt;&amp;#91;public-documented-vars-which-already-existed-in-1.1&amp;#93;&lt;/span&gt;))&lt;/p&gt;</description>
                <environment></environment>
            <key id="13723">CLJ-326</key>
            <summary>add :as-of option to refer</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cgrand">Christophe Grand</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Apr 2010 02:49:00 -0500</created>
                <updated>Tue, 24 Aug 2010 10:19:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23803" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/326&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/326&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
add-as-of-to-refer.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/a8SumUvcOr37SmeJe5cbLA/download/a8SumUvcOr37SmeJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/a8SumUvcOr37SmeJe5cbLA/download/a8SumUvcOr37SmeJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23804" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;cgrand said: [&lt;a href=&quot;file:a8SumUvcOr37SmeJe5cbLA&quot;&gt;file:a8SumUvcOr37SmeJe5cbLA&lt;/a&gt;]: requires application of #325&lt;/p&gt;</comment>
                    <comment id="23805" author="importer" created="Tue, 24 Aug 2010 10:19:00 -0500"  >&lt;p&gt;richhickey said: Do we still need this?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10013">Test</customfieldvalue>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;The code below demonstrates the issue, which was introduced in &lt;a href=&quot;http://github.com/richhickey/clojure/commit/430dd4fa711d0008137d7a82d4b4cd27b6e2d6d1&quot;&gt;http://github.com/richhickey/clojure/commit/430dd4fa711d0008137d7a82d4b4cd27b6e2d6d1&lt;/a&gt;, &quot;metadata for fns.&quot;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;;; all running on 1.2, DIFF noted in comments

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

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

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

(meta #&apos;bar)
-&amp;gt; {:ns #&amp;lt;Namespace user&amp;gt;, :name bar, :file &lt;span class=&quot;code-quote&quot;&gt;&quot;NO_SOURCE_PATH&quot;&lt;/span&gt;, :line 84}
;; LIKE 1.1, but really weird: now the :macro &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; is gone again!&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13670">CLJ-273</key>
            <summary>def with a function value returns meta {:macro false}, but def itself doesn&apos;t have meta</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="richhickey">Rich Hickey</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Feb 2010 08:16:00 -0600</created>
                <updated>Tue, 24 Aug 2010 09:32:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23525" author="importer" created="Tue, 24 Aug 2010 09:32:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/273&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/273&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-270] defn-created fns inherit old metadata from the Var they are assigned to</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-270</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;What (small set of) steps will reproduce the problem?&lt;/li&gt;
&lt;/ul&gt;


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

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


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

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


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

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


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

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

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

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


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

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

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

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

&lt;p&gt;See also &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/6afd81896ca368b2#&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/6afd81896ca368b2#&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23514" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: [&lt;a href=&quot;file:arrhbiAI4r35lQeJe5cbLr&quot;&gt;file:arrhbiAI4r35lQeJe5cbLr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23515" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: My patch aligns DefExpr.eval with DefExpr.emit (first set meta then eval the init value).&lt;/p&gt;</comment>
                    <comment id="23516" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: Forget it, my current patch is broken.&lt;/p&gt;</comment>
                    <comment id="23517" author="importer" created="Tue, 24 Aug 2010 06:23:00 -0500"  >&lt;p&gt;cgrand said: My current patch is broken because of #352, what is the rational for #352?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-163] Enhance = and == docs</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-163</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Enhance = and == docs as far as numbers handling is concerned (make them self referenced, make clear what == offers beyond = -except that it will only work for numbers)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13560">CLJ-163</key>
            <summary>Enhance = and == docs</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="laurentpetit">Laurent Petit</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Jul 2009 00:18:00 -0500</created>
                <updated>Tue, 24 Aug 2010 13:04:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="23050" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/163&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/163&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
fixbug163.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/bH0XMCFjur3PLMeJe5aVNr/download/bH0XMCFjur3PLMeJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/bH0XMCFjur3PLMeJe5aVNr/download/bH0XMCFjur3PLMeJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23051" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;laurentpetit said: [&lt;a href=&quot;file:bH0XMCFjur3PLMeJe5aVNr&quot;&gt;file:bH0XMCFjur3PLMeJe5aVNr&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="23052" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: I don&apos;t want to recommend, in = doc, that people should prefer == for any case. People should always prefer =. If there is a perf, difference we can make that go away. Then the only difference with == is that it will fail on non-numbers, and that should be the only reason to choose it.&lt;/p&gt;</comment>
                    <comment id="23053" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#94, #96, #104, #119, #163)&lt;/p&gt;</comment>
                    <comment id="23054" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;laurentpetit said: Richn, by &quot;will fail on non-numbers&quot;, do you mean &quot;should throw an exception&quot; (and thus the patch must change the code), or just as it works today :&lt;/p&gt;

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

&lt;p&gt;?&lt;/p&gt;</comment>
                    <comment id="23055" author="importer" created="Tue, 24 Aug 2010 13:04:00 -0500"  >&lt;p&gt;richhickey said: I&apos;ve fixed the code so == on non-numbers throws&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10008">Not Approved</customfieldvalue>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

<item>
            <title>[CLJ-129] Add documentation to sorted-set-by detailing how the provided comparator may change set membership semantics</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-129</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;To start, let&apos;s look at some simple default sorted-set behaviour (which uses PersistentHashMap via PersistentHashSet, and therefore uses equality/hashCode to determine identity):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (sorted-set [1 2] [-5 10] [1 5])
#{[-5 10] [1 2] [1 5]}
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;

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

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

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

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

&lt;p&gt;I&apos;d be happy to change the docs for sorted-set-by, but I suspect that there are others who could encapsulate what&apos;s going on here more correctly and more concisely than I.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13526">CLJ-129</key>
            <summary>Add documentation to sorted-set-by detailing how the provided comparator may change set membership semantics</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Jun 2009 16:14:00 -0500</created>
                <updated>Tue, 24 Aug 2010 07:45:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22903" author="importer" created="Tue, 24 Aug 2010 07:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/129&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/129&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22904" author="importer" created="Tue, 24 Aug 2010 07:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#127, #128, #129, #130)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

Consider:

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

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

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

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

<item>
            <title>[CLJ-113] GC Issue 109:  RT.load&apos;s &quot;don&apos;t load if already loaded&quot; mechanism breaks &quot;:reload-all&quot;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-113</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by scgilardi, Apr 24, 2009

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

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

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

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

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


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

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

What version are you using?

svn 1354, 1.0.0RC1

Was &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; discussed on the group? If so, please provide a link to the
discussion:

http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/group/clojure/browse_frm/thread/9bbc290321fd895f/e6a967250021462a#e6a967250021462a
&lt;/span&gt;
Please provide any additional information below.

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

The fix &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; may need to be coordinated with a fix &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; issue #3.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13510">CLJ-113</key>
            <summary>GC Issue 109:  RT.load&apos;s &quot;don&apos;t load if already loaded&quot; mechanism breaks &quot;:reload-all&quot;</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="scgilardi">Stephen C. Gilardi</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 14:07:00 -0500</created>
                <updated>Tue, 9 Aug 2011 20:31:28 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22796" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/113&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/113&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22797" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="22798" author="importer" created="Tue, 24 Aug 2010 03:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)&lt;/p&gt;</comment>
                    <comment id="26713" author="hiredman" created="Mon, 8 Aug 2011 19:40:02 -0500"  >&lt;p&gt;seems like the code that is emitted in the static init for namespace classes could be emitted into a init_ns() static method and the static init could call init_ns(). then RT.load could call init_ns() to get the behavior of reloading an AOT compiled namespace. &lt;/p&gt;</comment>
                    <comment id="26715" author="hiredman" created="Tue, 9 Aug 2011 20:31:28 -0500"  >&lt;p&gt;looking at the compiler it looks like most of what I mentioned above is already implemented, just need RT to reflectively call load() on the namespace class in the right place&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

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

rhickey: what hiredman said

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

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

unlink: ok.

unlink: Good to know.

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

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

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

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

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

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

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

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

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

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

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

Comment 1 by rob.nikander, Mar 11, 2009

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

Comment 2 by cjkent, Mar 25, 2009

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-42] GC Issue 38: When using AOT compilation, &quot;load&quot;ed files are not reloaded on (require :reload &apos;name.space)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-42</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by m...@kotka.de, Jan 07, 2009
What (small set of) steps will reproduce the problem?

1. Create a file src/foo.clj

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

2. Create a file src/bar.clj

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

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

4. Compile the namespace.

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

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

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

6. Re-Require the namespace

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

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

What version are you using?

SVN rev. 1195&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13439">CLJ-42</key>
            <summary>GC Issue 38: When using AOT compilation, &quot;load&quot;ed files are not reloaded on (require :reload &apos;name.space)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="scgilardi">Stephen C. Gilardi</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 15:15:00 -0500</created>
                <updated>Tue, 24 Aug 2010 06:44:00 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="22573" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/42&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/42&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22574" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)&lt;/p&gt;</comment>
                    <comment id="22575" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#42, #71)&lt;/p&gt;</comment>
                    <comment id="22576" author="importer" created="Tue, 24 Aug 2010 06:44:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-21] GC Issue 17: arity checking during compilation</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-21</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by richhickey, Dec 17, 2008
Use available metadata to check calls when possible&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13418">CLJ-21</key>
            <summary>GC Issue 17: arity checking during compilation</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jun 2009 22:59:00 -0500</created>
                <updated>Tue, 24 Aug 2010 14:44:00 -0500</updated>
                                                    <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="22519" author="importer" created="Tue, 24 Aug 2010 14:44:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/21&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/21&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

<item>
            <title>[CLJ-1219] Make identical? variadic</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1219</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(= 1 1 1)             ;; =&amp;gt; true&lt;br/&gt;
(= 1 1 2)             ;; =&amp;gt; false&lt;br/&gt;
(== 1 1 1)            ;; =&amp;gt; true&lt;br/&gt;
(== 1 1 2)            ;; =&amp;gt; false&lt;br/&gt;
(identical? 1 1 1)    ;; ArityException Wrong number of args (3) passed to: core$identical-QMARK-  clojure.lang.AFn.throwArity (AFn.java:437)&lt;/p&gt;

&lt;p&gt;I think it would make far more sense to make identical? consistent with all other comparison operators&lt;br/&gt;
and allow it to take variadic number of arguments.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16242">CLJ-1219</key>
            <summary>Make identical? variadic</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="gozala">Irakli Gozalishvili</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 13:44:56 -0500</created>
                <updated>Wed, 19 Jun 2013 13:44:56 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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>

<item>
            <title>[CLJ-1214] Compiler runs out of memory on a small snippet of code</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1214</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure compiler runs out of memory when loading the attached file. Transcript 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;$ java -cp ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar:. clojure.main
Clojure 1.5.1
user=&amp;gt; (load &quot;fubar&quot;)
OutOfMemoryError GC overhead limit exceeded  [trace missing]
user=&amp;gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The file contents are:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  (ns fu.bar)

  (defn foo[l] (concat (drop-last l) (repeat (last l))))

  (def ^:const bar (foo [#(print &quot;&quot;) #(println &quot;;&quot;)]))

  bar
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If I remove the metadata on bar, it works. Removal of namespace seems to fix it as well. Pretty strange.&lt;/p&gt;

&lt;p&gt;Although I realize this code is not quite kosher, it would be nice to have the compiler deal with it.&lt;/p&gt;</description>
                <environment>Linux 3.2.0-39-generic </environment>
            <key id="16215">CLJ-1214</key>
            <summary>Compiler runs out of memory on a small snippet of code</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="praki">Praki Prakash</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 May 2013 21:33:04 -0500</created>
                <updated>Sun, 2 Jun 2013 04:56:38 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31196" author="jafingerhut" created="Sat, 1 Jun 2013 19:40:03 -0500"  >&lt;p&gt;If you really do have &apos;bar&apos; on a line by itself at the end of file fubar.clj, it seems you are asking it to evaluate the value of bar, which by the definitions is an infinite list, and will of course exhaust all available memory if you attempt to evaluate it.&lt;/p&gt;

&lt;p&gt;It seems to me the more odd thing is not that it runs out of memory as shown, but that it does &lt;b&gt;not&lt;/b&gt; run out of memory when you remove the metadata on bar.&lt;/p&gt;

&lt;p&gt;What is the purpose of having &apos;bar&apos; on a line by itself at the end of the file?&lt;/p&gt;

&lt;p&gt;If I try this but remove &apos;bar&apos; as the last line of the file, loading the file causes no errors regardless of whether there is metadata on bar&apos;s definition or not.  It is strange that doing (load &quot;fubar&quot;) followed by (first fu.bar/bar) seems to go into an infinite loop if the :const is there on bar, but quickly returns the correct answer if the metadata is removed.&lt;/p&gt;</comment>
                    <comment id="31197" author="praki" created="Sat, 1 Jun 2013 20:40:55 -0500"  >&lt;p&gt;This code snippet is a minimal test case to show that the compiler runs out of memory. What I meant by &quot;it works&quot; was that the compiler doesn&apos;t run out of memory and successfully loads the file (or in my real code base, the namespace is compiled).&lt;/p&gt;

&lt;p&gt;In my code, I use bar (or whatever the real thing is) as source of sequence of functions. The sole reference to bar is needed to trigger this issue. I believe that bar is not being fully evaluated here and thus no infinite loop. If I try to print it, yes, it will ultimately fail.&lt;/p&gt;
</comment>
                    <comment id="31198" author="praki" created="Sat, 1 Jun 2013 21:04:11 -0500"  >&lt;p&gt;Having thought about this a bit more, it seems to me that when bar is annotated with const, the compiler is trying to evaluate the associated expression which exhausts the heap? I have never looked at the compiler source and thus not sure if this is what is happening. If it is, then it seems like one should be really careful when adding metadata.&lt;/p&gt;

&lt;p&gt;That still leaves the other question about the namespace requirement to cause memory exhaustion. I quite distinctly recall having to add the namespace when trying to come up with minimal test case to reproduce the bug.&lt;/p&gt;

&lt;p&gt;If you think this is really user error, I would accept it &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="31199" author="jafingerhut" created="Sun, 2 Jun 2013 04:56:38 -0500"  >&lt;p&gt;It is not just any old metadata that causes this issue, only :const metadata.  I tried testing with :const replaced with :dynamic and :private, and there was no problem.&lt;/p&gt;

&lt;p&gt;This might shed some light on the issue: &lt;a href=&quot;https://github.com/clojure/clojure/blob/master/changes.md#215-const-defs&quot;&gt;https://github.com/clojure/clojure/blob/master/changes.md#215-const-defs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It appears that ^:const is causing the compiler to evaluate the value at compile time.  The value in your example is unbounded, so that can never complete.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="12020" name="fubar.clj" size="127" author="praki" created="Fri, 31 May 2013 21:33: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>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1212] Silent truncation/downcasting of primitive type on reflection call to overloaded method (Math/abs)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1212</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I realise relying on reflection when calling these kinds of methods isn&apos;t a great idea performance-wise, but it shouldn&apos;t lead to incorrect or dangerous behaviour.&lt;/p&gt;

&lt;p&gt;Here it seems to trigger a silent downcast of the input longs, giving a truncated integer output:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defn f &lt;span class=&quot;error&quot;&gt;&amp;#91;a b&amp;#93;&lt;/span&gt; (Math/abs (- a b)))&lt;br/&gt;
Reflection warning, NO_SOURCE_PATH:1:15 - call to abs can&apos;t be resolved.&lt;br/&gt;
#&apos;user/f&lt;br/&gt;
user&amp;gt; (f 1000000000000 2000000000000)&lt;br/&gt;
727379968&lt;br/&gt;
user&amp;gt; (class (f 1000000000000 2000000000000))&lt;br/&gt;
java.lang.Integer&lt;br/&gt;
user&amp;gt; (defn f &lt;span class=&quot;error&quot;&gt;&amp;#91;^long a ^long b&amp;#93;&lt;/span&gt; (Math/abs (- a b)))&lt;br/&gt;
#&apos;user/f&lt;br/&gt;
user&amp;gt; (f 1000000000000 2000000000000)&lt;br/&gt;
1000000000000&lt;br/&gt;
user&amp;gt; (class (f 1000000000000 2000000000000))&lt;br/&gt;
java.lang.Long&lt;/p&gt;</description>
                <environment>Clojure 1.5.1&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)</environment>
            <key id="16206">CLJ-1212</key>
            <summary>Silent truncation/downcasting of primitive type on reflection call to overloaded method (Math/abs)</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="matthjw">Matthew Willson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 May 2013 12:47:26 -0500</created>
                <updated>Wed, 29 May 2013 15:19:00 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31180" author="matthjw" created="Tue, 28 May 2013 12:50:57 -0500"  >&lt;p&gt;For an even simpler way to replicate the issue:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (#(Math/abs %) 1000000000000)&lt;br/&gt;
Reflection warning, NO_SOURCE_PATH:1:3 - call to abs can&apos;t be resolved.&lt;br/&gt;
727379968&lt;/p&gt;</comment>
                    <comment id="31181" author="jafingerhut" created="Tue, 28 May 2013 13:36:51 -0500"  >&lt;p&gt;I was able to reproduce the behavior you see with these Java 6 JVMs on Ubuntu 12.04.2:&lt;/p&gt;

&lt;p&gt;java version &quot;1.6.0_27&quot;&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)&lt;/p&gt;

&lt;p&gt;java version &quot;1.6.0_45&quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)&lt;/p&gt;

&lt;p&gt;However, I tried two Java 7 JVMs, and it gave the following behavior which looks closer to what you would hope for.  I do not know what is the precise difference between Java 6 and Java 7 that leads to this behavior difference, but this is some evidence that this has something to do with Java 6 vs. Java 7.&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (set! &lt;b&gt;warn-on-reflection&lt;/b&gt; true)&lt;br/&gt;
true&lt;br/&gt;
user=&amp;gt; (defn f &lt;span class=&quot;error&quot;&gt;&amp;#91;a b&amp;#93;&lt;/span&gt; (Math/abs (- a b)))&lt;br/&gt;
Reflection warning, NO_SOURCE_PATH:1:15 - call to abs can&apos;t be resolved.&lt;br/&gt;
#&apos;user/f&lt;br/&gt;
user=&amp;gt; (f 1000000000000 2000000000000)&lt;br/&gt;
1000000000000&lt;br/&gt;
user=&amp;gt; (class (f 1000000000000 2000000000000))&lt;br/&gt;
java.lang.Long&lt;/p&gt;

&lt;p&gt;Above behavior observed with Clojure 1.5.1 on these JVMs:&lt;/p&gt;

&lt;p&gt;Ubuntu 12.04.2 plus this JVM:&lt;br/&gt;
java version &quot;1.7.0_21&quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)&lt;/p&gt;

&lt;p&gt;Mac OS X 10.8.3 plus this JVM:&lt;br/&gt;
java version &quot;1.7.0_15&quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)&lt;/p&gt;</comment>
                    <comment id="31182" author="matthjw" created="Wed, 29 May 2013 05:17:01 -0500"  >&lt;p&gt;Ah, interesting.&lt;br/&gt;
Maybe it&apos;s a difference in the way the reflection API works in java 7?&lt;/p&gt;

&lt;p&gt;Here&apos;s the bytecode generated incase anyone&apos;s curious:&lt;/p&gt;

&lt;p&gt;public java.lang.Object invoke(java.lang.Object);&lt;br/&gt;
  Code:&lt;br/&gt;
   0:	ldc	#14; //String java.lang.Math&lt;br/&gt;
   2:	invokestatic	#20; //Method java/lang/Class.forName:(Ljava/lang/String;)Ljava/lang/Class;&lt;br/&gt;
   5:	ldc	#22; //String abs&lt;br/&gt;
   7:	iconst_1&lt;br/&gt;
   8:	anewarray	#24; //class java/lang/Object&lt;br/&gt;
   11:	dup&lt;br/&gt;
   12:	iconst_0&lt;br/&gt;
   13:	aload_1&lt;br/&gt;
   14:	aconst_null&lt;br/&gt;
   15:	astore_1&lt;br/&gt;
   16:	aastore&lt;br/&gt;
   17:	invokestatic	#30; //Method clojure/lang/Reflector.invokeStaticMethod:(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;&lt;br/&gt;
   20:	areturn&lt;/p&gt;</comment>
                    <comment id="31183" author="matthjw" created="Wed, 29 May 2013 05:20:49 -0500"  >&lt;p&gt;Just an idea (and maybe this is what&apos;s happening under java 7?) but given it&apos;s a static method and all available overloaded variants are presumably known at compile time, perhaps it could generate code along the lines of:&lt;/p&gt;

&lt;p&gt;(cond&lt;br/&gt;
  (instance? Long x) (Math/abs (long x))&lt;br/&gt;
  (instance? Integer x) (Math/abs (int x))&lt;br/&gt;
  ;; ...&lt;br/&gt;
  )&lt;/p&gt;</comment>
                    <comment id="31184" author="jafingerhut" created="Wed, 29 May 2013 15:19:00 -0500"  >&lt;p&gt;In Reflector.java method invokeStaticMethod(Class c, String methodName, Object[] args) there is a call to getMethods() followed by a call to invokeMatchingMethod().  getMethods() returns the 4 java.lang.Math/abs methods in different orders on Java 6 and 7, causing invokeMatchingMethod() to pick a different one on the two JVMs:&lt;/p&gt;

&lt;p&gt;java version &quot;1.6.0_39&quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (pprint (seq (clojure.lang.Reflector/getMethods java.lang.Math 1 &quot;abs&quot; true)))&lt;br/&gt;
(#&amp;lt;Method public static int java.lang.Math.abs(int)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static long java.lang.Math.abs(long)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static float java.lang.Math.abs(float)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static double java.lang.Math.abs(double)&amp;gt;)&lt;br/&gt;
nil&lt;/p&gt;


&lt;p&gt;java version &quot;1.7.0_21&quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (pprint (seq (clojure.lang.Reflector/getMethods java.lang.Math 1 &quot;abs&quot; true)))&lt;br/&gt;
(#&amp;lt;Method public static double java.lang.Math.abs(double)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static float java.lang.Math.abs(float)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static long java.lang.Math.abs(long)&amp;gt;&lt;br/&gt;
 #&amp;lt;Method public static int java.lang.Math.abs(int)&amp;gt;)&lt;br/&gt;
nil&lt;/p&gt;


&lt;p&gt;That might be a sign of undesirable behavior in invokeMatchingMethod() that is too dependent upon the order of methods given to it.&lt;/p&gt;

&lt;p&gt;As you mention, type hinting is good for avoiding the significant performance hit of reflection.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

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

<item>
            <title>[CLJ-1207] Importing a class that does not exist fails to report the name of the class that did not exist</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1207</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Pop quiz: What Java class is missing from the classpath?&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;java.lang.NoClassDefFoundError: Could not initialize class com.annadaletech.nexus.util.logging__init
 at java.lang.Class.forName0 (Class.java:-2)
    java.lang.Class.forName (Class.java:264)
    clojure.lang.RT.loadClassForName (RT.java:2098)
    clojure.lang.RT.load (RT.java:430)
    clojure.lang.RT.load (RT.java:411)
    clojure.core$load$fn__5018.invoke (core.clj:5530)
    clojure.core$load.doInvoke (core.clj:5529)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$load_one.invoke (core.clj:5336)
    clojure.core$load_lib$fn__4967.invoke (core.clj:5375)
    clojure.core$load_lib.doInvoke (core.clj:5374)
    clojure.lang.RestFn.applyTo (RestFn.java:142)
    clojure.core$apply.invoke (core.clj:619)
    clojure.core$load_libs.doInvoke (core.clj:5413)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:619)
    clojure.core$require.doInvoke (core.clj:5496)
    clojure.lang.RestFn.invoke (RestFn.java:512)
    novate.console.app$eval1736$loading__4910__auto____1737.invoke (app.clj:1)
    novate.console.app$eval1736.invoke (app.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6619)
    clojure.lang.Compiler.eval (Compiler.java:6608)
    clojure.lang.Compiler.load (Compiler.java:7064)
    user$eval1732.invoke (NO_SOURCE_FILE:1)
    clojure.lang.Compiler.eval (Compiler.java:6619)
    clojure.lang.Compiler.eval (Compiler.java:6582)
    clojure.core$eval.invoke (core.clj:2852)
    clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259)
    clojure.main$repl$read_eval_print__6588.invoke (main.clj:259)
    clojure.main$repl$fn__6597.invoke (main.clj:277)
    clojure.main$repl.doInvoke (main.clj:277)
    clojure.lang.RestFn.invoke (RestFn.java:1096)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__584.invoke (interruptible_eval.clj:56)
    clojure.lang.AFn.applyToHelper (AFn.java:159)
    clojure.lang.AFn.applyTo (AFn.java:151)
    clojure.core$apply.invoke (core.clj:617)
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1788)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:41)
    clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__625$fn__628.invoke (interruptible_eval.clj:171)
    clojure.core$comp$fn__4154.invoke (core.clj:2330)
    clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__618.invoke (interruptible_eval.clj:138)
    clojure.lang.AFn.run (AFn.java:24)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
    java.lang.Thread.run (Thread.java:722)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;p&gt;Wait, I&apos;ll give you a hint:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(ns com.annadaletech.nexus.util.logging
  (:use [clojure.string :only [trim-newline]]
        [clojure.pprint :only [code-dispatch pprint with-pprint-dispatch *print-right-margin*]])
  (:import [java.io StringWriter]
           [org.slf4j MDC MarkerFactory Marker LoggerFactory]
           [java.util.concurrent.locks ReentrantLock]))

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

&lt;p&gt;Howard, could you give us a project.clj or better yet a github repository that recreates this issue?&lt;/p&gt;</comment>
                    <comment id="31082" author="hlewisship" created="Fri, 10 May 2013 16:51:24 -0500"  >&lt;p&gt;I&apos;ll see what I can do. Probably be next week. Thanks for looking at this.&lt;/p&gt;</comment>
                    <comment id="31162" author="gfredericks" created="Sun, 26 May 2013 08:20:55 -0500"  >&lt;p&gt;This reminds me of an issue with `lein run` that resulted from it trying to figure out whether you wanted to run a namespace or a java class:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/technomancy/leiningen/issues/1182&quot;&gt;https://github.com/technomancy/leiningen/issues/1182&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                        <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>hlewisship</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-1205] Update Maven build for Nexus 2.4</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1205</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;These additions to the build configuration are necessary to support changes to the Sonatype Nexus server at oss.sonatype.org, which we use to promote our build artifacts into the Maven Central Repository.&lt;/p&gt;

&lt;p&gt;See Sonatype&apos;s announcement at &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/lBpfII2u6vM/LQvr_rO5UGgJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/lBpfII2u6vM/LQvr_rO5UGgJ&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16155">CLJ-1205</key>
            <summary>Update Maven build for Nexus 2.4</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Apr 2013 20:29:15 -0500</created>
                <updated>Wed, 19 Jun 2013 10:51:27 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31311" author="stu" created="Wed, 19 Jun 2013 10:07:14 -0500"  >&lt;p&gt;Am I right in assuming that the only way we will know this works is by trying it in a release? &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="31312" author="stuart.sierra" created="Wed, 19 Jun 2013 10:51:27 -0500"  >&lt;p&gt;Yes.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11967" name="0001-nexus-2.4-releases.patch" size="2692" author="stuart.sierra" created="Mon, 22 Apr 2013 20:29:15 -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>
                                                                                        </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-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-1183] java interop - cannot call a final method on non-public superclass </title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1183</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;when trying to call a method on a concrete class that is defined as final on its super class that is not public, the runtime throws:&lt;/p&gt;

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Clojure failed.
[INFO] ------------------------------------------------------------------------
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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



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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;Were you interested in becoming a contributor?&lt;/p&gt;</comment>
                    <comment id="29276" author="ezyang" created="Mon, 27 Aug 2012 21:24:13 -0500"  >&lt;p&gt;Sure, although the patch attached is emphatically not the one you want to actually applying, since it only band-aids the problem.&lt;/p&gt;</comment>
                    <comment id="31151" author="jafingerhut" created="Fri, 24 May 2013 13:21:28 -0500"  >&lt;p&gt;I am not sure, but this ticket may be related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1171&quot; title=&quot;Compiler macro for clojure.core/instance? disregards lexical shadows on class names&quot;&gt;CLJ-1171&lt;/a&gt;.  At least, there the issue was a global name &lt;b&gt;not&lt;/b&gt; being shadowed by a local name bound with let.  That seems similar to this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11340" name="collision-workaround.patch" size="1128" author="ezyang" created="Thu, 21 Jun 2012 11:01:06 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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


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

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

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


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

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

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

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

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

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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-887] Error when calling primitive functions with destructuring in the arg vector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-887</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If one defines a primitive-taking function with destructuring, calling that function will result in a ClassCastException, IFF the primitive return-type hint is present.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Clojure 1.4.0-master-SNAPSHOT
user=&amp;gt; (defn foo [[a b] ^long x ^long y] 0)
#&apos;user/foo
user=&amp;gt; (foo [1 2] 3 4)
0
user=&amp;gt; (defn foo ^long [[a b] ^long x ^long y] 0)
#&apos;user/foo
user=&amp;gt; (foo [1 2] 3 4)
ClassCastException user$foo cannot be cast to clojure.lang.IFn$OLLL  user/eval9 (NO_SOURCE_FILE:4)
user=&amp;gt; (pst)
ClassCastException user$foo cannot be cast to clojure.lang.IFn$OLLL
	user/eval9 (NO_SOURCE_FILE:4)
	clojure.lang.Compiler.eval (Compiler.java:6493)
	clojure.lang.Compiler.eval (Compiler.java:6459)
	clojure.core/eval (core.clj:2796)
	clojure.main/repl/read-eval-print--5967 (main.clj:244)
	clojure.main/repl/fn--5972 (main.clj:265)
	clojure.main/repl (main.clj:265)
	clojure.main/repl-opt (main.clj:331)
	clojure.main/main (main.clj:427)
	clojure.lang.Var.invoke (Var.java:397)
	clojure.lang.Var.applyTo (Var.java:518)
	clojure.main.main (main.java:37)
nil
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15038">CLJ-887</key>
            <summary>Error when calling primitive functions with destructuring in the arg vector</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Nov 2011 15:46:47 -0600</created>
                <updated>Tue, 29 Nov 2011 15:48:19 -0600</updated>
                                    <version>Release 1.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

&lt;p&gt;Rahul, are you planning to sign a Clojure Contributor Agreement?  Without that, this code cannot be included in Clojure, unless a contributor reimplements it on their own.&lt;/p&gt;</comment>
                    <comment id="27985" author="jafingerhut" created="Fri, 23 Mar 2012 01:14:18 -0500"  >&lt;p&gt;In private communication with the patch author today, he expressed an interest in submitting a signed CA so this patch can be considered for inclusion in Clojure.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10718" name="diff.patch" size="4785" author="rahulpilani" created="Sun, 27 Nov 2011 15:56:51 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-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-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-864] defrecord positional arity factory fn should have an inline version that calls the record constructor</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-864</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;defrecord positional arity factory fn should have an inline version that calls the record constructor&lt;/p&gt;</description>
                <environment></environment>
            <key id="14900">CLJ-864</key>
            <summary>defrecord positional arity factory fn should have an inline version that calls the record constructor</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 03:17:55 -0500</created>
                <updated>Sun, 26 May 2013 15:39:07 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31173" author="gfredericks" created="Sun, 26 May 2013 15:39:07 -0500"  >&lt;p&gt;I had the idea recently that the factory fn was useful partly for being a redefinable var, e.g. that you could wrap with contracts or anything else. This idea would preclude that.&lt;/p&gt;

&lt;p&gt;It makes sense though if the only purpose of &lt;tt&gt;-&amp;gt;Foo&lt;/tt&gt; is to avoid having to &lt;tt&gt;:import&lt;/tt&gt; something.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

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

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

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

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

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

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Perhaps the compiler should elide &lt;tt&gt;:dynamic&lt;/tt&gt; from the metadata map available at runtime, since it has served its purpose.&lt;/li&gt;
	&lt;li&gt;Perhaps Clojure should supply the function &lt;tt&gt;dynamic?&lt;/tt&gt;.
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(defn dynamic? [^clojure.lang.Var v] (.isDynamic v))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


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

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

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

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

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

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

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

<item>
            <title>[CLJ-792] Refactor method resolution code out of Compiler and into Reflector</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-792</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Issues:&lt;/p&gt;

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



&lt;p&gt;By consolidating the duplicated code, moving the reflection-related parts into Reflector, and providing a straightforward API, it should be easier to read and understand the method resolution process.  Further, improvements to (e.g., &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-445&quot; title=&quot;Method/Constructor resolution does not factor in widening conversion of primitive args&quot;&gt;CLJ-445&lt;/a&gt;) the mechanism for reflecting on class members can largely be isolated from the Compiler.  And the few points of coordination (e.g., Compiler emitting same arg and return types as Reflector does when invoking) can be clearly identified and documented.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14423">CLJ-792</key>
            <summary>Refactor method resolution code out of Compiler and into Reflector</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ataggart">Alexander Taggart</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 May 2011 14:14:39 -0500</created>
                <updated>Mon, 20 Feb 2012 13:11:06 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="27752" author="stuart.sierra" created="Fri, 17 Feb 2012 14:28:49 -0600"  >&lt;p&gt;Patch does not apply as of commit f5bcf64.&lt;/p&gt;</comment>
                    <comment id="27757" author="ataggart" created="Fri, 17 Feb 2012 15:14:47 -0600"  >&lt;p&gt;Yeah, year-old patches tend to do that.&lt;/p&gt;</comment>
                    <comment id="27777" author="jafingerhut" created="Mon, 20 Feb 2012 13:11:06 -0600"  >&lt;p&gt;I don&apos;t know if this is helpful or not, but this updated version of Alexander&apos;s patch applies cleanly to latest Clojure head as of Feb 20, 2012.  It compiles, but does not pass ant test.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10931" name="clj-792-reorg-reflector-patch2.txt" size="74113" author="jafingerhut" created="Mon, 20 Feb 2012 13:11:06 -0600" />
                    <attachment id="10226" name="reorg-reflector.patch" size="73345" author="ataggart" created="Wed, 11 May 2011 14:14:40 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-790] Primitive type hints on function names should print error message</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-790</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Functions returning primitives are hinted with metadata on the argument list, not on the function name.  Using a primitive type hint on a function name should print an error message.&lt;/p&gt;

&lt;p&gt;Currently, misplaced primitive hints are read without error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14421">CLJ-790</key>
            <summary>Primitive type hints on function names should print error message</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="alan@thinkrelevance.com">Alan Dipert</assignee>
                                <reporter username="alan@thinkrelevance.com">Alan Dipert</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 May 2011 12:11:37 -0500</created>
                <updated>Tue, 10 May 2011 12:11:37 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

&lt;p&gt;And use that code via another namespace:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(ns test-type-user
  (:use [type-test :only (isa-foo)])
  (:import [type-test TypeTest]))

(isa-foo (TypeTest.))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(defn test-case ^double [^long i ^double d1 ^double d2]
  (case (int i)
    0 d1
    d2))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;now emits as&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 0  lload_1 [i]
 1  invokestatic clojure.lang.RT.intCast(long) : int [67]
 4  istore 7 [G__7903] // let-bound expression
 6  iload 7 [G__7903]
 8  tableswitch default: 32
      case 0: 28
28  dload_3 [d2]
29  goto 34
32  dload 5 [arg2]
34  dreturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or if the int cast of the expression is omitted:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 0  lload_1 [i]
 1  lstore 7 [G__7903] // let-bound expression
 3  lload 7 [G__7903]
 5  l2i
 6  tableswitch default: 35
      case 0: 24
24  lconst_0           // match, verify long expr wasn&apos;t truncated
25  lload 7 [G__7903]
27  lcmp
28  ifne 35
31  dload_3 [d2]
32  goto 37
35  dload 5 [arg2]
37  dreturn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

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

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

&lt;p&gt;Generates the following warnings:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;recur arg for primitive local: b is not matching primitive, had: Object, needed: long
Auto-boxing loop arg: b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

&lt;p&gt;so&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(fn [] (loop [b 0] (recur (loop [a 1] a))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;gets converted into&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(fn [] (loop [b 0] (recur ((fn [] (loop [a 1] a))))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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


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

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


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

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

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

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

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

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

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

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

&lt;p&gt;Ancillary benefits of fixing:&lt;br/&gt;
It would also reduce the amount of method overloading, e.g., RT.intCast(char), intCast(byte), intCast(short), could all be removed, since such calls would pass to RT.intCast(int).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13842">CLJ-445</key>
            <summary>Method/Constructor resolution does not factor in widening conversion of primitive args</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ataggart">Alexander Taggart</assignee>
                                <reporter username="ataggart">Alexander Taggart</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Sep 2010 01:02:00 -0500</created>
                <updated>Mon, 20 Feb 2012 14:04:42 -0600</updated>
                                                    <fixVersion>Reviewed Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="24255" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/445&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/445&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
fixbug445.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/b6gDSUZOur36b9eJe5cbCb/download/b6gDSUZOur36b9eJe5cbCb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/b6gDSUZOur36b9eJe5cbCb/download/b6gDSUZOur36b9eJe5cbCb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="24256" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;ataggart said: [&lt;a href=&quot;file:b6gDSUZOur36b9eJe5cbCb&quot;&gt;file:b6gDSUZOur36b9eJe5cbCb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="24257" author="importer" created="Sat, 23 Oct 2010 18:43:00 -0500"  >&lt;p&gt;ataggart said: Also fixes #446.&lt;/p&gt;</comment>
                    <comment id="26001" author="stu" created="Fri, 3 Dec 2010 12:50:23 -0600"  >&lt;p&gt;The patch is causing a test failure &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;[java] Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.IllegalArgumentException: 
     More than one matching method found: equiv, compiling:(clojure/pprint/cl_format.clj:428)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Can you take a look?&lt;/p&gt;</comment>
                    <comment id="26192" author="stu" created="Fri, 28 Jan 2011 12:30:18 -0600"  >&lt;p&gt;The failing test happens when trying to find the correct equiv for signature &lt;tt&gt;(Number, long)&lt;/tt&gt;. Is the compiler wrong to propose this signature, or is the resolution method wrong in not having an answer? (It thinks two signatures are tied: &lt;tt&gt;(Object, long)&lt;/tt&gt; and &lt;tt&gt;(Number, Number)&lt;/tt&gt;.)&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Exception in thread &lt;span class=&quot;code-quote&quot;&gt;&quot;main&quot;&lt;/span&gt; java.lang.IllegalArgumentException: More than one matching method found: equiv, compiling:(clojure/pprint/cl_format.clj:428)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6062)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6050)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.access$100(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:35)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5492)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2372)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$InvokeExpr.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:3277)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6057)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2385)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$IfExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:2385)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$LetExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5527)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$BodyExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5231)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$FnMethod.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:4667)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$FnExpr.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:3397)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6053)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6043)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.access$100(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:35)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$DefExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:480)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5866)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyze(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:5827)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.eval(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6114)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.load(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6545)
	at clojure.lang.RT.loadResourceScript(RT.java:340)
	at clojure.lang.RT.loadResourceScript(RT.java:331)
	at clojure.lang.RT.load(RT.java:409)
	at clojure.lang.RT.load(RT.java:381)
	at clojure.core$load$fn__1427.invoke(core.clj:5308)
	at clojure.core$load.doInvoke(core.clj:5307)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.pprint$eval3969.invoke(pprint.clj:46)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.eval(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6110)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.load(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6545)
	at clojure.lang.RT.loadResourceScript(RT.java:340)
	at clojure.lang.RT.loadResourceScript(RT.java:331)
	at clojure.lang.RT.load(RT.java:409)
	at clojure.lang.RT.load(RT.java:381)
	at clojure.core$load$fn__1427.invoke(core.clj:5308)
	at clojure.core$load.doInvoke(core.clj:5307)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.core$load_one.invoke(core.clj:5132)
	at clojure.core$load_lib.doInvoke(core.clj:5169)
	at clojure.lang.RestFn.applyTo(RestFn.java:143)
	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:77)
	at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
	at clojure.core$apply.invoke(core.clj:602)
	at clojure.core$load_libs.doInvoke(core.clj:5203)
	at clojure.lang.RestFn.applyTo(RestFn.java:138)
	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:77)
	at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
	at clojure.core$apply.invoke(core.clj:604)
	at clojure.core$use.doInvoke(core.clj:5283)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.main$repl.doInvoke(main.clj:196)
	at clojure.lang.RestFn.invoke(RestFn.java:422)
	at clojure.main$repl_opt.invoke(main.clj:267)
	at clojure.main$main.doInvoke(main.clj:362)
	at clojure.lang.RestFn.invoke(RestFn.java:409)
	at clojure.lang.Var.invoke(Var.java:401)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.Var.applyTo(Var.java:518)
	at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: More than one matching method found: equiv
	at clojure.lang.Reflector.getMatchingParams(Reflector.java:639)
	at clojure.lang.Reflector.getMatchingParams(Reflector.java:578)
	at clojure.lang.Reflector.getMatchingMethod(Reflector.java:569)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$StaticMethodExpr.&amp;lt;init&amp;gt;(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:1439)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;$HostExpr$Parser.parse(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:896)
	at clojure.lang.&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.analyzeSeq(&lt;span class=&quot;code-object&quot;&gt;Compiler&lt;/span&gt;.java:6055)
	... 115 more&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="26214" author="ataggart" created="Tue, 8 Feb 2011 18:27:03 -0600"  >&lt;p&gt;In working on implementing support for vararg methods, I found a number of flaws with the previous solutions.  Please disregard them.&lt;/p&gt;

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

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

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

&lt;p&gt;Patch corrected to contain clojure.test-clojure.reflector.&lt;/p&gt;</comment>
                    <comment id="26300" author="stu" created="Fri, 11 Mar 2011 10:30:59 -0600"  >&lt;p&gt;Rich: I verified that the patch applied but reviewed only briefly, knowing you will want to go over this one closely.&lt;/p&gt;</comment>
                    <comment id="26301" author="stu" created="Fri, 11 Mar 2011 10:55:21 -0600"  >&lt;p&gt;After applying this patch, I am getting method missing errors:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;java.lang.NoSuchMethodError: clojure.lang.Numbers.lt(JLjava/lang/&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;;)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                        <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;Chas, I&apos;m kicking back to you, but I guess if you don&apos;t want it you can reassign to &quot;nobody&quot;.&lt;/p&gt;</comment>
                    <comment id="22876" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)&lt;/p&gt;</comment>
                    <comment id="22877" author="importer" created="Tue, 24 Aug 2010 00:45:00 -0500"  >&lt;p&gt;shoover said: I&apos;d like to suggest an alternate approach. There are already well-defined and intuitive ways to block on agents and futures. Why not deprecate shutdown-agents and force users to call await and deref if they really want to block? In the pmap situation one would have to evaluate the pmap form.&lt;/p&gt;

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

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

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

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

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

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

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

&lt;p&gt;People send messages to the Clojure Google group every couple of months hitting this issue, and one even filed &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-959&quot; title=&quot;after call to clojure.java.shell/sh, jvm won&amp;#39;t exit&quot;&gt;CLJ-959&lt;/a&gt; because of hitting it.  I have updated the examples on ClojureDocs.org for future, and also for pmap and clojure.java.shell/sh which use future in their implementations, to warn people about this and explain that they should call (shutdown-agents), but making it unnecessary to call shutdown-agents would be even better, at least as the default behavior.  It sounds fine to me to provide a way for experts on thread behavior to change that default behavior if they need to.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                        <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[CLJ-2] Scopes</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-2</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Add the scope system for dealing with resource lifetime management&lt;/p&gt;</description>
                <environment></environment>
            <key id="13399">CLJ-2</key>
            <summary>Scopes</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="richhickey">Rich Hickey</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Jun 2009 13:35:00 -0500</created>
                <updated>Thu, 8 Mar 2012 04:01:38 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="22464" author="importer" created="Tue, 24 Aug 2010 11:43:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/2&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/2&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="22465" author="importer" created="Tue, 24 Aug 2010 11:43:00 -0500"  >&lt;p&gt;richhickey said: Updating tickets (#8, #42, #113, #2, #20, #94, #96, #104, #119, #124, #127, #149, #162)&lt;/p&gt;</comment>
                    <comment id="26566" author="stu" created="Tue, 12 Jul 2011 08:26:23 -0500"  >&lt;p&gt;Patch demonstrates idea, not ready for prime time.&lt;/p&gt;</comment>
                    <comment id="27496" author="tsdh" created="Fri, 23 Dec 2011 07:37:53 -0600"  >&lt;p&gt;I think the decision of having to specify either a Closeable resource or a close function for an existing non-Closeable resource in with-open is quite awkward, because they have completely different meaning.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  (let [foo (open-my-custom-resource &quot;foo.bar&quot;)]
    (with-open [r (reader &quot;foo.txt&quot;)
                foo #(.terminate foo)]
      (do-stuff r foo)))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;p&gt;That said, Scopes can still be useful, but I&apos;d vote for handling the &quot;how should that resource be closed&quot; question by a protocol.  Then the with-open helper can simply add&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(swap! *scope* conj (fn [] (clojure.core.protocols/close ~(bindings 0))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;and cleanup-scope only needs to apply each fn without having to distinguish Closeables from fns.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10275" name="scopes-spike.patch" size="4258" author="stu" created="Tue, 12 Jul 2011 08:26:23 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1220] instance? should either verify all operands or throw if more than one passed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1220</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(instance? Number 1)        ;; =&amp;gt; true&lt;br/&gt;
(instance? Number &quot;a&quot;)      ;; =&amp;gt; false&lt;br/&gt;
(instance? Number 1 &quot;a&quot;)    ;; =&amp;gt; true&lt;/p&gt;

&lt;p&gt;I find behavior of the last expression very surprising, I would&lt;br/&gt;
expect it to either desugar to logical &quot;and&quot; over all operands:&lt;/p&gt;

&lt;p&gt;(and (instance? Number 1) (instance? Number &quot;a&quot;) ...)&lt;/p&gt;

&lt;p&gt;Or throw &quot;Wrong number of args (3) passed to instance?&quot; exception.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16243">CLJ-1220</key>
            <summary>instance? should either verify all operands or throw if more than one passed</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="gozala">Irakli Gozalishvili</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 13:56:04 -0500</created>
                <updated>Wed, 19 Jun 2013 13:56:04 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1218] mapcat is not very lazy</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1218</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The following expression prints &lt;tt&gt;1234&lt;/tt&gt; and returns &lt;tt&gt;1&lt;/tt&gt;:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(first (mapcat #(&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (print %) [%]) &apos;(1 2 3 4 5 6 7)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason is that &lt;tt&gt;(apply concat args)&lt;/tt&gt; is not maximally lazy in its arguments, and indeed will realize the first four before returning the first item. This in turn is essentially unavoidable for a variadic &lt;tt&gt;concat&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This could either be fixed just in &lt;tt&gt;mapcat&lt;/tt&gt;, or by adding a new function (to &lt;tt&gt;clojure.core&lt;/tt&gt;?) that is a non-variadic equivalent to &lt;tt&gt;concat&lt;/tt&gt;, and reimplementing &lt;tt&gt;mapcat&lt;/tt&gt; with it:&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 join
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Lazily concatenates a sequence-of-sequences into a flat sequence.&quot;&lt;/span&gt;
  [s]
  (lazy-seq (concat (first s) (concats (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; s)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="16232">CLJ-1218</key>
            <summary>mapcat is not very lazy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Sun, 16 Jun 2013 22:10:34 -0500</created>
                <updated>Mon, 17 Jun 2013 07:54:44 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31288" author="gfredericks" created="Mon, 17 Jun 2013 07:54:44 -0500"  >&lt;p&gt;I realized that &lt;tt&gt;concat&lt;/tt&gt; could actually be made lazier without changing its semantics, if it had a single &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt;&lt;/tt&gt; clause that was then implemented similarly to &lt;tt&gt;join&lt;/tt&gt; above.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-1215] Mention where to position docstring when using pre/postconditions on the Special Forms page</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1215</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The description of pre- and post-conditions doesn&apos;t mention where docstring should be when using them. Placing it wrong will lead to the conditions to be ignored.&lt;/p&gt;

&lt;p&gt;At &lt;a href=&quot;http://clojure.org/Special%20Forms--(fn%20name?%20&quot;&gt;http://clojure.org/Special%20Forms--(fn%20name?%20&lt;/a&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;params*%20&amp;#93;&lt;/span&gt;%20condition-map?%20exprs*), change&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(fn name? [params* ] condition-map? exprs*)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(fn name? [params* ] condition-map? docstring? exprs*)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or at least mention it in the description or use it in the example.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;</description>
                <environment></environment>
            <key id="16220">CLJ-1215</key>
            <summary>Mention where to position docstring when using pre/postconditions on the Special Forms page</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="jakubholynet">Jakub Holy</reporter>
                        <labels>
                        <label>documentation</label>
                    </labels>
                <created>Fri, 7 Jun 2013 03:14:24 -0500</created>
                <updated>Fri, 7 Jun 2013 03:14:24 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1213] consistency with def and Unbound</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1213</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In this example I&apos;d expect `b` to return `Unbound` for consistency.&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.5.1
user=&amp;gt; (def a &lt;span class=&quot;code-quote&quot;&gt;&quot;MyA&quot;&lt;/span&gt;)
#&apos;user/a
user=&amp;gt; (def a &lt;span class=&quot;code-quote&quot;&gt;&quot;MyA2&quot;&lt;/span&gt;)
#&apos;user/a
user=&amp;gt; (def b &lt;span class=&quot;code-quote&quot;&gt;&quot;MyB&quot;&lt;/span&gt;)
#&apos;user/b
user=&amp;gt; (def b) ;; unbound b
#&apos;user/b
user=&amp;gt; (def c) ;; unbound c
#&apos;user/c
user=&amp;gt; a
&lt;span class=&quot;code-quote&quot;&gt;&quot;MyA2&quot;&lt;/span&gt;
user=&amp;gt; b
&lt;span class=&quot;code-quote&quot;&gt;&quot;MyB&quot;&lt;/span&gt;
user=&amp;gt; c
#&amp;lt;Unbound Unbound: #&apos;user/c&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="16208">CLJ-1213</key>
            <summary>consistency with def and Unbound</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="trevor">Trevor Wennblom</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 May 2013 14:47:58 -0500</created>
                <updated>Wed, 29 May 2013 14:47:58 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1210] error message for (clojure.java.io/reader nil) &#8212; consistency for use with io/resource</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1210</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This seems to a common idiom:&lt;/p&gt;

&lt;p&gt;    (clojure.java.io/reader (clojure.java.io/resource &quot;myfile&quot;))&lt;/p&gt;


&lt;p&gt;When a file is available these are the behaviors:&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/reader &quot;resources/myfile&quot;)&lt;br/&gt;
    #&amp;lt;BufferedReader java.io.BufferedReader@1f291df0&amp;gt;&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/resource &quot;myfile&quot;)&lt;br/&gt;
    #&amp;lt;URL &lt;a href=&quot;file:/project/resources/myfile&quot;&gt;file:/project/resources/myfile&lt;/a&gt;&amp;gt;&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/reader (clojure.java.io/resource &quot;myfile&quot;))&lt;br/&gt;
    #&amp;lt;BufferedReader java.io.BufferedReader@1db04f7c&amp;gt;&lt;/p&gt;


&lt;p&gt;If the file (resource) is unavailable:&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/reader &quot;resources/nofile&quot;)&lt;br/&gt;
    FileNotFoundException resources/nofile (No such file or directory)  java.io.FileInputStream.open (FileInputStream.java:-2)&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/resource &quot;nofile&quot;)&lt;br/&gt;
    nil&lt;/p&gt;

&lt;p&gt;    =&amp;gt; (clojure.java.io/reader (clojure.java.io/resource &quot;nofile&quot;))&lt;br/&gt;
    IllegalArgumentException No implementation of method: :make-reader of protocol: #&apos;clojure.java.io/IOFactory found for class: nil  clojure.core/-cache-protocol-fn (core_deftype.clj:541)&lt;/p&gt;


&lt;p&gt;The main enhancement request is to have a better error message from `(clojure.java.io/reader nil)`. I&apos;m not sure if io/resource should return something like &apos;resource &quot;nofile&quot; not found&apos; or if io/reader could add a more helpful suggestion.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16199">CLJ-1210</key>
            <summary>error message for (clojure.java.io/reader nil) &#8212; consistency for use with io/resource</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>
                    </labels>
                <created>Thu, 23 May 2013 17:59:08 -0500</created>
                <updated>Thu, 23 May 2013 17:59:08 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1206] &apos;eval&apos; of closures or fns with runtime metadata within a call expr yields &quot;No matching ctor found&quot; exceptions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1206</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I ran into some issues with &apos;eval&apos; when writing compilation strategies for Graph.  It seems these may have been known for some time &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;, but I couldn&apos;t find a ticket for them, so here we are.&lt;/p&gt;

&lt;p&gt;Clojure docs &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; say &quot;If the operator is not a special form or macro, the call is considered a function call. Both the operator and the operands (if any) are evaluated, from left to right,&quot;  and &quot;Any object other than those discussed above will evaluate to itself.&quot;  While bare fns do seem to evaluate to themselves in all cases, when in a call expression, the evaluation of the operator fails on fn objects that are closures or have run-time metadata applied:&lt;/p&gt;

&lt;p&gt;;; raw non-closures are fine&lt;br/&gt;
user&amp;gt; (eval (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (inc x))) &lt;br/&gt;
#&amp;lt;user$eval30559$fn_&lt;em&gt;30560 user$eval30559$fn&lt;/em&gt;_30560@354ee11c&amp;gt;&lt;/p&gt;

&lt;p&gt;;; raw closures are fine&lt;br/&gt;
user&amp;gt; (eval (let &lt;span class=&quot;error&quot;&gt;&amp;#91;y 1&amp;#93;&lt;/span&gt; (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (+ x y))))&lt;br/&gt;
#&amp;lt;user$eval30511$fn_&lt;em&gt;30512 user$eval30511$fn&lt;/em&gt;_30512@3bac3a34&amp;gt;&lt;/p&gt;

&lt;p&gt;;; non-closures in exprs are fine&lt;br/&gt;
user&amp;gt; (eval `(~(fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (inc x)) 1))&lt;br/&gt;
2&lt;/p&gt;

&lt;p&gt;;; but closures in exprs cause an error&lt;br/&gt;
user&amp;gt; (eval `(~(let &lt;span class=&quot;error&quot;&gt;&amp;#91;y 1&amp;#93;&lt;/span&gt; (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (+ x y))) 1))&lt;br/&gt;
IllegalArgumentException No matching ctor found for class user$eval30535$fn__30536  clojure.lang.Reflector.invokeConstructor (Reflector.java:163)&lt;/p&gt;

&lt;p&gt;;; as do fns with metadata in exprs&lt;br/&gt;
user&amp;gt; (eval `(~(with-meta (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (inc x)) {:x 1}) 1))&lt;br/&gt;
IllegalArgumentException No matching ctor found for class clojure.lang.AFunction$1  clojure.lang.Reflector.invokeConstructor (Reflector.java:163)&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://stackoverflow.com/a/11287181&quot;&gt;http://stackoverflow.com/a/11287181&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://clojure.org/evaluation&quot;&gt;http://clojure.org/evaluation&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16167">CLJ-1206</key>
            <summary>&apos;eval&apos; of closures or fns with runtime metadata within a call expr yields &quot;No matching ctor found&quot; exceptions</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Apr 2013 18:27:49 -0500</created>
                <updated>Sun, 28 Apr 2013 18:27:49 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-1201] There should also be writing in clojure.edn</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1201</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;In clojure.edn I see only &quot;read&quot; and &quot;read-string&quot;.&lt;/p&gt;

&lt;p&gt;For symmetry I expect &quot;write&quot; and &quot;write-string&quot; to be nearby. At first it could be just alias for &quot;pr&quot; and &quot;pr-str&quot;, but in furure they may limited version of &quot;pr&quot; which only produces valid input for clojure.edn/read.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16142">CLJ-1201</key>
            <summary>There should also be writing in clojure.edn</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="vi">Vitaly Shukela</reporter>
                        <labels>
                        <label>edn</label>
                    </labels>
                <created>Mon, 15 Apr 2013 08:20:01 -0500</created>
                <updated>Thu, 23 May 2013 17:56:23 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31136" author="jafingerhut" created="Thu, 23 May 2013 17:56:23 -0500"  >&lt;p&gt;Related clojure-dev message: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/fLJWh9A3OuA&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/fLJWh9A3OuA&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and enhancement proposal wiki page: &lt;a href=&quot;http://dev.clojure.org/display/design/Representing+EDN&quot;&gt;http://dev.clojure.org/display/design/Representing+EDN&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-1199] Record values are not &apos;eval&apos;uated, unlike values of PersistentMap:</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1199</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;m not sure if this is by design, but it caught me off guard.  &lt;/p&gt;

&lt;p&gt;user&amp;gt; (defrecord A &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt;)&lt;br/&gt;
user.A&lt;/p&gt;

&lt;p&gt;user&amp;gt; (eval (hash-map :x `long))&lt;br/&gt;
{:x #&amp;lt;core$long clojure.core$long@5de54eb7&amp;gt;}&lt;br/&gt;
user&amp;gt; (eval (-&amp;gt;A `long))&lt;br/&gt;
#user.A{:x clojure.core/long}&lt;br/&gt;
user&amp;gt; (eval (map-&amp;gt;A (hash-map :x `long)))&lt;br/&gt;
#user.A{:x clojure.core/long}&lt;/p&gt;

&lt;p&gt;and in case it matters, here&apos;s a simplified version of the real use case where this came up, with no eval &amp;#8211; just a macro:&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defmacro munge-meta1 &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (assoc x :schema (-&amp;gt;A (:schema (meta x)))))&lt;br/&gt;
#&apos;user/munge-meta1&lt;br/&gt;
user&amp;gt; (munge-meta1 ^{:schema long} {})&lt;br/&gt;
{:schema #user.A{:x long}}&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defmacro munge-meta2 &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (assoc x :schema (hash-map :x (:schema (meta x)))))&lt;br/&gt;
#&apos;user/munge-meta2&lt;br/&gt;
user&amp;gt; (munge-meta2 ^{:schema long} {})&lt;br/&gt;
{:schema {:x #&amp;lt;core$long clojure.core$long@5de54eb7&amp;gt;}}&lt;/p&gt;

&lt;p&gt;This seems to be fixed by moving the record creation post-evaluation, so it&apos;s not a big deal, just surprising (plus I haven&apos;t yet convinced myself that this will always work if the user&apos;s schema itself contains record-creating forms, although it seems to work OK):&lt;/p&gt;

&lt;p&gt;user&amp;gt; (defmacro munge-meta1 &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (assoc x :schema `(-&amp;gt;A ~(:schema (meta x)))))&lt;br/&gt;
#&apos;user/munge-meta1&lt;br/&gt;
user&amp;gt; (munge-meta1 ^{:schema long} {})&lt;br/&gt;
{:schema #user.A{:x #&amp;lt;core$long clojure.core$long@5de54eb7&amp;gt;}}&lt;/p&gt;

&lt;p&gt;I brought this up on the mailing list here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/UgD35E1RQTo&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/UgD35E1RQTo&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16139">CLJ-1199</key>
            <summary>Record values are not &apos;eval&apos;uated, unlike values of PersistentMap:</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Apr 2013 00:29:58 -0500</created>
                <updated>Sat, 13 Apr 2013 00:29:58 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1198] Apply metadata to primitive fns causes them to lose their primitive-ness</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1198</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;user&amp;gt; (def f (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;^long x&amp;#93;&lt;/span&gt; x))&lt;br/&gt;
#&apos;user/f&lt;br/&gt;
user&amp;gt; (.invokePrim (with-meta f {}) 1)&lt;br/&gt;
IllegalArgumentException No matching method found: invokePrim for class clojure.lang.AFunction$1  clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:53)&lt;br/&gt;
user&amp;gt; (contains? (ancestors (class f)) clojure.lang.IFn$LO)&lt;br/&gt;
true&lt;br/&gt;
user&amp;gt; (contains? (ancestors (class (with-meta f {}))) clojure.lang.IFn$LO)&lt;br/&gt;
false&lt;/p&gt;

&lt;p&gt;We&apos;re working on libraries that use metadata on functions to track information about their arguments (schemata, etc), and this currently blocks us from fully supporting primitive fns. &lt;/p&gt;</description>
                <environment></environment>
            <key id="16138">CLJ-1198</key>
            <summary>Apply metadata to primitive fns causes them to lose their primitive-ness</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Apr 2013 00:27:45 -0500</created>
                <updated>Sat, 13 Apr 2013 00:27:45 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1195] emit-hinted-impl expands to non-ns-qualified invocation of &apos;fn&apos;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1195</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(ns plumbing.tmp&lt;br/&gt;
  (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;fn&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;(defprotocol Foo&lt;br/&gt;
  (foo &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;(extend-protocol Foo&lt;br/&gt;
  Object&lt;br/&gt;
  (foo &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;yields &lt;/p&gt;

&lt;p&gt;CompilerException java.lang.RuntimeException: Unable to resolve symbol: fn in this context, compiling&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;/Users/w01fe/prismatic/prismatic/plumbing/src/plumbing/tmp.clj:7:1)&lt;/p&gt;

&lt;p&gt;This makes it difficult to construct a namespace that provides a replacement def for fn.&lt;/p&gt;</description>
                <environment>Mac os X Clojure 1.5.1</environment>
            <key id="16134">CLJ-1195</key>
            <summary>emit-hinted-impl expands to non-ns-qualified invocation of &apos;fn&apos;</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jawolfe">Jason Wolfe</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Apr 2013 22:23:47 -0500</created>
                <updated>Tue, 9 Apr 2013 22:23:47 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-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-1190] Javadoc for public Java API</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1190</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;We should publish javadoc for &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1188&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1188&lt;/a&gt;.&lt;/p&gt;

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


&lt;p&gt;This ticket should wait until &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1188&quot; title=&quot;Public Java API&quot;&gt;&lt;del&gt;CLJ-1188&lt;/del&gt;&lt;/a&gt; is ok&apos;ed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16124">CLJ-1190</key>
            <summary>Javadoc for public Java API</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 06:51:13 -0500</created>
                <updated>Wed, 3 Apr 2013 06:51:13 -0500</updated>
                                                    <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-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-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-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-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-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-1172] Cross-linking between clojure.lang.Compiler and clojure.lang.RT</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1172</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This is my code (an example):&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;import clojure.lang.Compiler;
import clojure.lang.RT;
import clojure.lang.Var;

Compiler.load(&quot;(+ 5 %)&quot;);
Var foo = RT.var(&quot;bar&quot;, &quot;foo&quot;);
Object result = foo.invoke(10);
assert result.toString().equals(&quot;15&quot;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is what I&apos;m getting:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;ava.lang.ExceptionInInitializerError
	at clojure.lang.Compiler.&amp;lt;clinit&amp;gt;(Compiler.java:47)
	at foo.main(Main.java:75)
Caused by: java.lang.NullPointerException
	at clojure.lang.RT.baseLoader(RT.java:2043)
	at clojure.lang.RT.load(RT.java:417)
	at clojure.lang.RT.load(RT.java:411)
	at clojure.lang.RT.doInit(RT.java:447)
	at clojure.lang.RT.&amp;lt;clinit&amp;gt;(RT.java:329)
	... 36 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The same code worked just fine with version 1.4. Looks like &lt;tt&gt;Compiler&lt;/tt&gt; is using &lt;tt&gt;RT&lt;/tt&gt; and &lt;tt&gt;RT&lt;/tt&gt; is using &lt;tt&gt;Compiler&lt;/tt&gt;, both statically.&lt;/p&gt;</description>
                <environment>version 1.5.0-RC17</environment>
            <key id="16032">CLJ-1172</key>
            <summary>Cross-linking between clojure.lang.Compiler and clojure.lang.RT</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="4" iconUrl="http://dev.clojure.org/jira/images/icons/status_reopened.gif">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="yegor256">Yegor Bugayenko</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Feb 2013 06:30:50 -0600</created>
                <updated>Sat, 23 Mar 2013 10:31:23 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30694" author="yegor256" created="Mon, 4 Mar 2013 11:40:51 -0600"  >&lt;p&gt;I cross-posted this question to SO: &lt;a href=&quot;http://stackoverflow.com/questions/15207596&quot;&gt;http://stackoverflow.com/questions/15207596&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30699" author="yegor256" created="Tue, 5 Mar 2013 00:04:37 -0600"  >&lt;p&gt;calling &lt;tt&gt;RT.init()&lt;/tt&gt; before &lt;tt&gt;Compiler.load()&lt;/tt&gt; solves the problem&lt;/p&gt;</comment>
                    <comment id="30700" author="jafingerhut" created="Tue, 5 Mar 2013 04:17:34 -0600"  >&lt;p&gt;Yegor, do you consider it OK to close this ticket as not being a problem, or at least one with a reasonable workaround?&lt;/p&gt;</comment>
                    <comment id="30702" author="yegor256" created="Tue, 5 Mar 2013 13:11:57 -0600"  >&lt;p&gt;Yes, of course. Let&apos;s close it.&lt;/p&gt;</comment>
                    <comment id="30703" author="jafingerhut" created="Tue, 5 Mar 2013 18:14:13 -0600"  >&lt;p&gt;Ticket submitter agrees that this is not an issue, or that there is a reasonable workaround.&lt;/p&gt;</comment>
                    <comment id="30752" author="jafingerhut" created="Wed, 13 Mar 2013 00:58:46 -0500"  >&lt;p&gt;This issue came up again on the Clojure group.  &lt;a href=&quot;https://groups.google.com/forum/?hl=en_US&amp;amp;fromgroups=#!topic/clojure/2xdLNMb9yyQ&quot;&gt;https://groups.google.com/forum/?hl=en_US&amp;amp;fromgroups=#!topic/clojure/2xdLNMb9yyQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did some testing, and the issue did not exist in Clojure 1.5.0-RC3 and before, and it has existed since 1.5.0-RC4.  There was only one commit between those two points:&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://github.com/clojure/clojure/commit/9b80a552fdabeabdd93951a625b55ae49c2f8d83&quot;&gt;https://github.com/clojure/clojure/commit/9b80a552fdabeabdd93951a625b55ae49c2f8d83&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Maybe this new behavior is an intended consequence of that change.  I don&apos;t know.  In any case, it seems like perhaps the &quot;No need to call RT.init() anymore&quot; message might be outdated?&lt;/p&gt;</comment>
                    <comment id="30753" author="jafingerhut" created="Wed, 13 Mar 2013 00:59:59 -0500"  >&lt;p&gt;Reopening since it came up again, and there is some more info known about the issue.  I&apos;ll let someone who knows more about the issue decide whether to close it.&lt;/p&gt;</comment>
                    <comment id="30806" author="appodictic" created="Sat, 23 Mar 2013 10:31:23 -0500"  >&lt;p&gt;Doing this RT.load(&quot;clojure/core&quot;); at the top works avoids the message from RT.init()&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-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-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-1159] clojure.java.io/delete-file doesn&apos;t return the status of the deletion(true/false)</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1159</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;initially reported it here(somehow):&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/d/msg/clojure/T9Kvr0IL0kg/wcKBfR9w_1sJ&quot;&gt;https://groups.google.com/d/msg/clojure/T9Kvr0IL0kg/wcKBfR9w_1sJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically clojure.java.io/delete-file doesn&apos;t ever return false (even when silently is true, it returns the value of silently), it&apos;s due to how it&apos;s implemented - but it&apos;s obvious from the code, so I&apos;ll stop here.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;PS: this is what I&apos;m using as my current workaround:&lt;br/&gt;
(defn delete-file&lt;br/&gt;
&quot;&lt;br/&gt;
an implementation that returns the true/false status&lt;br/&gt;
which clojure.java.io/delete-file doesn&apos;t do(tested in 1.5.0-RC14)&lt;br/&gt;
&quot;&lt;br/&gt;
  [f &amp;amp; &lt;span class=&quot;error&quot;&gt;&amp;#91;silently&amp;#93;&lt;/span&gt;]&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;ret (.delete (clojure.java.io/file f))&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (cond (or ret silently)&lt;br/&gt;
      ret&lt;br/&gt;
      :else&lt;br/&gt;
      (throw (java.io.IOException. (str &quot;Couldn&apos;t delete &quot; f)))&lt;br/&gt;
      )&lt;br/&gt;
    )&lt;br/&gt;
  )&lt;/p&gt;

&lt;p&gt;I&apos;m sure you guys can find a better way, but as a clojure newbie(really!) that&apos;s what I have.&lt;/p&gt;</description>
                <environment>any</environment>
            <key id="15999">CLJ-1159</key>
            <summary>clojure.java.io/delete-file doesn&apos;t return the status of the deletion(true/false)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="atkaaz">AtKaaZ</reporter>
                        <labels>
                        <label>delete-file</label>
                        <label>evil</label>
                        <label>or</label>
                    </labels>
                <created>Sun, 10 Feb 2013 13:55:52 -0600</created>
                <updated>Sun, 10 Feb 2013 14:21:28 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30575" author="atkaaz" created="Sun, 10 Feb 2013 14:01:08 -0600"  >&lt;p&gt;I kinda just realized it affects all versions since and including 1.2, because it appears that its implementation was the same since then.&lt;/p&gt;

&lt;p&gt;If it&apos;s not meant to return the result of the delete, maybe it should specifically return nil and/or the doc say something?&lt;/p&gt;</comment>
                    <comment id="30576" author="seancorfield" created="Sun, 10 Feb 2013 14:21:28 -0600"  >&lt;p&gt;As noted in a thread on the Clojure ML, you can pass a known value in the second argument position to detect a delete that failed:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(clojure.java.io/delete-file some-file :not-deleted)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;This returns true on success and :not-deleted on failure.&lt;/p&gt;

&lt;p&gt;However the docstring could be better worded to make that intention clear. Perhaps:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Delete file f. Return true if it succeeds. If silently is nil or false, raise an exception if it fails, else return the value of silently.&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;This allows you to detect whether the delete succeeded without catching an exception by passing a non-true truthy value as the second argument.&lt;/tt&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1152] PermGen leak in multimethods and protocol fns</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1152</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;There is a PermGen memory leak that we have tracked down to protocol methods and multimethods called inside an &lt;tt&gt;eval&lt;/tt&gt;, because of the caches these methods use. The problem only arises when the value being cached is an instance of a class (such as a function or reify) that was defined inside the &lt;tt&gt;eval&lt;/tt&gt;. Thus extending &lt;tt&gt;IFn&lt;/tt&gt; or dispatching a multimethod on an &lt;tt&gt;IFn&lt;/tt&gt; are likely triggers.&lt;/p&gt;

&lt;p&gt;My fellow LonoClouder, &lt;b&gt;Jeff Dik&lt;/b&gt; describes how to reproduce and work around the problem:&lt;/p&gt;

&lt;p&gt;The easiest way that I have found to test this is to set &quot;&lt;tt&gt;-XX:MaxPermSize&lt;/tt&gt;&quot; to a reasonable value so you don&apos;t have to wait too long for the PermGen space to fill up, and to use &quot;&lt;tt&gt;-XX:+TraceClassLoading&lt;/tt&gt;&quot; and &quot;&lt;tt&gt;-XX:+TraceClassUnloading&lt;/tt&gt;&quot; to see the classes being loaded and unloaded.&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;leiningen project.clj&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defproject permgen-scratch &lt;span class=&quot;code-quote&quot;&gt;&quot;0.1.0-SNAPSHOT&quot;&lt;/span&gt;
  :dependencies [[org.clojure/clojure &lt;span class=&quot;code-quote&quot;&gt;&quot;1.5.0-RC1&quot;&lt;/span&gt;]]
  :jvm-opts [&lt;span class=&quot;code-quote&quot;&gt;&quot;-XX:MaxPermSize=32M&quot;&lt;/span&gt;
             &lt;span class=&quot;code-quote&quot;&gt;&quot;-XX:+TraceClassLoading&quot;&lt;/span&gt;
             &lt;span class=&quot;code-quote&quot;&gt;&quot;-XX:+TraceClassUnloading&quot;&lt;/span&gt;])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can use &lt;tt&gt;lein swank 45678&lt;/tt&gt; and connect with slime in emacs via &lt;tt&gt;M-x slime-connect&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;To monitor the PermGen usage, you can find the Java process to watch with &quot;&lt;tt&gt;jps -lmvV&lt;/tt&gt;&quot; and then run &quot;&lt;tt&gt;jstat -gcold &lt;ins&gt;&lt;em&gt;&amp;lt;PROCESS_ID&amp;gt;&lt;/em&gt;&lt;/ins&gt; 1s&lt;/tt&gt;&quot;. According to &lt;a href=&quot;http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html#gcold_option&quot;&gt;the jstat docs&lt;/a&gt;, the first column (PC) is the &quot;Current permanent space capacity (KB)&quot; and the second column (PU) is the &quot;Permanent space utilization (KB)&quot;. VisualVM is also a nice tool for monitoring this.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Multimethodleak&quot;&gt;&lt;/a&gt;Multimethod leak&lt;/h2&gt;

&lt;p&gt;Evaluating the following code will run a loop that eval&apos;s &lt;tt&gt;(take* (fn foo []))&lt;/tt&gt;.&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;multimethod leak&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defmulti take* (fn [a] (type a)))

(defmethod take* clojure.lang.Fn
  [a]
  &apos;())

(def stop (atom &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;))
(def sleep-duration (atom 1000))

(defn run-loop []
  (when-not @stop
    (eval &apos;(take* (fn foo [])))
    (&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;/sleep @sleep-duration)
    (recur)))

(&lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt; (run-loop))

(reset! sleep-duration 0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the &lt;tt&gt;lein swank&lt;/tt&gt; session, you will see many lines like below listing the classes being created and loaded.&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;[Loaded user$eval15802$foo__15803 from __JVM_DefineClass__]
[Loaded user$eval15802 from __JVM_DefineClass__]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These lines will stop once the PermGen space fills up.&lt;/p&gt;

&lt;p&gt;In the jstat monitoring, you&apos;ll see the amount of used PermGen space (PU) increase to the max and stay there.&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;-    PC       PU        OC          OU       YGC    FGC    FGCT     GCT
 31616.0  31552.7    365952.0         0.0      4     0    0.000    0.129
 32000.0  31914.0    365952.0         0.0      4     0    0.000    0.129
 32768.0  32635.5    365952.0         0.0      4     0    0.000    0.129
 32768.0  32767.6    365952.0      1872.0      5     1    0.000    0.177
 32768.0  32108.2    291008.0     23681.8      6     2    0.827    1.006
 32768.0  32470.4    291008.0     23681.8      6     2    0.827    1.006
 32768.0  32767.2    698880.0     24013.8      8     4    1.073    1.258
 32768.0  32767.2    698880.0     24013.8      8     4    1.073    1.258
 32768.0  32767.2    698880.0     24013.8      8     4    1.073    1.258&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A workaround is to run &lt;tt&gt;prefer-method&lt;/tt&gt; before the PermGen space is all used up, 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;(prefer-method take* clojure.lang.Fn java.lang.&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then, when the used PermGen space is close to the max, in the &lt;tt&gt;lein swank&lt;/tt&gt; session, you will see the classes created by the eval&apos;ing being unloaded.&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;[Unloading class user$eval5950$foo__5951]
[Unloading class user$eval3814]
[Unloading class user$eval2902$foo__2903]
[Unloading class user$eval13414]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the jstat monitoring, there will be a long pause when used PermGen space stays close to the max, and then it will drop down, and start increasing again when more eval&apos;ing occurs.&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;-    PC       PU        OC          OU       YGC    FGC    FGCT     GCT
 32768.0  32767.9    159680.0     24573.4      6     2    0.167    0.391
 32768.0  32767.9    159680.0     24573.4      6     2    0.167    0.391
 32768.0  17891.3    283776.0     17243.9      6     2   50.589   50.813
 32768.0  18254.2    283776.0     17243.9      6     2   50.589   50.813&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;tt&gt;defmulti&lt;/tt&gt; defines a cache that uses the dispatch values as keys. Each eval call in the loop defines a new foo class which is then added to the cache when &lt;tt&gt;take*&lt;/tt&gt; is called, preventing the class from ever being GCed.&lt;/p&gt;

&lt;p&gt;The prefer-method workaround works because it calls &lt;tt&gt;clojure.lang.MultiFn.preferMethod&lt;/tt&gt;, which calls the private &lt;tt&gt;MultiFn.resetCache&lt;/tt&gt; method, which completely empties the cache.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Protocolleak&quot;&gt;&lt;/a&gt;Protocol leak&lt;/h2&gt;

&lt;p&gt;The leak with protocol methods similarly involves a cache. You see essentially the same behavior as the multimethod leak if you run the following code using protocols.&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;protocol leak&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defprotocol ITake (take* [a]))

(extend-type clojure.lang.Fn
  ITake
  (take* [&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;] &apos;()))

(def stop (atom &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;))
(def sleep-duration (atom 1000))

(defn run-loop []
  (when-not @stop
    (eval &apos;(take* (fn foo [])))
    (&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;/sleep @sleep-duration)
    (recur)))

(&lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt; (run-loop))

(reset! sleep-duration 0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again, the cache is in the &lt;tt&gt;take*&lt;/tt&gt; method itself, using each new &lt;tt&gt;foo&lt;/tt&gt; class as a key.&lt;/p&gt;

&lt;p&gt;A workaround is to run &lt;tt&gt;-reset-methods&lt;/tt&gt; on the protocol before the PermGen space is all used up, 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;(-reset-methods ITake)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This works because &lt;tt&gt;-reset-methods&lt;/tt&gt; replaces the cache with an empty MethodImplCache.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15981">CLJ-1152</key>
            <summary>PermGen leak in multimethods and protocol 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="chouser@n01se.net">Chouser</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Jan 2013 09:00:47 -0600</created>
                <updated>Wed, 30 Jan 2013 09:10:08 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30511" author="chouser@n01se.net" created="Wed, 30 Jan 2013 09:10:08 -0600"  >&lt;p&gt;I think the most obvious solution would be to constrain the size of the cache.  Adding an item to the cache is already not the fastest path, so a bit more work could be done to prevent the cache from growing indefinitely large. &lt;/p&gt;

&lt;p&gt;That does raise the question of what criteria to use.  Keep the first &lt;em&gt;n&lt;/em&gt; entries?  Keep the &lt;em&gt;n&lt;/em&gt; most recently used (which would require bookkeeping in the fast cache-hit path)? Keep the &lt;em&gt;n&lt;/em&gt; most recently added?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1149] Unhelpful error message from :use (and use function) when arguments are malformed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1149</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;the following exception happens when you have something like this(bad):&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
  (:use &lt;span class=&quot;error&quot;&gt;&amp;#91;midje.sweet :reload-all&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;as opposed to any of these(correct):&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
  (:use midje.sweet :reload-all))&lt;/p&gt;

&lt;p&gt;(ns runtime.util-test&lt;br/&gt;
(:use &lt;span class=&quot;error&quot;&gt;&amp;#91;midje.sweet&amp;#93;&lt;/span&gt; :reload-all))&lt;/p&gt;

&lt;p&gt;and the exception is:&lt;br/&gt;
Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: No value supplied for key: true&lt;br/&gt;
        at clojure.lang.PersistentHashMap.create(PersistentHashMap.java:77)&lt;br/&gt;
        at clojure.core$hash_map.doInvoke(core.clj:365)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:617)&lt;br/&gt;
        at clojure.core$load_lib.doInvoke(core.clj:5352)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:142)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:619)&lt;br/&gt;
        at clojure.core$load_libs.doInvoke(core.clj:5403)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:621)&lt;br/&gt;
        at clojure.core$use.doInvoke(core.clj:5497)&lt;/p&gt;

&lt;p&gt;Note that this is similar to the equally unhelpful message shown in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1140&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-1140&lt;/a&gt; although that is a different root cause.&lt;/p&gt;

&lt;p&gt;Probably best to enhance the `use` function to validate its arguments before trying to apply hash-map?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15967">CLJ-1149</key>
            <summary>Unhelpful error message from :use (and use function) when arguments are malformed</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jan 2013 18:37:27 -0600</created>
                <updated>Sun, 26 May 2013 15:17:29 -0500</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31172" author="gfredericks" created="Sun, 26 May 2013 15:17:29 -0500"  >&lt;p&gt;I believe this applies to require as well.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-1147] Threading macro (-&gt;) does not permit inline function declarations</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1147</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;(-&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt; (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;args&amp;#93;&lt;/span&gt; apply + args))&lt;/p&gt;

&lt;p&gt;CompilerException java.lang.Exception: Unsupported binding form: 1, compiling:(NO_SOURCE_PATH:1:13)&lt;/p&gt;

&lt;p&gt;The expression is expanded to:&lt;/p&gt;

&lt;p&gt;(fn &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;args&amp;#93;&lt;/span&gt; apply + args)&lt;/p&gt;

&lt;p&gt;If this is intended behaviour then at the least the compiler error message is confusing. It would be preferable if the -&amp;gt; macro checked for (fn..) before treating a form as a sequence and injecting the argument.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15962">CLJ-1147</key>
            <summary>Threading macro (-&gt;) does not permit inline function declarations</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="sfnelson">Stephen Nelson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Jan 2013 21:17:51 -0600</created>
                <updated>Sun, 26 May 2013 14:21:55 -0500</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30437" author="jafingerhut" created="Tue, 15 Jan 2013 00:56:46 -0600"  >&lt;p&gt;Note that this works as you might have hoped:&lt;/p&gt;

&lt;p&gt;(-&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt; ((fn &lt;span class=&quot;error&quot;&gt;&amp;#91;args&amp;#93;&lt;/span&gt; (apply + args))))&lt;/p&gt;

&lt;p&gt;because it expands into:&lt;/p&gt;

&lt;p&gt;((fn &lt;span class=&quot;error&quot;&gt;&amp;#91;args&amp;#93;&lt;/span&gt; (apply + args)) &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;Your suggestion that -&amp;gt; check for (fn ...) before treating it as a sequence and injecting the argument leaves open the question: Why only (fn ...) should be treated specially?  Why not (let ...), (for ...), (doseq ...), etc?  And if you go that far, how do you decide what should be allowed and what not?&lt;/p&gt;</comment>
                    <comment id="31102" author="cldwalker" created="Fri, 17 May 2013 14:56:30 -0500"  >&lt;p&gt;I agree with Andy, that it&apos;s not realistic suggestion to check for fn,let,etc. Perhaps a doc fix would help here but I&apos;m not sure if we just want to call out (fn ...). I&apos;d recommend closing this unless Stephen speaks up.&lt;/p&gt;</comment>
                    <comment id="31117" author="sfnelson" created="Sun, 19 May 2013 22:29:46 -0500"  >&lt;p&gt;I&apos;m happy with Andy&apos;s synopsis of the problem, and it&apos;s reasonable not to change the behaviour of the threading macro specifically for (fn..).&lt;/p&gt;

&lt;p&gt;However, this is a mistake that I&apos;m sure many others make/have made and it&apos;s hard to diagnose what is going wrong without dumping interpreted form &amp;#8211; hardly a reasonable expectation for a novice user.&lt;/p&gt;

&lt;p&gt;Before closing this issue, I&apos;d like to see improved failure reporting, such as causing the threading macro to throw a compile error or warning if passed a raw (unwrapped) function declaration (are there legitimate use cases this would affect?).&lt;/p&gt;</comment>
                    <comment id="31170" author="gfredericks" created="Sun, 26 May 2013 14:21:55 -0500"  >&lt;p&gt;Throwing an error on (-&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt; (fn ...)) would certainly affect any perverse individual using a local redefinition of &apos;fn.&lt;/p&gt;

&lt;p&gt;I think the best that can be done here is a mention in the docstring.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1141] Allow pre and post-conditions in defprotocol and deftype macros</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1141</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The fn special form and the defn macro allow pre- and post-conditions. It would be nice if one could use that conditions also in method declarations of the defprotocol and deftype macro.&lt;/p&gt;

&lt;p&gt;Currently I use the extend function as workaround where one can specify the methods using a map of keyword-name and fn special form.&lt;/p&gt;</description>
                <environment>Dos not matter.</environment>
            <key id="15937">CLJ-1141</key>
            <summary>Allow pre and post-conditions in defprotocol and deftype macros</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="akiel">Alexander Kiel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jan 2013 05:08:13 -0600</created>
                <updated>Mon, 7 Jan 2013 17:28:42 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="30381" author="michael-drogalis" created="Sun, 6 Jan 2013 18:22:35 -0600"  >&lt;p&gt;Using &lt;tt&gt;:pre&lt;/tt&gt; and &lt;tt&gt;:post&lt;/tt&gt;, IMO, isn&apos;t a good idea. Handling assertions is a two part game. The mechanism needs to account for both detection and reaction, and the latter is missing.&lt;/p&gt;

&lt;p&gt;This isn&apos;t a perfect work-around, as it&apos;s a little verbose, but using &lt;a href=&quot;https://github.com/MichaelDrogalis/dire&quot;&gt;Dire&lt;/a&gt; might work better than using extend. In addition, you get the &quot;reaction&quot; functionality that&apos;s missing from &lt;tt&gt;:pre&lt;/tt&gt; and &lt;tt&gt;:post&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Example for protocol preconditions: &lt;a href=&quot;https://gist.github.com/4471276&quot;&gt;https://gist.github.com/4471276&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30396" author="akiel" created="Mon, 7 Jan 2013 11:52:08 -0600"  >&lt;p&gt;@Michael I read your &lt;a href=&quot;https://gist.github.com/4471276&quot;&gt;gist&lt;/a&gt; and the README of &lt;a href=&quot;https://github.com/MichaelDrogalis/dire&quot;&gt;Dire&lt;/a&gt;. I think the supervision concept of Erlang has it&apos;s places but I don&apos;t like it for pre- and post-conditions. For me, such conditions have two proposes: &lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;they should document the code and&lt;/li&gt;
	&lt;li&gt;they should fail fast to detect failures early.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;To support my first point, your pre- and post-conditions are just lexical too far away from the actual function definition. For the second point: I think in the case of violations the program should just crash. One could maybe wrap some part of the program with one of your exception supervisors handling an AssertionError. But I don&apos;t think that handling pre- and post-condition violations for individual functions is a good thing.&lt;/p&gt;</comment>
                    <comment id="30402" author="michael-drogalis" created="Mon, 7 Jan 2013 17:28:42 -0600"  >&lt;p&gt;@Alexander Indeed, your points are correct. Dire is meant to be exactly what you described. Lexically removed from application logic, and opportunity to recover from crashing. That was my best shot at aiding your needs quickly, anyway. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1138] data-reader returning nil causes exception</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1138</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If a data-reader returns nil, the reader throws java.lang.RuntimeException: No dispatch macro...  The error message implies that there is no dispatch macro for whatever the first character of the tag happens to be.&lt;/p&gt;

&lt;p&gt;Here&apos;s a simple example:&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;f/ignore (constantly nil)}&amp;#93;&lt;/span&gt; (read-string &quot;#f/ignore 42 10&quot;))&lt;/p&gt;

&lt;p&gt;RuntimeException No dispatch macro for: f  clojure.lang.Util.runtimeException (Util.java:219)&lt;/p&gt;</description>
                <environment>clojure 1.5 beta2, Mac OS X 10.8.2, java version &amp;quot;1.6.0_37&amp;quot;</environment>
            <key id="15916">CLJ-1138</key>
            <summary>data-reader returning nil causes exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="steveminer@gmail.com">Steve Miner</reporter>
                        <labels>
                        <label>reader</label>
                    </labels>
                <created>Sat, 22 Dec 2012 08:41:18 -0600</created>
                <updated>Thu, 14 Feb 2013 15:06:47 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30289" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 09:43:27 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch allows a data-reader to return nil instead of throwing.  Does sanity check that possible tag or record isJavaIdentifierStart().  Gives better error message for special characters that might actually be dispatch macros (rather than assuming it&apos;s a tagged literal).&lt;/p&gt;</comment>
                    <comment id="30291" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:06:06 -0600"  >&lt;p&gt;clj-1138-data-reader-return-nil-for-no-op.patch allows a data-reader returning nil to be treated as a no-op by the reader (like #_).  nil is not normally a useful value (actually it causes an exception in Clojure 1.4 through 1.5 beta2) for a data-reader to return.  With this patch, one could get something like a conditional feature reader using data-readers.&lt;/p&gt;</comment>
                    <comment id="30292" author="steveminer@gmail.com" created="Sat, 22 Dec 2012 10:26:43 -0600"  >&lt;p&gt;clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch is the first patch to consider.  It merely allows nil as a value from a data-reader and returns nil as the final value.  I think it does what was originally intended for dispatch macros, and gives a better error message in many cases (mostly typos).&lt;/p&gt;

&lt;p&gt;The second patch, clj-1138-data-reader-return-nil-for-no-op.patch, depends on the other being applied first.  It takes an extra step to treat a nil value returned from a data-reader as a no-op for the reader (like #_).&lt;/p&gt;</comment>
                    <comment id="30310" author="steveminer@gmail.com" created="Sun, 23 Dec 2012 11:52:28 -0600"  >&lt;p&gt;It turns out that you can work around the original problem by having your data-reader return &apos;(quote nil) instead of plain nil.  That expression conveniently evaluates to nil so you can get a nil if necessary.  This also works after applying the patches so there&apos;s still a way to return nil if you really want it.&lt;/p&gt;

&lt;p&gt;    (binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*data-readers* {&apos;x/nil (constantly &apos;(quote nil))}&amp;#93;&lt;/span&gt; (read-string &quot;#x/nil 42&quot;))&lt;br/&gt;
    ;=&amp;gt; (quote nil)&lt;/p&gt;</comment>
                    <comment id="30565" author="jafingerhut" created="Thu, 7 Feb 2013 09:20:27 -0600"  >&lt;p&gt;Patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch dated Dec 22 2012 still applies cleanly to latest master if you use the following command:&lt;/p&gt;

&lt;p&gt;% git am --keep-cr -s --ignore-whitespace &amp;lt; clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch&lt;/p&gt;

&lt;p&gt;Without the --ignore-whitespace option, the patch fails only because some whitespace was changed in Clojure master recently.&lt;/p&gt;</comment>
                    <comment id="30584" author="jafingerhut" created="Wed, 13 Feb 2013 11:24:11 -0600"  >&lt;p&gt;OK, now with latest master (1.5.0-RC15 at this time), patch clj-1138-allow-data-reader-to-return-nil-instead-of-throwing.patch no longer applies cleanly, not even using --ignore-whitespace in the &apos;git am&apos; command given above.  Steve, if you could see what needs to be updated, that would be great.  Using the patch command as suggested in the &quot;Updating stale patches&quot; section of &lt;a href=&quot;http://dev.clojure.org/display/design/JIRA+workflow&quot;&gt;http://dev.clojure.org/display/design/JIRA+workflow&lt;/a&gt; wasn&apos;t enough, so it should probably be carefully examined by hand to see what needs updating.&lt;/p&gt;</comment>
                    <comment id="30599" author="steveminer@gmail.com" created="Thu, 14 Feb 2013 12:21:27 -0600"  >&lt;p&gt;I removed my patches.  Things have changes recently with the LispReader and new EdnReader.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-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-1133] Certain actions on mutable fields in deftype lead to very strange error messages</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1133</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Consider the following code:&lt;/p&gt;

&lt;p&gt;(definterface Test&lt;br/&gt;
  (^void fail []))&lt;/p&gt;

&lt;p&gt;(deftype TestImpl&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:unsynchronized-mutable true :tag int} x&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Test&lt;br/&gt;
  (fail &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (set! x (dec x))))&lt;/p&gt;

&lt;p&gt;Its compilation fails with the following message:&lt;br/&gt;
CompilerException java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack, compiling&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.../test.clj:27) &lt;/p&gt;

&lt;p&gt;The following code works:&lt;/p&gt;

&lt;p&gt;(definterface Test&lt;br/&gt;
  (^void fail []))&lt;/p&gt;

&lt;p&gt;(deftype TestImpl&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:unsynchronized-mutable true :tag int} x&amp;#93;&lt;/span&gt;&lt;br/&gt;
  Test&lt;br/&gt;
  (fail &lt;span class=&quot;error&quot;&gt;&amp;#91;this&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (set! x (int (dec x)))))&lt;/p&gt;

&lt;p&gt;The only change here is that I have wrapped (dec x) form into (int) call.&lt;/p&gt;

&lt;p&gt;I understand that in fact the former code should not work anyway (or at least should not work as I have expected) because (dec) is defined as a call to clojure.lang.Numbers.dec(), which is overloaded for double, long and Object only (in fact, changing :tag int to :tag long in the first example allows the program to compile).  However, the error message is completely uninformative and misleading; it also looks like that it is a consequence of compiler error. It is also not a problem of this concrete example; I found this error in more complex interface method implementation where (set!) call was right in the middle of its body.&lt;/p&gt;

&lt;p&gt;I&apos;m using Clojure 1.4.0 and have experienced this problem on Archlinux x86_64 and Windows 7 x86_64.&lt;/p&gt;

&lt;p&gt;Full stack trace of the error, in case it would be helpful:&lt;/p&gt;

&lt;p&gt;java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack, compiling&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.../test.clj:27)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)&lt;br/&gt;
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.access$100(Compiler.java:37)&lt;br/&gt;
	at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:518)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5919)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6223)&lt;br/&gt;
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)&lt;br/&gt;
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)&lt;br/&gt;
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)&lt;br/&gt;
	at clojure.lang.Compiler.analyze(Compiler.java:6262)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6508)&lt;br/&gt;
	at clojure.lang.Compiler.load(Compiler.java:6952)&lt;br/&gt;
	at clojure.lang.Compiler.loadFile(Compiler.java:6912)&lt;br/&gt;
	at clojure.lang.RT$3.invoke(RT.java:307)&lt;br/&gt;
	at test$eval3224.invoke(NO_SOURCE_FILE:43)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6511)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6477)&lt;br/&gt;
	at clojure.core$eval.invoke(core.clj:2797)&lt;br/&gt;
	at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)&lt;br/&gt;
	at clojure.main$repl$fn__6410.invoke(main.clj:266)&lt;br/&gt;
	at clojure.main$repl.doInvoke(main.clj:266)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
	at clojure.main$repl_opt.invoke(main.clj:332)&lt;br/&gt;
	at clojure.main$main.doInvoke(main.clj:428)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:397)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:411)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:159)&lt;br/&gt;
	at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
	at clojure.main.main(main.java:37)&lt;br/&gt;
Caused by: java.lang.VerifyError: (class: test/TestImpl, method: fail signature: ()V) Expecting to find integer on stack&lt;br/&gt;
	at java.lang.Class.forName0(Native Method)&lt;br/&gt;
	at java.lang.Class.forName(Class.java:264)&lt;br/&gt;
	at clojure.lang.RT.classForName(RT.java:2039)&lt;br/&gt;
	at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:957)&lt;br/&gt;
	at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:736)&lt;br/&gt;
	at clojure.lang.Compiler$NewExpr$Parser.parse(Compiler.java:2473)&lt;br/&gt;
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)&lt;br/&gt;
	... 45 more&lt;/p&gt;</description>
                <environment>Archlinux x86_64, Windows 7 x86_64</environment>
            <key id="15905">CLJ-1133</key>
            <summary>Certain actions on mutable fields in deftype lead to very strange error messages</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="dpx-infinity">Vladimir Matveev</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Dec 2012 13:48:31 -0600</created>
                <updated>Wed, 19 Dec 2012 01:20:28 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30255" author="dpx-infinity" created="Tue, 18 Dec 2012 13:51:17 -0600"  >&lt;p&gt;Shouldn&apos;t have set major priority; but I cannot edit issue again &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="30263" author="jafingerhut" created="Wed, 19 Dec 2012 01:20:28 -0600"  >&lt;p&gt;Reduced priority to minor, since ticket creator could not do so themselves.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1132] For record type Rec,  (instance? Rec (map-&gt;Rec {...})) need not return true, though (instance? Rec (Rec. ...)) does.</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1132</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;    (defrecord Rec ...)&lt;/p&gt;

&lt;p&gt;    (instance? Rec (Rec. ...))        ;=&amp;gt; true&lt;br/&gt;
    (instance? Rec (map-&amp;gt;Rec {...}))  ;=&amp;gt; can be false  &lt;br/&gt;
&lt;br/&gt;
This occurs when the code is wrapped in a tomcat servlet by `lein ring&lt;br/&gt;
uberwar`, but &lt;b&gt;not&lt;/b&gt; when run at the REPL or under Jetty, say.&lt;br/&gt;
&lt;br/&gt;
Although produced under ring, this seems to me to be a general problem&lt;br/&gt;
with the map-&amp;gt; constructor, as (true? (instance? Rec (map-&amp;gt;Rec {...})))&lt;br/&gt;
should be an invariant, regardless of the environment or context.&lt;br/&gt;
The problem seems to arise in some aspect of the class loading process:&lt;/p&gt;

&lt;p&gt;    (.getClassLoader Rec)                    ;=&amp;gt; WebappClassLoader (delegate: false, repositories: /WEB-INF/classes/, parent: org.apache.catalina.loader.StandardClassLoader@790bc49d)&lt;br/&gt;
    (.getClassLoader (class (Rec. ...)))     ;=&amp;gt; WebappClassLoader (same as the previous line)&lt;br/&gt;
    (.getClassLoader (class (map-&amp;gt;Rec ...))) ;=&amp;gt; clojure.lang.DynamicClassLoader@2e7227a8&lt;/p&gt;

&lt;p&gt;The map-&amp;gt;Rec delegates to the create method, which seems to be where the problem lies.&lt;/p&gt;

&lt;p&gt;The record namespace is AOT compiled, properly I think/hope, and the requisite classes &lt;br/&gt;
imported as they should be.&lt;/p&gt;

&lt;p&gt;I have attached a minimal web app that reproduces the problem and shows&lt;br/&gt;
the configuration. As a sanity check, I have also created a trivial &lt;br/&gt;
workaround defrecord* that creates a clojure-native map constructor, &lt;br/&gt;
for which the problem does not occur. See the README.md in the tar &lt;br/&gt;
file for usage details, and the project.clj for my configuration.&lt;/p&gt;

&lt;p&gt;Again, I&apos;ve only been able to reproduce the problem under Tomcat,&lt;br/&gt;
not under Jetty or at the REPL.&lt;/p&gt;</description>
                <environment>Apache Tomcat/6.0.24 JVM/1.6.0_26-b03  Linux 2.6.32-279.el6.x86_64&lt;br/&gt;
&lt;br/&gt;
Clojure 1.4.0,  Ring 1.1.6, Compojure 1.1.3, Lein-Ring Plugin 0.7.5 (for lein ring uberwar)&lt;br/&gt;
</environment>
            <key id="15902">CLJ-1132</key>
            <summary>For record type Rec,  (instance? Rec (map-&gt;Rec {...})) need not return true, though (instance? Rec (Rec. ...)) does.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="cg-at">Christopher Genovese</reporter>
                        <labels>
                        <label>constructor</label>
                        <label>defrecord</label>
                    </labels>
                <created>Tue, 18 Dec 2012 10:58:29 -0600</created>
                <updated>Tue, 18 Dec 2012 10:58:29 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11766" name="recordbug.tgz" size="5373405" author="cg-at" created="Tue, 18 Dec 2012 10:58:29 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1131] Importing a non-existent class causes an exception that does not fully identify the source file</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1131</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;m in the process of stripping out some OSGi support, and I missed one import.&lt;/p&gt;

&lt;p&gt;The exception identifies &quot;init.clj&quot;, but I&apos;d prefer to see the full path there, as I have a few different &quot;init.clj&quot; files in my overall project.&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;:core-services:compileClojure
Reflection warning, com/annadaletech/nexus/services/registry.clj:37 - call to unregisterAll can&apos;t be resolved.
Reflection warning, com/annadaletech/nexus/services/registry.clj:131 - call to getConfiguration can&apos;t be resolved.
Reflection warning, com/annadaletech/nexus/services/registry.clj:150 - call to getConfiguration can&apos;t be resolved.
Exception in thread &quot;main&quot; java.lang.ClassNotFoundException: org.osgi.framework.ServiceRegistration, compiling:(init.clj:1)
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3387)
	at clojure.lang.Compiler.compile1(Compiler.java:7035)
	at clojure.lang.Compiler.compile1(Compiler.java:7025)
	at clojure.lang.Compiler.compile(Compiler.java:7097)
	at clojure.lang.RT.compile(RT.java:387)
	at clojure.lang.RT.load(RT.java:427)
	at clojure.lang.RT.load(RT.java:400)
	at clojure.core$load$fn__4890.invoke(core.clj:5415)
	at clojure.core$load.doInvoke(core.clj:5414)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invoke(core.clj:5227)
	at clojure.core$compile$fn__4895.invoke(core.clj:5426)
	at clojure.core$compile.invoke(core.clj:5425)
	at clojuresque.tasks.compile$main$fn__64.invoke(compile.clj:23)
	at clojuresque.cli$with_command_line_STAR_.invoke(cli.clj:92)
	at clojuresque.tasks.compile$main.doInvoke(compile.clj:6)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invoke(core.clj:601)
	at clojure.lang.Var.invoke(Var.java:419)
	at clojuresque.Driver.main(Driver.java:39)
Caused by: java.lang.ClassNotFoundException: org.osgi.framework.ServiceRegistration
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15899">CLJ-1131</key>
            <summary>Importing a non-existent class causes an exception that does not fully identify the source file</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>feedback</label>
                    </labels>
                <created>Mon, 17 Dec 2012 18:13:02 -0600</created>
                <updated>Fri, 17 May 2013 15:56:48 -0500</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31104" author="cldwalker" created="Fri, 17 May 2013 15:56:48 -0500"  >&lt;p&gt;While it&apos;s reasonable to want this for your case, having long path names in a stacktrace could be inconvenient for others. I&apos;d recommend posting your desired change on the dev list - &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!forum/clojure-dev&quot;&gt;https://groups.google.com/forum/?fromgroups#!forum/clojure-dev&lt;/a&gt; . If they&apos;re ok with it, then I&apos;d recommend submitting a patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1130] Invoking a static method with the wrong number of arguments results in a NoSuchFieldException, rather than a proper message that the arguments could not be matched to the method</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1130</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;My code inadventently invoked a method that expected a single parameter, but passed no parameters.&lt;/p&gt;

&lt;p&gt;The exception:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Exception in thread &quot;main&quot; java.lang.NoSuchFieldException: getService, compiling:(com/annadaletech/nexus/services/registry.clj:168)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6462)
	at clojure.lang.Compiler.analyze(Compiler.java:6262)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
	at clojure.lang.Compiler.analyze(Compiler.java:6262)
	at clojure.lang.Compiler.access$100(Compiler.java:37)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5883)
....
Caused by: java.lang.NoSuchFieldException: getService
	at java.lang.Class.getField(Class.java:1520)
	at clojure.lang.Compiler$StaticFieldExpr.&amp;lt;init&amp;gt;(Compiler.java:1180)
	at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:923)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
	... 78 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That threw me for a bit; really, it looks like the compiler is attempting to access a field and invoke it as an IFn.  However, a proper message would be &quot;getService() requires 1 parameter, not 0&quot; (or something to that effect).  Even &quot;invalid number of parameters for SmashRuntime/getService()&quot; would be better.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15898">CLJ-1130</key>
            <summary>Invoking a static method with the wrong number of arguments results in a NoSuchFieldException, rather than a proper message that the arguments could not be matched to the method</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hlewisship">Howard Lewis Ship</reporter>
                        <labels>
                        <label>feedback</label>
                    </labels>
                <created>Mon, 17 Dec 2012 17:57:44 -0600</created>
                <updated>Sun, 6 Jan 2013 18:44:47 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30382" author="michael-drogalis" created="Sun, 6 Jan 2013 18:44:47 -0600"  >&lt;p&gt;It looks like it&apos;s first trying to resolve a field by name, since field access with &lt;tt&gt;/&lt;/tt&gt; is legal. For example:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;user=&amp;gt; (Integer/parseInt)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;CompilerException java.lang.NoSuchFieldException: parseInt, compiling:(NO_SOURCE_PATH:1)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;user=&amp;gt; (Integer/MAX_VALUE)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;2147483647&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Would trying to resolve a method before a field fix this?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-1124] for-as</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1124</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;A common pattern in programming is building up some data structure step by step:&lt;/p&gt;

&lt;p&gt;In Python:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
x = {0: 1}&lt;br/&gt;
for item in stuff:&lt;br/&gt;
    x&lt;span class=&quot;error&quot;&gt;&amp;#91;item&amp;#93;&lt;/span&gt; = item * x.get(item - 1, 0)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;br/&gt;
etc.&lt;/p&gt;

&lt;p&gt;In an imperative for loop this is easy since we have easy access to the &quot;current&quot; data structure being built up.&lt;/p&gt;

&lt;p&gt;I propose the addition of a function for-as similar to as-&amp;gt; except the value of the last loop iteration is bound to the name.&lt;/p&gt;

&lt;p&gt;So we can write the above as:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
(last (for-as &lt;span class=&quot;error&quot;&gt;&amp;#91;x {0 1}&amp;#93;&lt;/span&gt;&lt;br/&gt;
        &lt;span class=&quot;error&quot;&gt;&amp;#91;item stuff&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (assoc x item (* item (get x (- item 1) 0)))))&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;An (un-optimized) implementation might be something like:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
(defmacro reduce-for [&lt;span class=&quot;error&quot;&gt;&amp;#91;res init&amp;#93;&lt;/span&gt; for-seq-exprs body-expr]&lt;br/&gt;
  `(reduce #(%2 %1) ~init&lt;br/&gt;
    (for ~for-seq-exprs&lt;br/&gt;
      (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;~res&amp;#93;&lt;/span&gt;&lt;br/&gt;
        ~body-expr))))&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Note: reduce-for does not return a seq, instead it returns the result of the last loop body iteration.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15880">CLJ-1124</key>
            <summary>for-as</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="yongqli">Yongqian Li</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Dec 2012 23:27:10 -0600</created>
                <updated>Mon, 10 Dec 2012 23:33:43 -0600</updated>
                                    <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30208" author="yongqli" created="Mon, 10 Dec 2012 23:31:11 -0600"  >&lt;p&gt;(Fixed formatting)&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;x = {0: 1}
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; item in stuff:
    x[item] = item * x.get(item - 1, 0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(last (&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-as [x {0 1}]
        [item stuff]
  (assoc x item (* item (get x (- item 1) 0)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defmacro reduce-&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; [[res init] &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-seq-exprs body-expr]
  `(reduce #(%2 %1) ~init
    (&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ~&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-seq-exprs
      (fn [~res]
        ~body-expr))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(Someone please fix the formatting in above and delete this comment.)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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-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-1119] inconsistent behavior of lazy-seq w/ macro &amp; closure on excptions</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1119</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;lazy-seq seems to evaluate inconsistently when body includes a macro and throws and exception. 1st evalutation throws the exceptions, subsequent ones return empty sequence.&lt;/p&gt;

&lt;p&gt;demo code:&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (let [coll &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;]&lt;br/&gt;
    (lazy-seq&lt;br/&gt;
      (when-let &lt;span class=&quot;error&quot;&gt;&amp;#91;s (seq coll)&amp;#93;&lt;/span&gt;&lt;br/&gt;
        (throw (Exception.))))))&lt;/p&gt;

&lt;p&gt;(def lazy (gen-lazy))&lt;/p&gt;

&lt;p&gt;(try&lt;br/&gt;
  (println &quot;lazy:&quot; lazy)&lt;br/&gt;
  (catch Exception ex&lt;br/&gt;
    (println ex)))&lt;/p&gt;

&lt;p&gt;(try&lt;br/&gt;
  (println &quot;lazy, again:&quot; lazy)&lt;br/&gt;
  (catch Exception ex&lt;br/&gt;
    (println ex)))&lt;/p&gt;

&lt;p&gt;It should throw an exception both times but only does on 1st. Generally speaking an expression shouldn&apos;t evaluate to different things depending on whether it&apos;s been evaluated before.&lt;/p&gt;

&lt;p&gt;When removing the closure ...&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (lazy-seq&lt;br/&gt;
    (when-let [s (seq &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;)]&lt;br/&gt;
      (throw (Exception.)))))&lt;/p&gt;

&lt;p&gt;... or removing the when-let macro ...&lt;/p&gt;

&lt;p&gt;(defn gen-lazy []&lt;br/&gt;
  (let [coll &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;]&lt;br/&gt;
    (lazy-seq&lt;br/&gt;
      (seq coll)&lt;br/&gt;
      (throw (Exception.)))))&lt;/p&gt;

&lt;p&gt;It works i.e. consistently throws the exception, so seems to be some interaction between the closure and the macro at work here. This particular combination is used in the &apos;map&apos; function.&lt;/p&gt;

&lt;p&gt;See also: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z3EiBUQ7Inc&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/Z3EiBUQ7Inc&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15869">CLJ-1119</key>
            <summary>inconsistent behavior of lazy-seq w/ macro &amp; closure on excptions</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="hank">Hank</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Dec 2012 03:00:15 -0600</created>
                <updated>Sun, 16 Dec 2012 04:06:49 -0600</updated>
                                    <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30147" author="hank" created="Mon, 3 Dec 2012 04:26:02 -0600"  >&lt;p&gt;N.B. The primary use case I have for this, in case it matters, is interrupting the evaluation of a &apos;map&apos; expression in which the mapped fn is slow to evaluate (throwing an InterruptedException), because I am not interested in its result any more. Then later I re-evaluate it because I am interested in the result after all, however with above bug the lazy sequence terminates instead of recommencing where it left off.&lt;/p&gt;

&lt;p&gt;(UPDATE: This use case is similar to the kind of ersatz continuations that Jetty does (RetryRequest runtime exception) or even Clojure itself when barging STM transactions with the RetryEx exception.)&lt;/p&gt;</comment>
                    <comment id="30149" author="hank" created="Mon, 3 Dec 2012 08:45:27 -0600"  >&lt;p&gt;Related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-457&quot; title=&quot;lazy recursive definition giving incorrect results&quot;&gt;CLJ-457&lt;/a&gt; according to Christophe. His patch fixes this,too.&lt;/p&gt;</comment>
                    <comment id="30172" author="hank" created="Tue, 4 Dec 2012 05:02:32 -0600"  >&lt;p&gt;Sorry Christophe&apos;s patch doesn&apos;t work for me here. It avoids evaluating the LazySeq a second time by prematurely throwing an exception. However a LazySeq might evaluate properly the second time around b/c the situation causing the exception was transient. As per comment above an evaluation might get interrupted, throwing InterruptedException the first time around but not the second time.&lt;/p&gt;

&lt;p&gt;Also the observation with the closure and macro need explanation IMHO.&lt;/p&gt;</comment>
                    <comment id="30189" author="hank" created="Sat, 8 Dec 2012 03:51:04 -0600"  >&lt;p&gt;further insight: &apos;delay&apos; exhibits the same behavior and is a more simple case to examine. the macro suspicion is a red herring: as demoed below it is actually the closed over variable magically turns to nil, the when-let macro simply turned that into a nil for the whole expression.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def delayed
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (delay
      (print &lt;span class=&quot;code-quote&quot;&gt;&quot;a=&quot;&lt;/span&gt; a)
      (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.)))))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 1:&quot;&lt;/span&gt;)
  (force delayed)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 2:&quot;&lt;/span&gt;)
  (force delayed)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;prints:&lt;/p&gt;

&lt;p&gt;delayed 1:a= true#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
delayed 2:a= nil#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;/p&gt;</comment>
                    <comment id="30193" author="hank" created="Sun, 9 Dec 2012 01:31:54 -0600"  >&lt;p&gt;The above leads to dodgy outcomes such as: The following expression leads to an Exception on 1st evaluation and to &quot;w00t!&quot; on subsequent ones.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def delayed
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (delay
      (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; a
        (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.))
        &lt;span class=&quot;code-quote&quot;&gt;&quot;w00t!&quot;&lt;/span&gt;))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Try it like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 1:&quot;&lt;/span&gt; )
  (println (force delayed))
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;delayed 2:&quot;&lt;/span&gt;)
  (println (force delayed))
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;br/&gt;
delayed 1:#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
delayed 2:w00t!&lt;/p&gt;

&lt;p&gt;This code shows that the problem is tied to the :once flag as suspected.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def test-once
  (let [a &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;]
    (^{:once &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;} fn* foo []
	    (println &lt;span class=&quot;code-quote&quot;&gt;&quot;a=&quot;&lt;/span&gt; a)
	    (&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; (Exception.)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Invoking the fn twice will show &apos;a&apos; turning from &apos;true&apos; to &apos;nil&apos;, try it like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;test-once 1:&quot;&lt;/span&gt;)
  (test-once)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))

(&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;
  (print &lt;span class=&quot;code-quote&quot;&gt;&quot;test-once 2:&quot;&lt;/span&gt;)
  (test-once)
  (&lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; Exception ex (println ex)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;br/&gt;
test-once 1:a= true&lt;br/&gt;
#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;br/&gt;
test-once 2:a= nil&lt;br/&gt;
#&amp;lt;Exception java.lang.Exception&amp;gt;&lt;/p&gt;

&lt;p&gt;That doesn&apos;t happen when the ^{:once true} is removed. Now one could argue that above fn is invoked twice, which is exactly what one is not supposed to do when decorated with the :once flag, but I argue that an unsuccessful call doesn&apos;t count as invocation towards the :once flag. The delay and lazy-seq macros agree with me there as the resulting objects are not considered realized (as per realized? function) if the evaluation of the body throws an exception, and realization/evaluation of the body is therefore repeated on re-evaluation of the delay/lazy-seq.&lt;/p&gt;

&lt;p&gt;Try this using &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(realized? delayed)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; after the first evaluation in the code above. In the implementation this can be seen e.g. &lt;a href=&quot;https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/jvm/clojure/lang/Delay.java#L33&quot;&gt;here for clojure.lang.Delay&lt;/a&gt; (similarly for LazySeq), the body-fn is set to null (meaning realized) after the invocation returns &lt;b&gt;successfully&lt;/b&gt; only.&lt;/p&gt;

&lt;p&gt;The :once flag affects &lt;a href=&quot;https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/jvm/clojure/lang/Compiler.java#L4701&quot;&gt;this part of the compiler only&lt;/a&gt;. Some field is set to nil there in the course of a function invocation, for the good reason of letting the garbage compiler collect objects, however this should to be done after the function successfully completes only. Can this be changed?&lt;/p&gt;</comment>
                    <comment id="30240" author="hank" created="Sun, 16 Dec 2012 04:02:08 -0600"  >&lt;p&gt;A workaround for the case of the &apos;map&apos; function as described in the 1st comment, works as this: The original map function, if you take out the cases for several colls, the performance enhancements for chunked seqs and forcing the coll argument to a seq, looks like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn map [f s]
  (lazy-seq
    (cons (f (first s)) (map f (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; s)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In my workaround I evaluate f &lt;b&gt;twice&lt;/b&gt;:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn map [f s]
  (lazy-seq
    (f (first s))
    (cons (f (first s)) (map f (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; s)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because the downstream functions that are slow to evaluate are all of the deref kind that cache their result (more lazy-seqs, delays, futures, promises), the InterruptedException can only happen during the 1st evaluation, while the tail call optimization that sets closed-over variables to nil (it pays to read this here: &lt;a href=&quot;http://clojure.org/lazy&quot;&gt;http://clojure.org/lazy&lt;/a&gt;) only happens on the second call. The first still creates an fn that captures the head of the sequence &apos;s&apos;, however this is not being held onto as it is not returned.&lt;/p&gt;

&lt;p&gt;I use this special version of map (and other, similarly rewritten functions based on lazy-seq such as iterate) when I want interruptible, restartable seq evaluations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-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>
                       