<!--
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 17:54:05 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=fixVersion+%3D+%22Approved+Backlog%22+AND+project+%3D+CLJ+AND+resolution+%3D+Unresolved+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=fixVersion+%3D+%22Approved+Backlog%22+AND+project+%3D+CLJ+AND+resolution+%3D+Unresolved+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="30" total="30"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJ-47] GC Issue 43: Dead code in generated bytecode</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-47</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Reported by Levente.Santha, Jan 11, 2009
The bug was described in detail in &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; thread: http:&lt;span class=&quot;code-comment&quot;&gt;//groups.google.com/
&lt;/span&gt;group/clojure/browse_thread/thread/81ba15d7e9130441

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

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

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

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

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

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

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

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

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

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

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

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


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

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

What version are you using?

svn 1354, 1.0.0RC1

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

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

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

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

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

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

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

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


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

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


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

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


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

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


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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1. Create a file src/foo.clj

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

2. Create a file src/bar.clj

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

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

4. Compile the namespace.

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

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

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

6. Re-Require the namespace

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

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

What version are you using?

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

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

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

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

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

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

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

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

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

&lt;hr /&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-457] lazy recursive definition giving incorrect results</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-457</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you define a global data var in terms of a lazy sequence referring to that same var, you can get different results depending on the chunkiness of laziness of the functions being used to build the collection.&lt;/p&gt;

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

&lt;p&gt;(Similar issue reported here: &lt;a href=&quot;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/yD941fIxhyE/discussion&lt;/a&gt;)&lt;/p&gt;

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

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

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

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

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

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

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

</comment>
                    <comment id="30115" author="jafingerhut" created="Fri, 30 Nov 2012 14:06:09 -0600"  >&lt;p&gt;That last comment, Christophe, goes a long way to explaining the idea to me, at least.  Any chance comments with similar content could be added as part of the patch?&lt;/p&gt;</comment>
                    <comment id="30161" author="cgrand" created="Mon, 3 Dec 2012 11:18:59 -0600"  >&lt;p&gt;New patch with a comment explaining the expected states.&lt;br/&gt;
Note: I tidied the states table up.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Before calling user code (f.invoke() in sval and, indirectly,
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// ((LazySeq)ls).sval() in seq -- and even RT.seq() in seq), ensure that 
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// the LazySeq state is in one of these states:
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// State            f          sv
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// ================================
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Unrealized       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;   &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Realized         &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;       &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Being realized   &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;       &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1119&quot; title=&quot;inconsistent behavior of lazy-seq w/ macro &amp;amp; closure on excptions&quot;&gt;CLJ-1119&lt;/a&gt; is also fixed by this patch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11740" name="CLJ-457-2.diff" size="2925" author="cgrand" created="Mon, 3 Dec 2012 11:18:59 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;So what does it mean that the assignee is Rich, but it&apos;s waiting on me?&lt;/p&gt;</comment>
                    <comment id="25915" author="stu" created="Mon, 1 Nov 2010 09:17:22 -0500"  >&lt;p&gt;I am using Approval = Incomplete plus Waiting On = Someone to let submitters know that there is feedback waiting, and that they can move the ticket forward by acting on it. The distinction is opportunity to contribute (something has been provided to let you move forward) vs. expectation of contribution. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

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

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

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

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

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

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


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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[CLJ-807] hash-maps print-dup as literal, thus can be read as array-maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-807</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Per Rich in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-799&quot; title=&quot;ArrayMaps print-dup with read-eval&quot;&gt;&lt;del&gt;CLJ-799&lt;/del&gt;&lt;/a&gt;: &quot;The point of print-dup is type preservation&quot;&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;user=&amp;gt; (hash-map :k :v)
{:k :v}
user=&amp;gt; (type *1)
clojure.lang.PersistentHashMap
user=&amp;gt; (binding [*print-dup* true] (print-str *2))
&quot;{:k :v}&quot;
user=&amp;gt; (read-string *1)
{:k :v}
user=&amp;gt; (type *1)
clojure.lang.PersistentArrayMap
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

<item>
            <title>[CLJ-248] Add support for subsets and submaps to sorted Sets/Maps</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-248</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Currently we can have a subseq of a sorted-set|map-by, but this returns a seq and&lt;br/&gt;
not a Set or Map.&lt;br/&gt;
Implementing the interfaces java.util.SortedSet and java.util.SortedMap would give&lt;br/&gt;
us support for calling .subSet and .subMap.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13645">CLJ-248</key>
            <summary>Add support for subsets and submaps to sorted Sets/Maps</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jim.blomo">Jim Blomo</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2010 05:52:00 -0600</created>
                <updated>Sat, 2 Jun 2012 19:08:44 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23413" author="importer" created="Tue, 24 Aug 2010 06:05:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/248&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/248&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23414" author="importer" created="Tue, 24 Aug 2010 06:05:00 -0500"  >&lt;p&gt;awizzard said: Another nice addition could be &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/util/NavigableMap.html&quot;&gt;java.util.NavigableMap&lt;/a&gt;, though this is available only since Java 6.&lt;/p&gt;</comment>
                    <comment id="28444" author="jim.blomo" created="Fri, 11 May 2012 01:13:12 -0500"  >&lt;p&gt;SortedSet-SortedMap-interfaces-248.diff 2012-05-10 is a first pass at the SortedMap interface.  If there are no objections, I&apos;ll build on the SortedMap implementation to add SortedSet support.&lt;/p&gt;</comment>
                    <comment id="28517" author="jim.blomo" created="Fri, 18 May 2012 00:33:57 -0500"  >&lt;p&gt;SortedMap-interfaces-248.diff 2012-05-10 supersedes the last diff.  It implements and tests the SortedMap interface.&lt;/p&gt;

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

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

&lt;p&gt;The new patch combines what was internally multiple git commits into one, simply because it was easier for me to create the patch that way.  I left out the addition of *.swp and *.swo files to the .gitignore file.  Builds and tests cleanly on Oracle/Apple JDK 1.6 on Mac OS X 10.6.8.&lt;/p&gt;</comment>
                    <comment id="28597" author="jafingerhut" created="Fri, 25 May 2012 00:27:31 -0500"  >&lt;p&gt;I don&apos;t know why Priority changed to Blocker when I changed Patch to &quot;Code and Test&quot;.  I didn&apos;t try to do that &amp;#8211; suspect that something with the web UI is doing that automatically somehow.&lt;/p&gt;</comment>
                    <comment id="28686" author="jim.blomo" created="Sat, 2 Jun 2012 19:08:44 -0500"  >&lt;p&gt;Added &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1008&quot; title=&quot;Make sorted maps and sets implement j.u.NavigableMap and NavigableSet interfaces &quot;&gt;CLJ-1008&lt;/a&gt; for NavigableMap interface enhancement.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11255" name="clj-248-SortedMap-SortedSet-interfaces-patch2.txt" size="19029" author="jafingerhut" created="Thu, 24 May 2012 22:25:04 -0500" />
                    <attachment id="11226" name="SortedMap-SortedSet-interfaces-248.diff" size="41027" author="jim.blomo" created="Fri, 18 May 2012 01:56:15 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[CLJ-803] IAtom interface</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-803</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Atom and the other reference types do not have interfaces and are marked final.&lt;/p&gt;

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

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

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

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

&lt;p&gt;&lt;a href=&quot;http://clojure.org/state&quot;&gt;http://clojure.org/state&lt;/a&gt; one of the distinctions between agents and actors raised in the section titled &quot;Message Passing and Actors&quot; is local vs. distributed and the same distinction can be made between couchdb (regardless of compare and swap) and atoms&lt;/p&gt;</comment>
                    <comment id="26552" author="aaron" created="Mon, 4 Jul 2011 21:18:48 -0500"  >&lt;p&gt;This ticket has already been moved into approved backlog.  It will be revisited again after the 1.3 release where we will take a closer look at things.  For now, this will remain as is. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10244" name="0001-atom-interface.patch" size="3324" author="pepijndevos" created="Sat, 28 May 2011 03:39:32 -0500" />
                    <attachment id="10239" name="iatom.patch" size="2853" author="pepijndevos" created="Fri, 27 May 2011 08:57:12 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-735] Improve error message when a protocol method is not found</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-735</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;If you call a protocol function but pass the wrong arity (forget an argument for example), you currently a message that says &quot;No single method ... of interface ... found for function ... of protocol ...&quot;.  The code in question is getting matching methods from the Reflector and creates this message if the number of matches != 1.  &lt;/p&gt;

&lt;p&gt;There are really two cases there:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;matches == 0 - this happens frequently due to typos&lt;/li&gt;
	&lt;li&gt;matches &amp;gt; 1 - this presumably happens infrequently&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I propose that the == 0 case instead should have slightly different text at the beginning and a hint as to the intended arity within it: &lt;/p&gt;

&lt;p&gt;&quot;No method: ... of interface ... with arity ... found for function ... of protocol ...&quot;.  &lt;/p&gt;

&lt;p&gt;The &amp;gt;1 case should have similar changes:  &quot;Multiple methods: ... of interface ... with arity ... found for function ... of protocol ...&quot;.&lt;/p&gt;

&lt;p&gt;Patch is attached.  I used case which presumably should have better performance than a nested if/else.  I was not sure whether the reported arity should match the actual Java method arity or Clojure protocol function arity (including the target).  I did the former.&lt;/p&gt;

&lt;p&gt;I did not add a test as I wasn&apos;t sure whether checking error messages in tests was appropriate or not.  Happy to add that if requested.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14348">CLJ-735</key>
            <summary>Improve error message when a protocol method is not found</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="alexmiller">Alex Miller</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Feb 2011 14:52:40 -0600</created>
                <updated>Fri, 9 Dec 2011 10:05:55 -0600</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26570" author="cemerick" created="Thu, 14 Jul 2011 06:39:26 -0500"  >&lt;blockquote&gt;&lt;p&gt;I was not sure whether the reported arity should match the actual Java method arity or Clojure protocol function arity (including the target). I did the former.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I think it should be the latter.  The message is emitted when the protocol methods are being invoked through the corresponding function, so it should be consistent with the errors emitted by regular functions.&lt;/p&gt;

&lt;p&gt;+1 for some tests, too.  There certainly are tests for reflection warnings and such.&lt;/p&gt;

&lt;p&gt;FWIW, I&apos;m happy to take this on if Alex is otherwise occupied.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10107" name="protocolerr.diff" size="1965" author="alexmiller" created="Fri, 4 Feb 2011 14:52:40 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-731] Create macro to variadically unroll a combinator function definition</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-731</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Clojure contains a set of combinators that are implemented in a similar, but slightly different way.  That is, they are implemented as a complete set of variadic overloads on both the call-side and also on the functions that they return.  Visually, they all tend to look something like:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(defn foo
  ([f]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2 f3]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...)))
  ([f1 f2 f3 &amp;amp; fs]
     (fn
       ([] do stuff...)
       ([x] do stuff...)
       ([x y] do stuff...)
       ([x y z] do stuff...)
       ([x y z &amp;amp; args] do variadic stuff...))))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To build this type of function for each combinator is tedious and error-prone.&lt;/p&gt;

&lt;p&gt;There must be a way to implement a macro that takes a &quot;specification&quot; of a combinator including:&lt;/p&gt;

&lt;p&gt;1. name&lt;br/&gt;
2. docstring&lt;br/&gt;
3. do stuff template&lt;br/&gt;
4. do variadic stuff template&lt;/p&gt;

&lt;p&gt;And builds something like the function &lt;tt&gt;foo&lt;/tt&gt; above.  This macro should be able to implement the current batch of combinators (assuming that &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-730&quot;&gt;http://dev.clojure.org/jira/browse/CLJ-730&lt;/a&gt; is completed first for the sake of verification).&lt;/p&gt;</description>
                <environment></environment>
            <key id="14344">CLJ-731</key>
            <summary>Create macro to variadically unroll a combinator function definition</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="fogus">Fogus</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Jan 2011 12:00:01 -0600</created>
                <updated>Fri, 28 Jan 2011 09:40:05 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="26181" author="stu" created="Fri, 28 Jan 2011 09:03:46 -0600"  >&lt;p&gt;This seems useful. Rich, would you accept a patch?&lt;/p&gt;</comment>
                    <comment id="26185" author="stu" created="Fri, 28 Jan 2011 09:40:05 -0600"  >&lt;p&gt;Nevermind, just saw that Rich already suggested this on the dev list. Patch away.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

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

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

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

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

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

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

<item>
            <title>[CLJ-348] reify allows use of qualified name as method parameter</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-348</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This should complain about using a fully-qualified name as a parameter:&lt;/p&gt;

&lt;p&gt;(defmacro lookup []&lt;br/&gt;
  `(reify clojure.lang.ILookup&lt;br/&gt;
          (valAt &lt;span class=&quot;error&quot;&gt;&amp;#91;_ key&amp;#93;&lt;/span&gt;)))&lt;/p&gt;

&lt;p&gt;Instead it simply ignores that parameter in the method body in favour of clojure.core/key.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13745">CLJ-348</key>
            <summary>reify allows use of qualified name as method parameter</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 May 2010 14:30:00 -0500</created>
                <updated>Fri, 1 Mar 2013 12:33:02 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23886" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/348&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/348&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
0001-Add-a-test-for-348-reify-shouldn-t-accept-qualified-.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/d2xUJIxTyr36fseJe5cbLA/download/d2xUJIxTyr36fseJe5cbLA&quot;&gt;https://www.assembla.com/spaces/clojure/documents/d2xUJIxTyr36fseJe5cbLA/download/d2xUJIxTyr36fseJe5cbLA&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23887" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;technomancy said: [&lt;a href=&quot;file:d2xUJIxTyr36fseJe5cbLA&quot;&gt;file:d2xUJIxTyr36fseJe5cbLA&lt;/a&gt;]: A test to expose the unwanted behaviour&lt;/p&gt;</comment>
                    <comment id="23888" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;richhickey said: I&apos;m not sure the bug is what you say it is, or the resolution should be what you suggest. The true problem is the resolution of key when qualified. Another possibility is to ignore the qualifier there.&lt;/p&gt;</comment>
                    <comment id="23889" author="importer" created="Tue, 24 Aug 2010 08:03:00 -0500"  >&lt;p&gt;technomancy said: Interesting. So it&apos;s not appropriate to require auto-gensym here? Why are the rules different for reify methods vs proxy methods?&lt;/p&gt;

&lt;p&gt;&amp;gt; (defmacro lookup []&lt;br/&gt;
  `(proxy &lt;span class=&quot;error&quot;&gt;&amp;#91;clojure.lang.ILookup&amp;#93;&lt;/span&gt; []&lt;br/&gt;
          (valAt &lt;span class=&quot;error&quot;&gt;&amp;#91;key&amp;#93;&lt;/span&gt; key)))&lt;br/&gt;
&amp;gt; (lookup)&lt;/p&gt;

&lt;p&gt;Can&apos;t use qualified name as parameter: clojure.core/key&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;Thrown class java.lang.Exception&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

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

<item>
            <title>[CLJ-713] Upgrade ASM to a more current version</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-713</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;Move to the latest ASM (currently 3.3.1)&lt;/li&gt;
	&lt;li&gt;No longer subset-ed&lt;/li&gt;
	&lt;li&gt;Still re-rooted it under clojure.asm&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14322">CLJ-713</key>
            <summary>Upgrade ASM to a more current version</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="aaron">Aaron Bedra</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jan 2011 22:47:00 -0600</created>
                <updated>Mon, 11 Mar 2013 15:43:51 -0500</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30720" author="gshayban" created="Sun, 10 Mar 2013 06:34:10 -0500"  >&lt;p&gt;Attached is a patch that externalizes and moves the ASM lib to the latest version (4.1), which has support for invokeDynamic if a brave soul wants to emit that instruction.  Heed fogus&apos;s caveats &lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;ASM in this patch is not re-rooted, but an external Maven dependency. It does have the disadvantage of possibly conflicting with other dependents of ASM, but this is the same approach is used by other JVM langs.&lt;/p&gt;

&lt;p&gt;Can classloaders mitigate that problem?&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; Recent post on clojure-dev, oblivious of &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/iX-ZFPk_zyE/Es3mDOdG3bYJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/iX-ZFPk_zyE/Es3mDOdG3bYJ&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://groups.google.com/d/msg/clojure-dev/ahJXBT1vG68/_fEEM6Lc7LcJ&quot;&gt;https://groups.google.com/d/msg/clojure-dev/ahJXBT1vG68/_fEEM6Lc7LcJ&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/&quot;&gt;http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30729" author="gshayban" created="Mon, 11 Mar 2013 10:41:22 -0500"  >&lt;p&gt;Ran some of Andy Fingerhut&apos;s expression microbenchmarks on -master with the patch.  There is no difference between performance compared to 1.5.1.&lt;/p&gt;</comment>
                    <comment id="30733" author="jafingerhut" created="Mon, 11 Mar 2013 15:43:51 -0500"  >&lt;p&gt;Ghadi, out of curiosity, if you do AOT compilation of some Clojure class files, does it produce byte-for-byte identical .class files after your changes vs. before your changes?  If so, that would be pretty high assurance of no problems.  If not, it would be good to understand what changed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11903" name="asm-split.txt" size="533589" author="gshayban" created="Sun, 10 Mar 2013 06:34:10 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

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

<item>
            <title>[CLJ-250] debug builds</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-250</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;This ticket includes two patches: &lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;a patch to set  &lt;tt&gt;&lt;b&gt;assert&lt;/b&gt;&lt;/tt&gt; when clojure.lang.RT loads, based on the presence of system property clojure.debug&lt;/li&gt;
	&lt;li&gt;expand error messages in assert to include &lt;tt&gt;local-bindings&amp;lt;/code&amp;gt; (a new macro which wraps the implicit &amp;lt;code&amp;gt;&amp;amp;env&lt;/tt&gt;)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Things to consider before approving these patches:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;should there be an easy Clojure-level way to query if debug is enabled? (checking assert isn&apos;t the same, as debug should eventually drive other features)&lt;/li&gt;
	&lt;li&gt;assertions will now be off by default &amp;#8211; this is a change!&lt;/li&gt;
	&lt;li&gt;is the addition of the name &lt;tt&gt;local-bindings&lt;/tt&gt; to clojure.core cool?&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
            <key id="13647">CLJ-250</key>
            <summary>debug builds</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="stu">Stuart Halloway</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2010 17:40:00 -0600</created>
                <updated>Thu, 14 Mar 2013 13:28:51 -0500</updated>
                                    <version>Release 1.2</version>
                                <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="23417" author="importer" created="Tue, 24 Aug 2010 06:05:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/250&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/250&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
add-clojure-debug-flag.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aUWn50c64r35E-eJe5aVNr/download/aUWn50c64r35E-eJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aUWn50c64r35E-eJe5aVNr/download/aUWn50c64r35E-eJe5aVNr&lt;/a&gt;&lt;br/&gt;
assert-report-locals.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aUWqLSc64r35E-eJe5aVNr/download/aUWqLSc64r35E-eJe5aVNr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aUWqLSc64r35E-eJe5aVNr/download/aUWqLSc64r35E-eJe5aVNr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="26008" author="stu" created="Tue, 7 Dec 2010 20:23:13 -0600"  >&lt;p&gt;Ignore the old patches. Considering the following implementation, please review and then move ticket to waiting on Stu:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;RT will check system property &lt;tt&gt;&quot;clojure.debug&quot;&lt;/tt&gt;, default to false&lt;/li&gt;
	&lt;li&gt;property will set the root binding for the current &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;, plus a new &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; flag. (Debug builds can and will drive other things than just asserts.)&lt;/li&gt;
	&lt;li&gt;does Compile.java need to push &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; or &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; as thread local bindings, or can they be root-bound only when compiling clojure?&lt;/li&gt;
	&lt;li&gt;will add &lt;tt&gt;&amp;#42;debug&amp;#42;&lt;/tt&gt; binding to &lt;tt&gt;clojure.main/with-bindings&lt;/tt&gt;. Anywhere else?&lt;/li&gt;
	&lt;li&gt;build.xml should not have to change &amp;#8211; system properties will flow through (and build.xml may not be around much longer anyway)&lt;/li&gt;
	&lt;li&gt;once we agree on the approach, I will ping maven plugin and lein owners so that they flow the setting through&lt;/li&gt;
	&lt;li&gt;better assertion messages will be a separate ticket&lt;/li&gt;
	&lt;li&gt;what is the interaction between &amp;#42;debug&amp;#42; and &amp;#42;unchecked-math&amp;#42;? Change checks to &lt;tt&gt;(and &amp;#42;unchecked-math&amp;#42; (not &amp;#42;debug&amp;#42;))&lt;/tt&gt;}?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26012" author="richhickey" created="Wed, 8 Dec 2010 11:00:04 -0600"  >&lt;p&gt;#3 - root bound only&lt;br/&gt;
#4 - should &lt;b&gt;not&lt;/b&gt; be in with-bindings for same reason as #3 - we don&apos;t want people to set! &amp;#42;debug&amp;#42; nor &amp;#42;assert&amp;#42;&lt;br/&gt;
#8 - yes, wrapping that in a helper fn&lt;/p&gt;

&lt;p&gt;#6 - my biggest reservation is that this isn&apos;t yet informed by maven best practices&lt;/p&gt;</comment>
                    <comment id="26013" author="stuart.sierra" created="Wed, 8 Dec 2010 14:09:49 -0600"  >&lt;p&gt;System properties can be passed through Maven, so I do not anticipate this being a problem.&lt;/p&gt;

&lt;p&gt;However, I would prefer &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; to remain true by default.&lt;/p&gt;</comment>
                    <comment id="26015" author="cemerick" created="Thu, 9 Dec 2010 07:19:33 -0600"  >&lt;p&gt;SS is correct about this approach not posing any issue for Maven.  In addition, the build could easily be set up to always emit two jars, one &quot;normal&quot;, one &quot;debug&quot;.&lt;/p&gt;

&lt;p&gt;I&apos;d suggest that, while &lt;tt&gt;clojure.debug&lt;/tt&gt; might have broad effect, additional properties should be available to provide fine-grained control over each of the additional &quot;debug&quot;-related parameterizations that might become available in the future.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I&apos;d like to raise a couple of potentially tangential concerns (after now thinking about assertions for a bit in the above context), some or all of which may simply be a result of my lack of understanding in various areas.&lt;/p&gt;

&lt;p&gt;Looking at where &lt;tt&gt;assert&lt;/tt&gt; is used in &lt;tt&gt;core.clj&lt;/tt&gt; (only two places AFAICT: validating arguments to &lt;tt&gt;derive&lt;/tt&gt; and checking pre- and post-conditions in &lt;tt&gt;fn&lt;/tt&gt;), it would seem unwise to make it &lt;tt&gt;false&lt;/tt&gt; by default.  i.e. non-&lt;tt&gt;Named&lt;/tt&gt; values would be able to get into hierarchies, and pre- and post-conditions would simply be ignored.&lt;/p&gt;

&lt;p&gt;It&apos;s my understanding that assertions (talking here of the JVM construct, from which Clojure reuses &lt;tt&gt;AssertionError&lt;/tt&gt;) should not be used to validate arguments to public API functions, or used to validate any aspect of a function&apos;s normal operation (i.e. &lt;a href=&quot;http://download.oracle.com/javase/1.4.2/docs/guide/lang/assert.html#usage&quot;&gt;&quot;where not to use assertions&quot;&lt;/a&gt;).  That would imply that &lt;tt&gt;derive&lt;/tt&gt; should throw &lt;tt&gt;IllegalArugmentException&lt;/tt&gt; when necessary, and fn pre- and post-conditions should perhaps throw &lt;tt&gt;IllegalStateException&lt;/tt&gt; &amp;#8211; or, in any case, something other than &lt;tt&gt;AssertionError&lt;/tt&gt; via &lt;tt&gt;assert&lt;/tt&gt;.  This would match up far better with most functions in core using &lt;tt&gt;assert-args&lt;/tt&gt; rather than &lt;tt&gt;assert&lt;/tt&gt;, the former throwing &lt;tt&gt;IllegalArgumentException&lt;/tt&gt; rather than &lt;tt&gt;AssertionError&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;That leads me to the question: is &lt;tt&gt;assert&lt;/tt&gt; (and &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;) intended to be a Clojure construct, or a quasi-interop form?&lt;/p&gt;

&lt;p&gt;If the former, then it can roughly have whatever semantics we want, but then it seems like it should not be throwing &lt;tt&gt;AssertionError&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;If the latter, then &lt;tt&gt;AssertionError&lt;/tt&gt; is appropriate on the JVM, but then we need to take care that assertions can be enabled and disabled at runtime (without having to switch around different builds of Clojure), ideally using the host-defined switches (e.g. &lt;tt&gt;-ea&lt;/tt&gt; and friends) and likely not anything like &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt;. I don&apos;t know if this is possible or practical at this point (I presume this would require nontrivial compiler changes).&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Hopefully the above is not water under the bridge at this point.  Thank you in advance for your forbearance. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="26016" author="richhickey" created="Thu, 9 Dec 2010 08:08:07 -0600"  >&lt;p&gt;Thanks for the useful input Chas. Nothing is concluded yet. I think we should step back and look at the objective here, before moving forward with a solution. Being a dynamic language, there are many things we might want to validate about our programs, where the cost of checking is something we are unwilling to pay in production.&lt;/p&gt;

&lt;p&gt;Being a macro, assert has the nice property that, should &amp;#42;assert&amp;#42; not be true during compilation, it generates nil, no conditional test at all. Thus right now it is more like static conditional compilation.&lt;/p&gt;

&lt;p&gt;Java assert does have runtime toggle-ability, via &amp;#45;ea as you say. I haven&apos;t looked at the bytecode generated for Java asserts, but it might be possible for Clojure assert to do something similar, if the runtime overhead is negligible. It is quite likely that HotSpot has special code for eliding the assertion bytecode given a single check of some flag. I&apos;m just not sure that flag is &lt;a href=&quot;http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html#desiredAssertionStatus()&quot;&gt;Class.desiredAssertionStatus&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Whether this turns into changes in assert or pre/post conditions, best practices etc is orthogonal and derived. Currently we don&apos;t have a facility to run without the checks. We need to choose between making them disappear during compilation (debug build) or runtime (track &amp;#45;ea) or both. Then we can look at how that is reflected in assert/pre-post and re-examine existing use of both. The &quot;where not to use assertions&quot; doc deals with them categorically, but in not considering their cost, seems unrealistic IMO. &lt;/p&gt;

&lt;p&gt;I&apos;d appreciate it if someone could look into how assert is generated and optimized by Java itself.&lt;/p&gt;</comment>
                    <comment id="26018" author="cemerick" created="Thu, 9 Dec 2010 17:04:52 -0600"  >&lt;p&gt;Bytecode issues continue to be above my pay grade, unfortunately&#8230;&lt;/p&gt;

&lt;p&gt;A few additional thoughts in response that you may or may not be juggling already:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;assert&lt;/tt&gt; being a macro makes total sense for what it&apos;s doing.  Trouble is, &quot;compile-time&quot; is a tricky concept in Clojure: there&apos;s code-loading-time, AOT-compile-time, and transitively-AOT-compile-time.  Given that, it&apos;s entirely possible for an application deployed to a production environment that contains a patchwork of code or no code produced by &lt;tt&gt;assert&lt;/tt&gt; usages in various libraries and namespaces depending upon when those libs and ns&apos; were loaded, AOT-compiled, or their dependents AOT-compiled, and the value of &lt;tt&gt;&amp;#42;assert&amp;#42;&lt;/tt&gt; at each of those times.  Of course, this is the case for all such macros whose results are dependent upon context-dependent state (I think this was a big issue with &lt;tt&gt;clojure.contrib.logging&lt;/tt&gt;, making it only usable with log4j for a while).&lt;/p&gt;

&lt;p&gt;What&apos;s really attractive about the JVM assertion mechanism is that it can be parameterized for a given runtime on a per-package basis, if desired.  Reimplementing that concept so that &lt;tt&gt;assert&lt;/tt&gt; can be &lt;tt&gt;&amp;#42;ns&amp;#42;&lt;/tt&gt;-sensitive seems like it&apos;d be straightforward, but the compile-time complexity already mentioned remains, and the idea of having two independently-controlled assertion facilities doesn&apos;t sound fun.&lt;/p&gt;

&lt;p&gt;I know nearly nothing about the CLR, but it would appear that it doesn&apos;t provide for anything like runtime-controllable assertions.&lt;/p&gt;</comment>
                    <comment id="26068" author="stu" created="Wed, 29 Dec 2010 15:17:44 -0600"  >&lt;p&gt;The best (dated) evidence I could find says that the compiler sets a special class static final field &lt;tt&gt;$assertionsDisabled&lt;/tt&gt; based on the return of &lt;tt&gt;desiredAssertionStatus&lt;/tt&gt;. HotSpot doesn&apos;t do anything special with this, dead code elimination simply makes it go away. The code indeed compiles this way:&lt;/p&gt;

&lt;p&gt;   11:	getstatic	#6; //Field $assertionsDisabled:Z&lt;br/&gt;
   14:	ifne	33&lt;br/&gt;
   17:	lload_1&lt;br/&gt;
   18:	lconst_0&lt;br/&gt;
   19:	lcmp&lt;br/&gt;
   20:	ifeq	33&lt;br/&gt;
   23:	new	#7; //class java/lang/AssertionError&lt;br/&gt;
   26:	dup&lt;br/&gt;
   27:	ldc	#8; //String X should be zero&lt;br/&gt;
   29:	invokespecial	#9; //Method java/lang/AssertionError.&quot;&amp;lt;init&amp;gt;&quot;:(Ljava/lang/Object;)V&lt;br/&gt;
   32:	athrow&lt;/p&gt;

&lt;p&gt;Even if we were 100% sure that assertion removal was total, I would still vote for a separate Clojure-level switch, for the following reasons:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;I have a real and pressing need to disable some assertions, and I don&apos;t need the Java interop at all. Arguably others will be in the same boat.&lt;/li&gt;
	&lt;li&gt;there will be multiple debugging facilities over time, and having a top-level &lt;b&gt;debug&lt;/b&gt; switch is convenient for Clojure users.&lt;/li&gt;
	&lt;li&gt;Java dis/enabling via command line flags is still possible as a separate feature. We could add this later as a (small) breaking change to our assert, or have a separate java-assert interop form. I am on the fence about which way to go here.&lt;/li&gt;
	&lt;li&gt;I believe it is perfectly fine to throw an &lt;tt&gt;AssertionError&lt;/tt&gt; from a non-Java-assertion-form. We don&apos;t believe in a world of a static exception hierarchy, and an assertion in production is a critical failure no matter what you call it. Even Scala does it &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;a href=&quot;http://daily-scala.blogspot.com/2010/03/assert-require-assume.html&quot;&gt;http://daily-scala.blogspot.com/2010/03/assert-require-assume.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Rich: awaiting your blessing to move forward on this.&lt;/p&gt;</comment>
                    <comment id="26100" author="richhickey" created="Fri, 7 Jan 2011 09:42:47 -0600"  >&lt;p&gt;The compiler sets $assertionsDisabled when, in static init code? Is there special support in the classloader for it? Is there a link to the best dated evidence you found?&lt;/p&gt;</comment>
                    <comment id="26101" author="stu" created="Fri, 7 Jan 2011 09:51:27 -0600"  >&lt;ol&gt;
	&lt;li&gt;Yes, in static init code&lt;/li&gt;
	&lt;li&gt;There is no special support in the classloader, per Brian Goetz (private correspondence) last week. But dead code elimination is great: &quot;The run-time cost of disabled assertions should indeed be zero for compiled code&quot;&lt;/li&gt;
&lt;/ol&gt;
</comment>
                    <comment id="26102" author="stu" created="Fri, 7 Jan 2011 09:57:17 -0600"  >&lt;p&gt;Link: Google &quot;java assert shirazi&quot;. (Not posting link because I can&apos;t tell in 10 secs whether it includes my session information.)&lt;/p&gt;</comment>
                    <comment id="30760" author="akiel" created="Thu, 14 Mar 2013 13:28:51 -0500"  >&lt;p&gt;Is there anything new on this issue? I also look for a convenient way to disable assertions in production.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

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

<item>
            <title>[CLJ-428] subseq, rsubseq enhancements to support priority maps?</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-428</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;See dev thread at &lt;a href=&quot;http://groups.google.com/group/clojure-dev/browse_thread/thread/fdb000cae4f66a95&quot;&gt;http://groups.google.com/group/clojure-dev/browse_thread/thread/fdb000cae4f66a95&lt;/a&gt;.&lt;/p&gt;

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

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

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

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

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

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