<!--
RSS generated by JIRA (4.4#649-r158309) at Thu May 23 17:29:29 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+NREPL&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+NREPL</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="40" total="40"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[NREPL-41] Rebind print-.* dynamic vars when loading a file</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-41</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Syntax errors happen when the user has bound things like &amp;#42;print-length&amp;#42;, &amp;#42;print-depth&amp;#42; and those take precedence.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/technomancy/leiningen/issues/952&quot;&gt;https://github.com/technomancy/leiningen/issues/952&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on discussion in that ticket, I think the right approach is to rebind these vars when doing pr-str in load_file.clj - but I haven&apos;t yet been able to reproduce locally yet.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16100">NREPL-41</key>
            <summary>Rebind print-.* dynamic vars when loading a file</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="trptcolin">Colin Jones</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Mar 2013 14:46:58 -0500</created>
                <updated>Thu, 21 Mar 2013 23:41:22 -0500</updated>
                    <resolved>Thu, 21 Mar 2013 23:41:22 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30800" author="trptcolin" created="Thu, 21 Mar 2013 23:38:53 -0500"  >&lt;p&gt;fixed on master: &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/11e3993746950640cb8173fbcd3b074c53b26ce0&quot;&gt;https://github.com/clojure/tools.nrepl/commit/11e3993746950640cb8173fbcd3b074c53b26ce0&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>[NREPL-40] Thread leak in clojure.tools.nrepl.transport$fn_transport?</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-40</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When trying out remote eval using your sample in the README, ie &lt;/p&gt;

&lt;p&gt;(with-open &lt;span class=&quot;error&quot;&gt;&amp;#91;conn (repl/connect :port 59258)&amp;#93;&lt;/span&gt;&lt;br/&gt;
     (-&amp;gt; (repl/client conn 1000)    ; message receive timeout required&lt;br/&gt;
       (repl/message {:op &quot;eval&quot; :code &quot;(+ 2 3)&quot;})&lt;br/&gt;
       repl/response-values))&lt;/p&gt;

&lt;p&gt;I&apos;m noticing that hosting process leaking a thread each time the remote eval is called. Jconsole shows a clojure-agent-send-off-pool-xxx thread got spawn as result of the call. The stack appears to be pointing to the &quot;while true&quot; loop inside fn_transport.  &lt;/p&gt;

&lt;p&gt;java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)&lt;br/&gt;
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:458)&lt;br/&gt;
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)&lt;br/&gt;
java.util.concurrent.SynchronousQueue.put(SynchronousQueue.java:878)&lt;br/&gt;
clojure.tools.nrepl.transport$fn_transport$fn__3912.invoke(transport.clj:44)&lt;br/&gt;
clojure.core$binding_conveyor_fn$fn__3989.invoke(core.clj:1819)&lt;br/&gt;
clojure.lang.AFn.call(AFn.java:18)&lt;br/&gt;
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)&lt;br/&gt;
java.util.concurrent.FutureTask.run(FutureTask.java:166)&lt;br/&gt;
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)&lt;br/&gt;
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)&lt;br/&gt;
java.lang.Thread.run(Thread.java:722)&lt;/p&gt;

&lt;p&gt;What do you recommend as way to free the thread? I have server code that calls nrepl on behave of client connections and the number of call can pile up fairly quickly.      &lt;/p&gt;</description>
                <environment>Windows 7 x64, Oracle JDK 1.7.0.11 x64, clojure 1.4.0 </environment>
            <key id="16080">NREPL-40</key>
            <summary>Thread leak in clojure.tools.nrepl.transport$fn_transport?</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="cemerick">Chas Emerick</assignee>
                                <reporter username="davidlao">David Lao</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Mar 2013 20:11:48 -0500</created>
                <updated>Tue, 12 Mar 2013 15:37:23 -0500</updated>
                                    <version>0.2.1</version>
                <version>0.2.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30745" author="davidlao" created="Tue, 12 Mar 2013 15:37:23 -0500"  >&lt;p&gt;Here is my workaround.&lt;/p&gt;

&lt;p&gt;&amp;#8212; a/src/main/clojure/clojure/tools/nrepl/transport.clj&lt;br/&gt;
+++ b/src/main/clojure/clojure/tools/nrepl/transport.clj&lt;br/&gt;
@@ -36,12 +36,12 @@&lt;br/&gt;
    to the 2 or 3 functions provided.&quot;&lt;br/&gt;
   (&lt;span class=&quot;error&quot;&gt;&amp;#91;read write&amp;#93;&lt;/span&gt; (fn-transport read write nil))&lt;br/&gt;
   (&lt;span class=&quot;error&quot;&gt;&amp;#91;read write close&amp;#93;&lt;/span&gt;&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;read-queue (SynchronousQueue.)&amp;#93;&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;(future (try&lt;/li&gt;
	&lt;li&gt;(while true&lt;/li&gt;
	&lt;li&gt;(.put read-queue (read)))&lt;/li&gt;
	&lt;li&gt;(catch Throwable t&lt;/li&gt;
	&lt;li&gt;(.put read-queue t))))&lt;br/&gt;
+    (let [read-queue (SynchronousQueue.)&lt;br/&gt;
+          transport-thread (future (try&lt;br/&gt;
+                                (while true&lt;br/&gt;
+                                  (.put read-queue (read)))&lt;br/&gt;
+                                (catch Throwable t&lt;br/&gt;
+                                  (.put read-queue t))))]&lt;br/&gt;
       (FnTransport.&lt;br/&gt;
         (let &lt;span class=&quot;error&quot;&gt;&amp;#91;failure (atom nil)&amp;#93;&lt;/span&gt;&lt;br/&gt;
           #(if @failure&lt;br/&gt;
@@ -51,7 +51,7 @@&lt;br/&gt;
                  (do (reset! failure msg) (throw msg))&lt;br/&gt;
                  msg))))&lt;br/&gt;
         write&lt;/li&gt;
	&lt;li&gt;close))))&lt;br/&gt;
+        (fn [] (close)(future-cancel transport-thread))))))&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-39] Using functions reading from *in* causes &quot;java.io.IOException: Write end dead&quot;</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-39</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When calling (read-line) from lein repl or ccw repl, waiting around four minutes (on my machine),&lt;br/&gt;
evaluating any form causes the following exception:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;ERROR: Unhandled REPL handler exception processing message {:code (+ 1 1), :id 08e30b70-ab0f-4a47-8937-3c040ce06f4f, :ns user, :op eval, :session 916200cc-e476-4ac4-98f6-76057a9020be}
java.io.IOException: Write end dead
	at java.io.PipedReader.ready(Unknown Source)
	at clojure.tools.nrepl.middleware.session.proxy$java.io.PipedReader$0.ready(Unknown Source)
	at java.io.BufferedReader.ready(Unknown Source)
	at java.io.FilterReader.ready(Unknown Source)
	at java.io.PushbackReader.ready(Unknown Source)
	at clojure.tools.nrepl.middleware.session$add_stdin$fn__1103.invoke(session.clj:197)
	at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__840.invoke(middleware.clj:17)
	at clojure.tools.nrepl.middleware.session$session$fn__1093.invoke(session.clj:165)
	at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__840.invoke(middleware.clj:17)
	at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18)
	at clojure.tools.nrepl.server$handle$fn__1132.invoke(server.clj:27)
	at clojure.core$binding_conveyor_fn$fn__4130.invoke(core.clj:1836)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While googling a bit on this and without concrete knowledge of the implementation in nrepl,&lt;br/&gt;
it seems like closing a thread that wrote to PipedWriter, before closing the writer or writing to it from another thread,&lt;br/&gt;
causes PipedReader#ready to throw that exception.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15985">NREPL-39</key>
            <summary>Using functions reading from *in* causes &quot;java.io.IOException: Write end dead&quot;</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="trptcolin">Colin Jones</assignee>
                                <reporter username="abp">Adrian Bendel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 3 Feb 2013 09:20:29 -0600</created>
                <updated>Sun, 7 Apr 2013 19:11:19 -0500</updated>
                    <resolved>Thu, 21 Mar 2013 23:40:26 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30706" author="trptcolin" created="Wed, 6 Mar 2013 17:46:08 -0600"  >&lt;p&gt;I found this related article: &lt;a href=&quot;http://techtavern.wordpress.com/2008/07/16/whats-this-ioexception-write-end-dead/&quot;&gt;http://techtavern.wordpress.com/2008/07/16/whats-this-ioexception-write-end-dead/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So it seems like we may need something a little more robust. I&apos;m thinking just a LinkedBlockingQueue that gets written to on input, with a Reader proxy over the top to hook up to Clojure&apos;s LineNumberingPushbackReader. I&apos;ve started fiddling with that idea, passing most of the tests already, and I think this is the right path to go down in general. Yell at me if you see a problem with this plan.&lt;/p&gt;</comment>
                    <comment id="30710" author="cemerick" created="Thu, 7 Mar 2013 04:50:01 -0600"  >&lt;p&gt;I had &lt;em&gt;no&lt;/em&gt; idea that PipedReader &amp;amp; co. actually track the threads that touch them.  That makes them entirely inappropriate for the &lt;tt&gt;&amp;#42;in&amp;#42;&lt;/tt&gt; case.&lt;/p&gt;

&lt;p&gt;+1 to your plan, thanks for chasing this!&lt;/p&gt;</comment>
                    <comment id="30718" author="trptcolin" created="Fri, 8 Mar 2013 15:28:38 -0600"  >&lt;p&gt;OK, this works for me against REPLy. &lt;/p&gt;

&lt;p&gt;I&apos;d have preferred to avoid the dynamic binding (&lt;b&gt;skipping-eol&lt;/b&gt;), but I haven&apos;t been able to think of another way to accomplish what it does. The problem is that we don&apos;t want to send another :need-input message just to clear newlines, but we don&apos;t have any visibility into what&apos;s in the LineNumberingPushbackReader&apos;s buffer (neither the full deal, nor the pushback). My initial thought was to replace the LineNumberingPushbackReader directly, with a custom thing, but I think the assumptions around that class in `read` and `read-line` are too concretely baked in to allow it (especially before 1.5, when the buffer size became configurable).&lt;/p&gt;

&lt;p&gt;And there&apos;s no room for adding bits to the Reader interface, so in order to effect a behavior difference in the Reader, depending on what the high-level state is, I don&apos;t know that there are any options aside from dynamic binding or an atom (and of the two, a var seemed more robust, no worries about finally &amp;amp; friends).&lt;/p&gt;</comment>
                    <comment id="30801" author="trptcolin" created="Thu, 21 Mar 2013 23:39:25 -0500"  >&lt;p&gt;Pushed to master: &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/3cd3d0e8b2091fc70fde1587d3f0a995cbf8b283&quot;&gt;https://github.com/clojure/tools.nrepl/commit/3cd3d0e8b2091fc70fde1587d3f0a995cbf8b283&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11901" name="0001-Use-a-queue-for-stdin-to-avoid-PipedReader-Writer.patch" size="10390" author="trptcolin" created="Fri, 8 Mar 2013 15:28:38 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-38] Certain Calendar values don&apos;t seem to be able to print</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-38</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If I try to run lein repl outside of a project folder, I get Clojure 1.4.0.&lt;br/&gt;
I then run&lt;/p&gt;

&lt;p&gt;(println (javax.xml.bind.DatatypeConverter/parseDateTime &quot;2008-07-21T19:17:29&quot;))&lt;/p&gt;

&lt;p&gt;which produces&lt;/p&gt;

&lt;p&gt;IndexOutOfBoundsException start 26, end 2, s.length() 28  java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:476)&lt;br/&gt;
#inst &quot;2008-07-21T19:17:29.000+01:&lt;/p&gt;

&lt;p&gt;Note the absence of a closing &apos;&quot;&apos;.&lt;/p&gt;

&lt;p&gt;My apologies in advance if this is impossible to reproduce.&lt;/p&gt;</description>
                <environment>Ubuntu 12.10, running through Leiningen 2</environment>
            <key id="15958">NREPL-38</key>
            <summary>Certain Calendar values don&apos;t seem to be able to print</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="julian">Julian Birch</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Sat, 12 Jan 2013 07:55:07 -0600</created>
                <updated>Sun, 13 Jan 2013 12:29:52 -0600</updated>
                    <resolved>Sun, 13 Jan 2013 12:29:52 -0600</resolved>
                            <version>0.2.0</version>
                                <fixVersion>0.2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30430" author="jafingerhut" created="Sun, 13 Jan 2013 09:55:10 -0600"  >&lt;p&gt;I can reproduce this with Clojure 1.4.0 and 1.5.0-RC2 if I do it within &quot;lein2 repl&quot; (I was using Leiningen version 2.0.0-preview10 to reproduce the problem).&lt;/p&gt;

&lt;p&gt;If I use &quot;java -cp clojure.jar clojure.main&quot; to start a REPL session, with either Clojure 1.4.0 or 1.5.0-RC2 for clojure.jar, I don&apos;t see any problem.  I was testing on Mac OS X 10.6.8 with Oracle/Apple JDK 1.6.0_37.&lt;/p&gt;

&lt;p&gt;I also don&apos;t see this problem if I use Leiningen version 1.7.1, tested with both Clojure 1.4.0 and 1.5.0-RC2.&lt;/p&gt;

&lt;p&gt;This appears to be some kind of bad interaction between Leiningen 2.0.0-preview10 and Clojure.&lt;/p&gt;</comment>
                    <comment id="30431" author="jafingerhut" created="Sun, 13 Jan 2013 10:05:13 -0600"  >&lt;p&gt;I also reproduced this issue with the latest version of Leiningen, which is 2.0.0-RC2.  Email sent to the Leiningen developer email list so they know about it.&lt;/p&gt;</comment>
                    <comment id="30433" author="cemerick" created="Sun, 13 Jan 2013 10:52:40 -0600"  >&lt;p&gt;This is an nREPL bug involving an API mismatch between java.io.Writer.write() and java.lang.AbstractStringBuilder.append().&lt;/p&gt;

&lt;p&gt;The fix is simple; patch release coming later today.&lt;/p&gt;</comment>
                    <comment id="30434" author="cemerick" created="Sun, 13 Jan 2013 12:29:52 -0600"  >&lt;p&gt;Fixed with &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/b9e930a1bfbd9616644aa6f0112769cc233cc61e&quot;&gt;b9e930a1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Will be a part of &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/tools.nrepl &amp;quot;0.2.1&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;, to be released later today.&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>[NREPL-37] Printing reference returned by clojure.tools.nrepl.server/start-server causes multimethod exception</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-37</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;I was accidentally printing the reference returned by start-server by calling it as the final function in my main method, which causes this error:&lt;/p&gt;

&lt;p&gt;java.lang.IllegalArgumentException: Multiple methods in multimethod &apos;print-method&apos; match dispatch value: class clojure.tools.nrepl.server.Server -&amp;gt; interface clojure.lang.IDeref and interface clojure.lang.IRecord, and neither is preferred&lt;br/&gt;
        at clojure.lang.MultiFn.findAndCacheBestMethod(MultiFn.java:136)&lt;br/&gt;
        at clojure.lang.MultiFn.getMethod(MultiFn.java:111)&lt;br/&gt;
        at clojure.lang.MultiFn.getFn(MultiFn.java:119)&lt;br/&gt;
        at clojure.lang.MultiFn.invoke(MultiFn.java:167)&lt;br/&gt;
        at clojure.core$pr_on.invoke(core.clj:3266)&lt;br/&gt;
        at clojure.core$pr.invoke(core.clj:3278)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:161)&lt;br/&gt;
        at clojure.lang.RestFn.applyTo(RestFn.java:132)&lt;br/&gt;
        at clojure.core$apply.invoke(core.clj:601)&lt;br/&gt;
        at clojure.core$prn.doInvoke(core.clj:3311)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
        at clojure.main$eval_opt.invoke(main.clj:299)&lt;br/&gt;
        at clojure.main$initialize.invoke(main.clj:316)&lt;br/&gt;
        at clojure.main$null_opt.invoke(main.clj:349)&lt;br/&gt;
        at clojure.main$main.doInvoke(main.clj:427)&lt;br/&gt;
        at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
        at clojure.lang.Var.invoke(Var.java:419)&lt;br/&gt;
        at clojure.lang.AFn.applyToHelper(AFn.java:163)&lt;br/&gt;
        at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
        at clojure.main.main(main.java:37)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15910">NREPL-37</key>
            <summary>Printing reference returned by clojure.tools.nrepl.server/start-server causes multimethod exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="vaughnd">Vaughn Dickson</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 20 Dec 2012 08:05:27 -0600</created>
                <updated>Tue, 26 Feb 2013 04:42:58 -0600</updated>
                    <resolved>Tue, 26 Feb 2013 04:42:58 -0600</resolved>
                            <version>0.2.0-RC1</version>
                                <fixVersion>0.2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30526" author="cemerick" created="Sat, 2 Feb 2013 07:35:19 -0600"  >&lt;p&gt;The fact that the returned record is also a &lt;tt&gt;clojure.lang.IDeref&lt;/tt&gt; is a temporary compatibility measure, a result of changing to returning a record.&lt;/p&gt;

&lt;p&gt;Adding a print-method implementation for the &lt;tt&gt;Server&lt;/tt&gt; type that explicitly delegates to the &lt;tt&gt;IRecord&lt;/tt&gt; implementation would resolve the problem.&lt;/p&gt;</comment>
                    <comment id="30651" author="cemerick" created="Tue, 26 Feb 2013 04:42:58 -0600"  >&lt;p&gt;Fixed @ &lt;a href=&quot;http://github.com/clojure/tools.nrepl/commit/0f016eb&quot;&gt;http://github.com/clojure/tools.nrepl/commit/0f016eb&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>[NREPL-36] Too many DynamicClassLoaders created</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-36</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Not sure whether this ticket belongs here or in the Clojure-proper JIRA, so feel free to close if this is an inappropriate location. clojure.main/repl creates a new DynamicClassLoader on every execution, so it looks like the stack of classloaders grows without bounds. Seems a bit similar to &lt;a href=&quot;http://dev.clojure.org/jira/browse/NREPL-31&quot;&gt;http://dev.clojure.org/jira/browse/NREPL-31&lt;/a&gt; in that clojure.main/repl has another assumption about when clojure.main/repl will run.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/clojure/firG9zTVecU%5B1-25%5D&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/clojure/firG9zTVecU%5B1-25%5D&lt;/a&gt; for the original report.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15879">NREPL-36</key>
            <summary>Too many DynamicClassLoaders created</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Dec 2012 10:31:45 -0600</created>
                <updated>Mon, 10 Dec 2012 14:25:30 -0600</updated>
                                    <version>0.2.0-RC1</version>
                <version>0.2.0-beta9</version>
                <version>0.2.0-beta10</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-35] Eliminate several uses of reflection in tools.nrepl</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-35</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;There are several uses of reflection in tools.nrepl that can be eliminated with suitable type hints.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15797">NREPL-35</key>
            <summary>Eliminate several uses of reflection in tools.nrepl</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="jafingerhut">Andy Fingerhut</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Oct 2012 22:11:08 -0500</created>
                <updated>Wed, 31 Oct 2012 04:44:06 -0500</updated>
                    <resolved>Wed, 31 Oct 2012 04:44:06 -0500</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29861" author="jafingerhut" created="Sun, 28 Oct 2012 22:12:37 -0500"  >&lt;p&gt;nrepl-35-eliminate-reflection-v1.txt dated Oct 28 2012 adds type hints to eliminate some of the reflection warnings in tools.nrepl.  There are still some left over that are not as obvious how to eliminate, if it is even possible.&lt;/p&gt;</comment>
                    <comment id="29877" author="cemerick" created="Wed, 31 Oct 2012 04:44:06 -0500"  >&lt;p&gt;Thanks for the patch, but it overhinted in some areas (I try to keep hints at an absolute minimum to maximize readability) and overconstrained in others (e.g. ThreadPoolExecutor vs. Executor).&lt;/p&gt;

&lt;p&gt;Fixed @ &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/ac95dc7da973f3d7edea75d0f6f9ce01ee18641d&quot;&gt;https://github.com/clojure/tools.nrepl/commit/ac95dc7da973f3d7edea75d0f6f9ce01ee18641d&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11635" name="nrepl-35-eliminate-reflection-v1.txt" size="7533" author="jafingerhut" created="Sun, 28 Oct 2012 22:12:37 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-34] Default load-file middleware cannot load large files due to JVM method size limitations</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-34</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Simply interpolating contents of files to be loaded into a &lt;tt&gt;Compiler/load&lt;/tt&gt; expression to be evaluated does not work with very large files.  (See &lt;a href=&quot;http://code.google.com/p/counterclockwise/issues/detail?id=429&quot;&gt;http://code.google.com/p/counterclockwise/issues/detail?id=429&lt;/a&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15745">NREPL-34</key>
            <summary>Default load-file middleware cannot load large files due to JVM method size limitations</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Oct 2012 23:28:01 -0500</created>
                <updated>Thu, 11 Oct 2012 23:34:44 -0500</updated>
                    <resolved>Thu, 11 Oct 2012 23:34:44 -0500</resolved>
                            <version>0.2.0-beta10</version>
                                <fixVersion>0.2.0-RC1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29638" author="cemerick" created="Thu, 11 Oct 2012 23:34:44 -0500"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/77cb7d2347b0a78094ea32d7757aa3e3662fc634&quot;&gt;https://github.com/clojure/tools.nrepl/commit/77cb7d2347b0a78094ea32d7757aa3e3662fc634&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>[NREPL-33] Consider making session and eval functionality more accessible</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-33</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;ritz re-uses some of nrepl&apos;s private functions to avoid duplication. The uses are listed below.&lt;/p&gt;

&lt;p&gt;Would it be possible to make these functions public? More subjectively, it might also be worth considering factoring out the session functionality into it&apos;s own namespace (including &lt;b&gt;msg&lt;/b&gt; and possibly queue-eval), so the functionality is not split across the session middleware and the interruptible-eval middleware.&lt;/p&gt;

&lt;p&gt;The debug nrepl server: &lt;br/&gt;
&lt;a href=&quot;https://github.com/pallet/ritz/blob/develop/nrepl/src/ritz/nrepl.clj#L189&quot;&gt;https://github.com/pallet/ritz/blob/develop/nrepl/src/ritz/nrepl.clj#L189&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This uses clojure.tools.nrepl.middleware.session/create-session and clojure.tools.nrepl.middleware.session/session-out &lt;/p&gt;


&lt;p&gt;ritz provides an eval op that tracks source forms: &lt;br/&gt;
&lt;a href=&quot;https://github.com/pallet/ritz/blob/develop/nrepl-middleware/src/ritz/nrepl/middleware/tracking_eval.clj&quot;&gt;https://github.com/pallet/ritz/blob/develop/nrepl-middleware/src/ritz/nrepl/middleware/tracking_eval.clj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This uses  clojure.tools.nrepl.middleware.interruptible-eval/queue-eval and clojure.tools.nrepl.middleware.interruptible-eval/configure-executor&lt;/p&gt;



</description>
                <environment></environment>
            <key id="15737">NREPL-33</key>
            <summary>Consider making session and eval functionality more accessible</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="cemerick">Chas Emerick</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Oct 2012 13:24:45 -0500</created>
                <updated>Mon, 8 Oct 2012 13:24:45 -0500</updated>
                                    <version>0.2.0-beta9</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-32] Handling of messages is serialized on a per-connection basis</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-32</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description></description>
                <environment></environment>
            <key id="15732">NREPL-32</key>
            <summary>Handling of messages is serialized on a per-connection basis</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Oct 2012 22:44:13 -0500</created>
                <updated>Thu, 4 Oct 2012 00:31:07 -0500</updated>
                    <resolved>Thu, 4 Oct 2012 00:31:07 -0500</resolved>
                                            <fixVersion>0.2.0-beta10</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29593" author="cemerick" created="Thu, 4 Oct 2012 00:31:07 -0500"  >&lt;p&gt;Fixed @ &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/2f12262834e5b93b8536c81b12df25b2b75e0254&quot;&gt;2f12262834e5b93b8536c81b12df25b2b75e0254&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>[NREPL-31] REPL utilities are refered into *ns* prior to every expression evaluation</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-31</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;The refers of REPL utilities (&lt;tt&gt;pst&lt;/tt&gt;, &lt;tt&gt;pprint&lt;/tt&gt;, etc) happens in &lt;tt&gt;clojure.main/repl&lt;/tt&gt;.  In a terminal/single-threaded REPL, this is called just once, so it only ever affects the &lt;tt&gt;user&lt;/tt&gt; namespace.  Every expression sent for evaluation by nREPL invokes &lt;tt&gt;clojure.main/repl&lt;/tt&gt; though, so moving &lt;tt&gt;&amp;#42;ns&amp;#42;&lt;/tt&gt; around will inadvertently cause those refers to happen over and over, into non-&lt;tt&gt;user&lt;/tt&gt; namespaces.  (I&apos;ve been enjoying having &lt;tt&gt;pprint&lt;/tt&gt; and &lt;tt&gt;pp&lt;/tt&gt; available all the time, but I&apos;d never thought much about why they were always there.)&lt;/p&gt;

&lt;p&gt;In the end, this is an nREPL bug.&lt;/p&gt;

&lt;p&gt;I don&apos;t see any easy way out off the top of my head.  I think nREPL will end up having to stop using &lt;tt&gt;clojure.main/repl&lt;/tt&gt;, and maintain a modified version of it itself (something I wanted to avoid exactly so as to benefit from the changes to &lt;tt&gt;clojure.main/repl&lt;/tt&gt; from version to version of Clojure).&lt;/p&gt;

&lt;p&gt;Suggestions most welcome.&lt;/p&gt;

&lt;p&gt;(Originally reported &lt;a href=&quot;http://code.google.com/p/counterclockwise/issues/detail?id=443&quot;&gt;here&lt;/a&gt;.)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15731">NREPL-31</key>
            <summary>REPL utilities are refered into *ns* prior to every expression evaluation</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Oct 2012 15:51:26 -0500</created>
                <updated>Mon, 22 Oct 2012 20:01:40 -0500</updated>
                    <resolved>Mon, 22 Oct 2012 20:01:40 -0500</resolved>
                            <version>0.2.0-beta9</version>
                                <fixVersion>0.2.0</fixVersion>
                <fixVersion>0.2.0-RC1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29635" author="cemerick" created="Thu, 11 Oct 2012 14:10:12 -0500"  >&lt;p&gt;Hopefully &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1085&quot; title=&quot;clojure.main/repl unconditionally refers REPL utilities into *ns*&quot;&gt;&lt;del&gt;CLJ-1085&lt;/del&gt;&lt;/a&gt; is resolved and this can drop off.  In the meantime, not going to hold off -beta10 for it or this.&lt;/p&gt;</comment>
                    <comment id="29770" author="cemerick" created="Mon, 22 Oct 2012 20:01:40 -0500"  >&lt;p&gt;Fixed upstream in &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1085&quot; title=&quot;clojure.main/repl unconditionally refers REPL utilities into *ns*&quot;&gt;&lt;del&gt;CLJ-1085&lt;/del&gt;&lt;/a&gt;.  Note that this issue will continue to affect those using Clojure &amp;lt; 1.5.0.&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>[NREPL-30] Investigate hangs when server goes away</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-30</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://github.com/trptcolin/reply/issues/84#issuecomment-8481753&quot;&gt;https://github.com/trptcolin/reply/issues/84#issuecomment-8481753&lt;/a&gt; and maybe &lt;a href=&quot;http://code.google.com/p/counterclockwise/issues/detail?id=405&quot;&gt;http://code.google.com/p/counterclockwise/issues/detail?id=405&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15693">NREPL-30</key>
            <summary>Investigate hangs when server goes away</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Sep 2012 07:39:07 -0500</created>
                <updated>Mon, 8 Oct 2012 12:42:34 -0500</updated>
                    <resolved>Mon, 8 Oct 2012 12:42:34 -0500</resolved>
                            <version>0.2.0-beta9</version>
                <version>0.2.0-beta10</version>
                                <fixVersion>0.2.0-beta10</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29440" author="trptcolin" created="Fri, 14 Sep 2012 09:03:52 -0500"  >&lt;p&gt;If it helps, I did observe in some testing that after the server side of the socket goes down, writing to and flushing the client socket&apos;s output stream &lt;b&gt;twice&lt;/b&gt; would bubble up a client exception. That seems a little keepalive-ish, but I&apos;m not sure whether that sort of thing would do other transports any good.&lt;/p&gt;</comment>
                    <comment id="29590" author="cemerick" created="Wed, 3 Oct 2012 12:37:43 -0500"  >&lt;p&gt;A fix for this is on master now, with commit &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/8a5dad2045434fcc06f2878de55f7dcdefa01a1b&quot;&gt;8a5dad2045434fcc06f2878de55f7dcdefa01a1b&lt;/a&gt;.  There were a number of issues in the implementation of &lt;tt&gt;FnTransport&lt;/tt&gt; that were preventing exceptions from bubbling up as they should have been.&lt;/p&gt;

&lt;p&gt;No APIs were harmed in the course of implementing a fix.  Also, no keepalive mechanism was required (which makes me slightly suspicious that the issue has actually been fixed, but we&apos;ll see).  (Not TCP keepalive; that&apos;s irrelevant to the issue, and wouldn&apos;t help even if it were reliably standard/present.)&lt;/p&gt;

&lt;p&gt;New tests added, and manual verification against nREPL servers running in different processes looks good too.  I&apos;ll put out an &lt;tt&gt;0.2.0-beta10&lt;/tt&gt; shortly so that people can start banging on this to see if it resolves issues in downstream projects/tools.&lt;/p&gt;

&lt;p&gt;Note that I also found that it &lt;b&gt;sometimes&lt;/b&gt; requires two sends (messages here, not writes to a socket) to provoke an error when writing to a transport that had been connected to a server that was closed or otherwise went away.  Maybe it&apos;s a buffering issue?  I don&apos;t have a good theory.  Check out e.g. &lt;tt&gt;nrepl-test/transports-fail-on-disconnects&lt;/tt&gt; if you want to play around with it.&lt;/p&gt;</comment>
                    <comment id="29596" author="cemerick" created="Thu, 4 Oct 2012 17:06:36 -0500"  >&lt;p&gt;Note that the bencode transport should throw a &lt;tt&gt;java.net.SocketException&lt;/tt&gt; when its connection is lost.&lt;/p&gt;</comment>
                    <comment id="29615" author="cemerick" created="Mon, 8 Oct 2012 12:42:34 -0500"  >&lt;p&gt;Good reports received from downstream projects on the fix for this. Calling it good.&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>[NREPL-29] Provide a mechanism for overriding an operation</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-29</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When specifying middleware, it would be much easier for the user to be able to override a default middleware without having to specify a handler.&lt;/p&gt;

&lt;p&gt;For example, if there is a default middleware providing the &quot;complete&quot; operation, the user should be able to just specify their preferred completion middleware, without having to specify all middleware as a handler.&lt;/p&gt;

&lt;p&gt;One way to do this might be to check metadata for the provided operations of the specified metadata, and ensure that either the default middleware for that operation is removed, or that the specified middleware takes precendence (which may be simpler when a middleware provides multiple operations).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15687">NREPL-29</key>
            <summary>Provide a mechanism for overriding an operation</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Sep 2012 14:11:13 -0500</created>
                <updated>Tue, 13 Nov 2012 12:17:57 -0600</updated>
                                    <version>0.2.0-beta9</version>
                <version>0.2.0-beta10</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29439" author="cemerick" created="Fri, 14 Sep 2012 07:44:39 -0500"  >&lt;p&gt;Agreed.&lt;/p&gt;

&lt;p&gt;Just making sure that the order in which additional middlewares are provided is taken as a default stack order will suffice for most use cases.  Transforming middlewares (either in full or in part) would need another metadata slot, &lt;tt&gt;:replace&lt;/tt&gt; perhaps, though it seems like that would be much more difficult to get right.&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>[NREPL-28] Clarify semantics for String encoding</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-28</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description></description>
                <environment></environment>
            <key id="15639">NREPL-28</key>
            <summary>Clarify semantics for String encoding</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Aug 2012 20:27:05 -0500</created>
                <updated>Thu, 11 Oct 2012 14:20:38 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29249" author="cemerick" created="Tue, 21 Aug 2012 20:27:51 -0500"  >&lt;p&gt;Initial discussion held in &lt;a href=&quot;http://dev.clojure.org/jira/browse/NREPL-11&quot; title=&quot;Ensure efficient bytestring (byte[]) support in bencode transport&quot;&gt;&lt;del&gt;NREPL-11&lt;/del&gt;&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>[NREPL-26] Middleware metadata + collection of middleware names =&gt; well-formed handler</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-26</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description></description>
                <environment></environment>
            <key id="15624">NREPL-26</key>
            <summary>Middleware metadata + collection of middleware names =&gt; well-formed handler</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Aug 2012 23:32:50 -0500</created>
                <updated>Mon, 20 Aug 2012 15:48:26 -0500</updated>
                    <resolved>Mon, 20 Aug 2012 15:48:26 -0500</resolved>
                                            <fixVersion>0.2.0-beta9</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29233" author="cemerick" created="Mon, 20 Aug 2012 15:48:26 -0500"  >&lt;p&gt;See &lt;tt&gt;clojure.tools.nrepl.middleware&lt;/tt&gt;, the metadata descriptors described there, etc.&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>[NREPL-25] Metadata -&gt; middleware/handler documentation</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-25</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description></description>
                <environment></environment>
            <key id="15623">NREPL-25</key>
            <summary>Metadata -&gt; middleware/handler documentation</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Aug 2012 23:31:46 -0500</created>
                <updated>Mon, 13 Aug 2012 23:31:47 -0500</updated>
                    <resolved>Mon, 13 Aug 2012 23:31:11 -0500</resolved>
                                            <fixVersion>0.2.0-beta9</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29129" author="cemerick" created="Mon, 13 Aug 2012 23:31:47 -0500"  >&lt;p&gt;See &lt;tt&gt;clojure.tools.nrepl.middleware/wrap-describe&lt;/tt&gt;, &lt;tt&gt;set-descriptor!&lt;/tt&gt;, etc.&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>[NREPL-24] :session key is overloaded</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-24</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;The session middleware takes the :session key from the message, and uses it as an id to lookup session data, which it then places on the same key.&lt;/p&gt;

&lt;p&gt;Using a separate key for the session id and the session data would be less confusing, and would allow easier checking of the availability of the session data in the message map.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15621">NREPL-24</key>
            <summary>:session key is overloaded</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="cemerick">Chas Emerick</assignee>
                                <reporter username="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Aug 2012 13:44:22 -0500</created>
                <updated>Wed, 3 Oct 2012 07:05:07 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29112" author="cemerick" created="Fri, 10 Aug 2012 23:26:15 -0500"  >&lt;p&gt;The session id will need to continue to come in in the &lt;tt&gt;:session&lt;/tt&gt; slot, as I don&apos;t want to break clients (and, there&apos;s very, very few middlewares out there yet).&lt;/p&gt;

&lt;p&gt;Suggestions for names for the actual session atom?  &lt;tt&gt;:the-session&lt;/tt&gt;? :-/&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-23] NPE when interruptible-eval/evaluate is passed a non-existant namespace</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-23</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Stack Trace&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Exception in thread &quot;nREPL-worker-2&quot; java.lang.NullPointerException
	at clojure.core$refer.doInvoke(core.clj:3779)
	at clojure.lang.RestFn.applyTo(RestFn.java:139)
	at clojure.core$apply.invoke(core.clj:603)
	at clojure.core$load_lib.doInvoke(core.clj:5279)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invoke(core.clj:603)
	at clojure.core$load_libs.doInvoke(core.clj:5298)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invoke(core.clj:605)
	at clojure.core$use.doInvoke(core.clj:5392)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.main$repl.doInvoke(main.clj:259)
	at clojure.lang.RestFn.invoke(RestFn.java:1096)
	at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__337.invoke(interruptible_eval.clj:51)
	at clojure.lang.AFn.applyToHelper(AFn.java:159)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at clojure.core$apply.invoke(core.clj:601)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:36)
	at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__374$fn__376.invoke(interruptible_eval.clj:162)
	at clojure.core$comp$fn__4034.invoke(core.clj:2278)
	at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__367.invoke(interruptible_eval.clj:129)
	at clojure.lang.AFn.run(AFn.java:24)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15586">NREPL-23</key>
            <summary>NPE when interruptible-eval/evaluate is passed a non-existant namespace</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="jsnikeris">Joe Snikeris</reporter>
                        <labels>
                    </labels>
                <created>Sun, 22 Jul 2012 11:19:08 -0500</created>
                <updated>Mon, 20 Aug 2012 21:40:11 -0500</updated>
                    <resolved>Mon, 20 Aug 2012 21:40:11 -0500</resolved>
                            <version>0.2.0</version>
                                <fixVersion>0.2.0-beta9</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29022" author="jsnikeris" created="Sun, 22 Jul 2012 11:23:00 -0500"  >&lt;p&gt;I&apos;m not sure which would be better: behave as if one wasn&apos;t passed in or return an error on the transport.&lt;/p&gt;</comment>
                    <comment id="29236" author="cemerick" created="Mon, 20 Aug 2012 21:40:11 -0500"  >&lt;p&gt;Fixed to send an error with a &lt;tt&gt;status&lt;/tt&gt; of &lt;tt&gt;&quot;namespace-not-found&quot;&lt;/tt&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-22] CLONE - set stack size for Android</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-22</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If you want to use nREPL on Android (currently only possible with sattvik&apos;s fork of Clojure) then you need bigger stack sizes than Android&apos;s default 8k to eval even moderately complex expressions. For comparison: A regular JVM on a PC has default stack sizes around 256k ... 512k depending on platform.&lt;/p&gt;

&lt;p&gt;In nrepl.clj, modify&lt;/p&gt;

&lt;p&gt;(doto (Thread. r)&lt;br/&gt;
  (.setDaemon true))))))&lt;/p&gt;

&lt;p&gt;to read&lt;/p&gt;

&lt;p&gt;(doto (Thread. (.getThreadGroup (Thread/currentThread)) r &quot;nREPL&quot; 524288)  ; 512k generous stack size&lt;br/&gt;
  (.setDaemon true))))))&lt;/p&gt;

&lt;p&gt;Note: There are warnings here &lt;a href=&quot;http://bit.ly/u86tF1&quot;&gt;http://bit.ly/u86tF1&lt;/a&gt; about choosing a good stack size but since in practice nREPL seems to have &amp;lt;10 threads running with 1 active client connection we can be generous here.&lt;/p&gt;

&lt;p&gt;The more advanced version would be to make this somehow configurable but that&apos;d probably be over-engineering things.&lt;/p&gt;</description>
                <environment>Android</environment>
            <key id="15561">NREPL-22</key>
            <summary>CLONE - set stack size for Android</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="hank">Hank</reporter>
                        <labels>
                        <label>Android</label>
                    </labels>
                <created>Sat, 30 Jun 2012 09:19:33 -0500</created>
                <updated>Tue, 24 Jul 2012 04:52:02 -0500</updated>
                    <resolved>Tue, 24 Jul 2012 04:52:02 -0500</resolved>
                            <version>0.0.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28921" author="hank" created="Sat, 30 Jun 2012 09:21:14 -0500"  >&lt;p&gt;I understand that after a brief detour via agents we&apos;re now back to creating our own threads in nREPL. So the above applies gain. Apparently in JIRA you can&apos;t reopen issues so I&apos;m &apos;cloning&apos; this one.&lt;/p&gt;</comment>
                    <comment id="29036" author="cemerick" created="Tue, 24 Jul 2012 04:52:02 -0500"  >&lt;p&gt;I was able to reopen &lt;a href=&quot;http://dev.clojure.org/jira/browse/NREPL-8&quot; title=&quot;set stack size for Android&quot;&gt;&lt;del&gt;NREPL-8&lt;/del&gt;&lt;/a&gt;; let&apos;s track it there.&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>[NREPL-21] Sometimes *err*/*out*/value messages are surprisingly ordered</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-21</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;As described here: &lt;a href=&quot;https://github.com/technomancy/leiningen/issues/631&quot;&gt;https://github.com/technomancy/leiningen/issues/631&lt;/a&gt;, the &amp;#42;out&amp;#42;, &amp;#42;err&amp;#42;, and value printing are ordered differently than expected sometimes. &lt;/p&gt;

&lt;p&gt;There are 2 things left here:&lt;br/&gt;
(1) The return value can sometimes print before synchronous prints to err/out. Synchronizing all the printing on the REPLy side doesn&apos;t seem to help. An example case:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (.print *err* &lt;span class=&quot;code-quote&quot;&gt;&quot;one&quot;&lt;/span&gt;) (print &lt;span class=&quot;code-quote&quot;&gt;&quot;two&quot;&lt;/span&gt;) (print &lt;span class=&quot;code-quote&quot;&gt;&quot;three&quot;&lt;/span&gt;))
niltwothreeone&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(2) Calling .println() on the &amp;#42;out&amp;#42;/&amp;#42;err&amp;#42; streams doesn&apos;t necessarily flush the stream. Changing this may have performance/network ramifications, but generally it seems like surprising behavior. An example case: &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;user=&amp;gt; (&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; (.println *out* &lt;span class=&quot;code-quote&quot;&gt;&quot;one&quot;&lt;/span&gt;) (.print *err* &lt;span class=&quot;code-quote&quot;&gt;&quot;two&quot;&lt;/span&gt;) (.print *err* &lt;span class=&quot;code-quote&quot;&gt;&quot;three&quot;&lt;/span&gt;) 1)
twothreeone
1&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;d expect two .print() calls to different streams to have undefined ordering, but the other orderings were all surprising.&lt;/p&gt;

&lt;p&gt;The attached patch forces flushes to avoid both of these, for (1) immediately before sending the value message, and for (2) on the &quot;normal&quot; PrintStream &lt;span class=&quot;error&quot;&gt;&amp;#91;autoFlush&amp;#93;&lt;/span&gt; cases of println, printf, or format.&lt;/p&gt;

&lt;p&gt;Side note: I couldn&apos;t get any tests to fail in this scenario, even after doing some reworking of the streams used in tests, but I kept one new test in this patch anyway. Turns out it&apos;s hard to write tests that really make sure .flush() gets called.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15541">NREPL-21</key>
            <summary>Sometimes *err*/*out*/value messages are surprisingly ordered</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Sun, 17 Jun 2012 18:06:03 -0500</created>
                <updated>Wed, 20 Jun 2012 06:58:58 -0500</updated>
                    <resolved>Wed, 20 Jun 2012 06:58:58 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28882" author="cemerick" created="Wed, 20 Jun 2012 06:58:58 -0500"  >&lt;p&gt;Merged, thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11330" name="0001-Flush-out-err-before-sending-value.patch" size="2963" author="trptcolin" created="Sun, 17 Jun 2012 18:06:03 -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>[NREPL-20] Stray &quot;#&quot; in session-out is breaking (.println *out*)</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-20</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;There&apos;s a stray &quot;#&quot; in clojure.tools.nrepl.middleware.session/session-out which is turning the body of the (not off) case into a lambda that&apos;s never executed:&lt;/p&gt;

&lt;p&gt;(cond&lt;br/&gt;
 (number? x) (.append buf (char x))&lt;br/&gt;
 (not off) #(.append buf x)    ; &amp;lt;----&lt;br/&gt;
 (instance? CharSequence x) (.append buf ^CharSequence x off len)&lt;br/&gt;
 :else (.append buf ^chars x off len))&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/middleware/session.clj#L34&quot;&gt;https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/middleware/session.clj#L34&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is causing the newline character in (.println &lt;b&gt;out&lt;/b&gt;) and (.println &lt;b&gt;err&lt;/b&gt;) to be lost:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (with-open &lt;span class=&quot;error&quot;&gt;&amp;#91;conn (repl/connect :port 7888)&amp;#93;&lt;/span&gt;&lt;br/&gt;
     (-&amp;gt; (repl/client conn 1000)&lt;br/&gt;
       (repl/message {:op :eval :code &quot;(do (.println &lt;b&gt;out&lt;/b&gt; \&quot;1\&quot;) (.println &lt;b&gt;out&lt;/b&gt; \&quot;2\&quot;) (.println &lt;b&gt;out&lt;/b&gt; \&quot;3\&quot;)(flush))&quot;})&lt;br/&gt;
       doall       &lt;br/&gt;
       pprint))&lt;br/&gt;
({:out &quot;123&quot;,  ;; &amp;lt;--- where are my &quot;\n&quot;s?&lt;br/&gt;
  ...}, ...)&lt;/p&gt;

&lt;p&gt;Removing the stray &quot;#&quot; fixes the problem:&lt;/p&gt;

&lt;p&gt;{:out &quot;1\n2\n3\n&quot;,&lt;br/&gt;
 ...}&lt;/p&gt;

&lt;p&gt;Reported downstream by jaceklaskowski in &lt;a href=&quot;https://github.com/technomancy/leiningen/issues/631&quot;&gt;https://github.com/technomancy/leiningen/issues/631&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patch with the trivial fix and unit test here: &lt;a href=&quot;https://wok.meshy.org/~ato/0001-Remove-stray-hash-in-session-out-that-breaks-println-out.patch&quot;&gt;https://wok.meshy.org/~ato/0001-Remove-stray-hash-in-session-out-that-breaks-println-out.patch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Couldn&apos;t attach the patch to this issue as JIRA told me I don&apos;t have permission.  I (Alex Osborne) have signed the Clojure CA and contribute this patch as per the terms of it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15523">NREPL-20</key>
            <summary>Stray &quot;#&quot; in session-out is breaking (.println *out*)</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="aosborne">Alex Osborne</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jun 2012 07:26:31 -0500</created>
                <updated>Sat, 9 Jun 2012 10:54:01 -0500</updated>
                    <resolved>Sat, 9 Jun 2012 10:54:01 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28764" author="trptcolin" created="Sat, 9 Jun 2012 09:44:58 -0500"  >&lt;p&gt;Looks good, nice catch. Verified this test fails before the fix.&lt;/p&gt;

&lt;p&gt;Chas, want me to apply/push this? I&apos;m happy to do that, but wanted to wait since we haven&apos;t really talked about project workflow.&lt;/p&gt;</comment>
                    <comment id="28765" author="cemerick" created="Sat, 9 Jun 2012 10:54:01 -0500"  >&lt;p&gt;Thank you very much &#8212;&#160;patch applied to master.  I&apos;ll cut a new beta release on Monday so downstreams can pick it up.&lt;/p&gt;

&lt;p&gt;Good eye, by the way, I&apos;m sure I could have looked for days for that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[NREPL-19] Android: nREPL starts with no namespace</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-19</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When I start the nREPL on the Android device (by calling `(clojure.tools.nrepl.server/start-server :port 9999)`) it all goes well. But when I try to connect to this REPL using any of the clients I find myself in an empty namespace (or something like that). The var &lt;b&gt;ns&lt;/b&gt; is unbound, no functions from the clojure.core are available. At the beginning REPLy tries to perform some actions but they fail (says that it cannot find symbol `defn` - because nothing from clojure.core is being mapped).&lt;/p&gt;

&lt;p&gt;However I can do (in-ns &apos;anywhere) it works. Everything else in the REPL works correctly (as far as I see). The issue itself is minor but I&apos;m afraid that it is caused by some crash during nREPL initialization that might lead to other problems in future.&lt;/p&gt;</description>
                <environment>Android w/ Clojure 1.4.0, REPLy client / Eclipse CCW client</environment>
            <key id="15434">NREPL-19</key>
            <summary>Android: nREPL starts with no namespace</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="alexyakushev">Alexander Yakushev</reporter>
                        <labels>
                        <label>android,</label>
                        <label>bug</label>
                    </labels>
                <created>Fri, 11 May 2012 11:05:31 -0500</created>
                <updated>Wed, 20 Jun 2012 07:07:27 -0500</updated>
                    <resolved>Wed, 20 Jun 2012 07:07:27 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28456" author="alexyakushev" created="Fri, 11 May 2012 11:06:34 -0500"  >&lt;p&gt;Can&apos;t edit, I meant the *&lt;b&gt;ns&lt;/b&gt;* var, of course.&lt;/p&gt;</comment>
                    <comment id="28541" author="alexyakushev" created="Sat, 19 May 2012 16:32:21 -0500"  >&lt;p&gt;With the help of Daniel Solano G&#243;mez I managed to fix this bug. The problem was caused by the lack of &lt;tt&gt;user&lt;/tt&gt; namespace in the Android-patched Clojure. nREPL assumes that the &lt;tt&gt;user&lt;/tt&gt; namespace is present and uses it by default.&lt;/p&gt;

&lt;p&gt;Here&apos;s the so called fix I ended up with:&lt;/p&gt;

&lt;div class=&quot;code panel&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 [user-ns (create-ns &apos;user)]
  (binding [*ns* user-ns]
    (clojure.tools.nrepl.server/start-server :port 9999)))
...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The issue can be closed now.&lt;/p&gt;</comment>
                    <comment id="28616" author="cemerick" created="Sun, 27 May 2012 16:04:05 -0500"  >&lt;p&gt;A follow up Q: &lt;tt&gt;user&lt;/tt&gt; is created by &lt;tt&gt;clojure.lang.RT&lt;/tt&gt;&apos;s static initialization.  Is the lack of that in &quot;Android-patched Clojure&quot; an optimization of some sort?&lt;/p&gt;</comment>
                    <comment id="28617" author="alexyakushev" created="Sun, 27 May 2012 16:49:28 -0500"  >&lt;p&gt;Exactly, Daniel Solano G&#243;mez removed it because it&apos;s initialization took additional time, it seems.&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>[NREPL-18] Flush *out*/*err* after N characters</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-18</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Not sure how this should be configured, but it would be nice if doing something like (println large-seq-here) would flush output automatically after some number of characters. This is so that output could stream constantly across the nrepl connection instead of waiting for the entire output to send as one message (assuming no manual flushes).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15342">NREPL-18</key>
            <summary>Flush *out*/*err* after N characters</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2012 23:01:45 -0500</created>
                <updated>Wed, 20 Jun 2012 23:14:33 -0500</updated>
                    <resolved>Wed, 20 Jun 2012 23:14:33 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28301" author="trptcolin" created="Sat, 28 Apr 2012 13:31:36 -0500"  >&lt;p&gt;There is a precedent for this, in the sense that many output buffers have some fixed size, and they are flushed when that size has been reached (e.g. &lt;a href=&quot;http://www.gnu.org/software/libc/manual/html_node/Flushing-Buffers.html&quot;&gt;http://www.gnu.org/software/libc/manual/html_node/Flushing-Buffers.html&lt;/a&gt;, &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/io/BufferedWriter.html&quot;&gt;http://docs.oracle.com/javase/6/docs/api/java/io/BufferedWriter.html&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;We had talked about potential worries / headaches, where users may get partial lines printed at a time. But after more thought about it, I&apos;m thinking we may be OK: concurrent &lt;b&gt;out&lt;/b&gt;/&lt;b&gt;err&lt;/b&gt; writes can already interleave in interesting ways, and depending on the placement of (flush) calls (explicitly or implicitly) to make them more atomic is something I&apos;d already have expected to be fragile. Maybe others will see things I don&apos;t, though.&lt;/p&gt;

&lt;p&gt;The implementation I have uses 1024 as the default, but that&apos;s pretty arbitrary. A less dynamic way of setting the limit would be also be fine with me, though since we&apos;re already in I/O-land, I&apos;d assume performance isn&apos;t going to be bound by the dynamic var lookup.&lt;/p&gt;</comment>
                    <comment id="28851" author="trptcolin" created="Sun, 17 Jun 2012 18:09:27 -0500"  >&lt;p&gt;Any thoughts on this one? It would be great to be able to print big seqs incrementally.&lt;/p&gt;</comment>
                    <comment id="28884" author="cemerick" created="Wed, 20 Jun 2012 07:39:22 -0500"  >&lt;p&gt;Sorry for the delay, this fell through the cracks.&lt;/p&gt;

&lt;p&gt;Looks good to me, except: can we make the &quot;buffer size&quot; an argument to the &lt;tt&gt;session&lt;/tt&gt; middleware fn? That&apos;s where people will want to be able to customize it, if ever.&lt;/p&gt;

&lt;p&gt;Commit and close this at will. &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="28885" author="trptcolin" created="Wed, 20 Jun 2012 23:14:27 -0500"  >&lt;p&gt;Done, thanks a bunch!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11121" name="0001-Flush-output-after-session-out-limit-characters.patch" size="4640" author="trptcolin" created="Sat, 28 Apr 2012 13:27:33 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

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

<item>
            <title>[NREPL-17] Agent nesting causes issues</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-17</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;We talked about this briefly on IRC/github: &lt;a href=&quot;https://github.com/overtone/overtone/issues/85&quot;&gt;https://github.com/overtone/overtone/issues/85&lt;/a&gt;. I guess the nicest way to fix it would be to stop using agents in nREPL. There&apos;s only one spot where agents are created, and a few send-off calls (no sends), all internal, so any solution will be non-intrusive from an API perspective.&lt;/p&gt;

&lt;p&gt;One implementation idea is to use a simple blocking queue and thread pool in java-land.&lt;/p&gt;

&lt;p&gt;Another is to use nearly the same implementation as Agent, but remove the nesting restriction (call it NestableAgent?). Also get rid of the STM interaction and validator business since those aren&apos;t available outside the clojure.lang package &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;  - and then provide a parallel version of send-off. I&apos;ve spiked a bit on this one, but I&apos;m starting to think a plain queue/thread pool is cleaner.&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15331">NREPL-17</key>
            <summary>Agent nesting causes issues</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Apr 2012 00:11:34 -0500</created>
                <updated>Mon, 16 Apr 2012 15:08:50 -0500</updated>
                    <resolved>Mon, 16 Apr 2012 15:08:50 -0500</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28123" author="cemerick" created="Fri, 13 Apr 2012 05:18:18 -0500"  >&lt;p&gt;Yes, I started working on this yesterday.  Agents have definitely proven themselves unsuitable here, and a poor choice.&lt;/p&gt;

&lt;p&gt;I&apos;m not going to be fancy; we don&apos;t need fancy here.&lt;/p&gt;</comment>
                    <comment id="28124" author="trptcolin" created="Fri, 13 Apr 2012 05:49:01 -0500"  >&lt;p&gt;Great news! Thanks for the quick response.&lt;/p&gt;</comment>
                    <comment id="28164" author="cemerick" created="Mon, 16 Apr 2012 15:08:50 -0500"  >&lt;p&gt;Fixed in &lt;tt&gt;0.2.0-beta6&lt;/tt&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-16] nrepl.middleware.interruptible_eval/interruptible_eval raises a stack inconsistence Exception if the call to clojure.main/repl fails</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-16</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If the call to clojure.main/repl in `evaluate&apos; raises an exception before the :init part gets evaluated (so the expression `(push-thread-bindings @bindings)&apos; is executed) then nREPL crashes with the following exception:&lt;/p&gt;

&lt;p&gt;java.lang.IllegalStateException: Pop without matching push&lt;/p&gt;

&lt;p&gt;It happens because after the underlining exception in clojure.main/repl is caught by the try block in `evaluate&apos;, the `finally&apos; black calls (pop-thread-bindings) which were not actually &quot;pushed&quot;.&lt;/p&gt;</description>
                <environment>clojure 1.4.0-beta5, Android (?)</environment>
            <key id="15330">NREPL-16</key>
            <summary>nrepl.middleware.interruptible_eval/interruptible_eval raises a stack inconsistence Exception if the call to clojure.main/repl fails</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="alexyakushev">Alexander Yakushev</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 12 Apr 2012 02:41:45 -0500</created>
                <updated>Fri, 20 Apr 2012 13:40:04 -0500</updated>
                    <resolved>Mon, 16 Apr 2012 17:34:22 -0500</resolved>
                            <version>0.2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28165" author="cemerick" created="Mon, 16 Apr 2012 17:34:22 -0500"  >&lt;p&gt;Fixed in &lt;tt&gt;0.2.0-beta6&lt;/tt&gt;.  Please give it a try and see how it works on Android.&lt;/p&gt;</comment>
                    <comment id="28191" author="alexyakushev" created="Fri, 20 Apr 2012 13:40:04 -0500"  >&lt;p&gt;It is OK now. OK in a sense that if something wrong happens inside the clojure.main/repl function then the stacktrace points there after the application dies.&lt;br/&gt;
Thanks for you help!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-15] Allow clients to specify an ID for newly-retained sessions</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-15</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;...particularly important where less sophisticated clients and polling-oriented transports are involved (e.g. HTTP).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15305">NREPL-15</key>
            <summary>Allow clients to specify an ID for newly-retained sessions</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Mar 2012 12:51:29 -0500</created>
                <updated>Fri, 12 Oct 2012 00:52:25 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-14] Exception when running -main from clojure.tools.nrepl.cmdline</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-14</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Running -main from clojure.tools.nrepl.cmdline gives the following exception:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: No value supplied for key: 0&lt;br/&gt;
	at clojure.lang.PersistentHashMap.createWithCheck(PersistentHashMap.java:89)&lt;br/&gt;
	at clojure.core$hash_map.doInvoke(core.clj:355)&lt;br/&gt;
	at clojure.lang.RestFn.applyTo(RestFn.java:137)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:600)&lt;br/&gt;
	at clojure.tools.nrepl.server$start_server.doInvoke(server.clj:65)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:408)&lt;br/&gt;
	at clojure.tools.nrepl.cmdline$_main.doInvoke(cmdline.clj:74)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:397)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:397)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:159)&lt;br/&gt;
	at clojure.lang.Var.applyTo(Var.java:518)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:600)&lt;br/&gt;
	at clojure.main$main_opt.invoke(main.clj:323)&lt;br/&gt;
	at clojure.main$main.doInvoke(main.clj:426)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:405)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:163)&lt;br/&gt;
	at clojure.lang.Var.applyTo(Var.java:518)&lt;br/&gt;
	at clojure.main.main(main.java:37)&lt;/p&gt;

&lt;p&gt;It looks like the repl/connect and start-server functions have changed since cmdline.clj was written. I attached a patch that updates their usage.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15264">NREPL-14</key>
            <summary>Exception when running -main from clojure.tools.nrepl.cmdline</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="misfo">Trent Ogren</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Mar 2012 03:31:01 -0600</created>
                <updated>Wed, 20 Jun 2012 07:36:59 -0500</updated>
                    <resolved>Wed, 20 Jun 2012 07:36:59 -0500</resolved>
                            <version>0.2.0</version>
                                <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="28883" author="cemerick" created="Wed, 20 Jun 2012 07:36:59 -0500"  >&lt;p&gt;Merged, thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10979" name="0001-Fix-calls-using-old-function-signatures.patch" size="1405" author="misfo" created="Tue, 6 Mar 2012 03:31:01 -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>[NREPL-13] nrepl should support binding to a specific interface instead of all</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-13</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;nrepl currently accepts a :port to bind to as an option, and uses that with the single-arg ServerSocket constructor, which binds to that port on all interfaces. I propose we add a :host option as well that can be used to specify the hostname or address of the interface to bind to.&lt;/p&gt;

&lt;p&gt;Here is a potential implementation:&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;diff --git a/src/main/clojure/clojure/tools/nrepl/server.clj b/src/main/clojure/clojure/tools/nrepl/server.clj
index 9dbac40..b6f625b 100644
--- a/src/main/clojure/clojure/tools/nrepl/server.clj
+++ b/src/main/clojure/clojure/tools/nrepl/server.clj
@@ -8,7 +8,7 @@
                                             pr-values
                                             session))
   (:use [clojure.tools.nrepl.misc :only (returning response-for log)])
-  (:import (java.net Socket ServerSocket)))
+  (:import (java.net InetAddress Socket ServerSocket)))
 
 (defn unknown-op
   &quot;Sends an :unknown-op :error for the given message.&quot;
@@ -64,7 +64,9 @@
 
 (defn start-server
   &quot;Starts a socket-based nREPL server.  Configuration options include:
- 
+
+   * :host &#8212; the address or hostname of the interface that should be used;
+       defaults to all interfaces
    * :port &#8212; defaults to 0, which autoselects an open port on localhost
    * :handler &#8212; the nREPL message handler to use for each incoming connection;
        defaults to the result of (default-handler)
@@ -77,8 +79,10 @@
 
    Returns a handle to the server that is started, which may be stopped
    either via `stop-server`, (.close server), or automatically via `with-open`.&quot;
-  [&amp;amp; {:keys [port transport-fn handler ack-port greeting-fn] :or {port 0}}]
-  (let [ss (ServerSocket. port)
+  [&amp;amp; {:keys [host port transport-fn handler ack-port greeting-fn] :or {port 0}}]
+  (let [ss  (if host
+              (ServerSocket. port 0 (InetAddress/getByName host))
+              (ServerSocket. port))
         smap {:ss ss
               :transport (or transport-fn t/bencode)
               :greeting greeting-fn
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m putting a CA in the mail today.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15253">NREPL-13</key>
            <summary>nrepl should support binding to a specific interface instead of all</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="tcrawley">Toby Crawley</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Feb 2012 14:32:44 -0600</created>
                <updated>Thu, 29 Mar 2012 12:53:44 -0500</updated>
                    <resolved>Thu, 29 Mar 2012 12:53:44 -0500</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28051" author="cemerick" created="Thu, 29 Mar 2012 12:53:44 -0500"  >&lt;p&gt;Fixed on master, released as part of &lt;tt&gt;0.2.0-beta3&lt;/tt&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <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>[NREPL-12] Intermittent test failures for stdin</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-12</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Failures like these are happening sometimes in the test suite, mainly around stdin:&lt;/p&gt;

&lt;p&gt;FAIL in (request-multiple-read-objects-&lt;b&gt;in&lt;/b&gt;) (nrepl_test.clj:211)&lt;br/&gt;
expected: (= (quote (:ohai)) (response-values (for &lt;span class=&quot;error&quot;&gt;&amp;#91;resp (repl-eval session &amp;quot;(read)&amp;quot;)&amp;#93;&lt;/span&gt; (do (when (-&amp;gt; resp :status set (contains? &quot;need-input&quot;)) (session {:op :stdin, :stdin &quot;:ohai :kthxbai\n&quot;})) resp))))&lt;br/&gt;
  actual: (not (= (:ohai) nil))&lt;/p&gt;

&lt;p&gt;FAIL in (request-multiple-read-objects-&lt;b&gt;in&lt;/b&gt;) (nrepl_test.clj:217)&lt;br/&gt;
expected: (= &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; :kthxbai&amp;quot;&amp;#93;&lt;/span&gt; (repl-values session &quot;(read-line)&quot;))&lt;br/&gt;
  actual: (not (= &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; :kthxbai&amp;quot;&amp;#93;&lt;/span&gt; nil))&lt;/p&gt;

&lt;p&gt;I&apos;ve done a ton of debugging and thinking about this, and haven&apos;t gotten far. A few theories I had that seemed decent at the time, but ultimately haven&apos;t gotten rid of these occasional failures:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;in middleware.session/add-stdin, flush the :stdin-writer after writing to it on :stdin messages (see &lt;a href=&quot;http://stackoverflow.com/questions/2843555/better-alternative-for-pipedreader-pipedwriter&quot;&gt;http://stackoverflow.com/questions/2843555/better-alternative-for-pipedreader-pipedwriter&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;in server/handler, when a message is received on the transport, farm the handling out to a future (this is half-baked &amp;amp; caused additional intermittent failures)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The debugging I&apos;ve been doing (print statements galore) suggests that when this problem happens, the client does send back the proper :stdin, but it doesn&apos;t get picked up by the add-stdin handler in time to write to the :stdin-writer and avoid the expiring timeout.&lt;/p&gt;

&lt;p&gt;I&apos;m pretty much stumped at this point, unfortunately.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15248">NREPL-12</key>
            <summary>Intermittent test failures for stdin</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Feb 2012 13:04:29 -0600</created>
                <updated>Sun, 10 Jun 2012 16:40:48 -0500</updated>
                    <resolved>Sun, 10 Jun 2012 16:40:48 -0500</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28052" author="cemerick" created="Thu, 29 Mar 2012 16:18:56 -0500"  >&lt;p&gt;This is becoming a serious problem; the build fails half the time on build.clojure.org, making it incredibly frustrating to perform releases, etc.&lt;/p&gt;

&lt;p&gt;Any new ideas / evaluation of this is most welcome.&lt;/p&gt;</comment>
                    <comment id="28153" author="trptcolin" created="Sun, 15 Apr 2012 22:24:08 -0500"  >&lt;p&gt;My current vague suspicion is that it&apos;s a CPU contention thing between the server and client.  &lt;/p&gt;

&lt;p&gt;It&apos;s kind of hard for me to reason about the execution of the response-values lazy seq, and where the blocking actually happens. And of course adding logging changes the behavior sometimes. I wouldn&apos;t be opposed to adding sleeps in there, but I expect those kinds of things would still be flaky later, on build machines in particular :/&lt;/p&gt;

&lt;p&gt;Incidentally, bumping the client timeout up to Long.MAX_VALUE helps a bit the stdin failures, but doesn&apos;t solve them. It does create new ones: session-lifecycle, unknown-op, and read-timeout block forever trying to reduce across the whole seq in combine-responses. It was a bit surprising to me to see that reduce in the response-values pipeline, and I pursued that at one point as well, but it hasn&apos;t gotten me anywhere. Decreasing the timeout helps to reproduce the failures.&lt;/p&gt;

&lt;p&gt;I got this thread dump from a blocking-forever stdin test (run via `lein test clojure.tools.nrepl-test`): &lt;a href=&quot;https://refheap.com/paste/2141&quot;&gt;https://refheap.com/paste/2141&lt;/a&gt;. &lt;/p&gt;</comment>
                    <comment id="28688" author="trptcolin" created="Sun, 3 Jun 2012 05:07:49 -0500"  >&lt;p&gt;With this patch, I was able to run clojure.tools.nrepl-test 100 times successfully. Previous attempts would generally only get as far as 15 or so before failing for one reason or another.&lt;/p&gt;

&lt;p&gt;It also gets rid of a race condition with my skip-if-eol stuff that was addressing multiple input reads. Lastly, it avoids the need for the 10-second timeout, so the tests are faster now as well.&lt;/p&gt;</comment>
                    <comment id="28766" author="cemerick" created="Sat, 9 Jun 2012 10:57:22 -0500"  >&lt;p&gt;I&apos;m psyched that you may have found the solution to these problems.  I&apos;ve applied the patch locally, and it tests well.  I want to eyeball it for a minute (probably tomorrow) before moving on.&lt;/p&gt;</comment>
                    <comment id="28769" author="cemerick" created="Sun, 10 Jun 2012 16:40:48 -0500"  >&lt;p&gt;Pushed, will be in the next beta release.  Thanks so much!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11286" name="0001-Improve-timing-issues-in-tests.patch" size="3850" author="trptcolin" created="Sun, 3 Jun 2012 05:07:49 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-11] Ensure efficient bytestring (byte[]) support in bencode transport</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-11</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;In particular, no boxing of individual bytes or multiple en/decoding steps should be involved.&lt;/p&gt;

&lt;p&gt;This implies that:&lt;/p&gt;

&lt;p&gt;1. all string values should remain &lt;tt&gt;byte[]&lt;/tt&gt; coming out of the bencode protocol support (which makes it more compliant with bencode anyway)&lt;br/&gt;
2. the string decoding should occur in the bencode transport impl&lt;br/&gt;
3. all string values should be decoded, &lt;em&gt;except&lt;/em&gt; for those named in a reserved slot (say, &lt;tt&gt;&quot;-unencoded&quot;&lt;/tt&gt;)&lt;/p&gt;

&lt;p&gt;All map keys should always be decoded to Strings.&lt;/p&gt;

&lt;p&gt;While nREPL should continue to be fully compatible with Clojure 1.2.x, let&apos;s not kill ourselves trying to optimize for 1.2.x as well as Clojure &amp;gt;= 1.3.0; if necessary, just make sure the latter is fast.  If 1.2.x benefits as well, then good.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15240">NREPL-11</key>
            <summary>Ensure efficient bytestring (byte[]) support in bencode transport</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Feb 2012 19:33:08 -0600</created>
                <updated>Tue, 21 Aug 2012 20:26:25 -0500</updated>
                    <resolved>Tue, 21 Aug 2012 20:26:25 -0500</resolved>
                                            <fixVersion>0.2.0-beta9</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27804" author="mbrandmeyer" created="Wed, 22 Feb 2012 14:05:29 -0600"  >&lt;p&gt;How about &#8220;&lt;tt&gt;nrepl/unencoded&lt;/tt&gt;&#8221; re point 3?&lt;/p&gt;</comment>
                    <comment id="27805" author="cemerick" created="Wed, 22 Feb 2012 17:57:01 -0600"  >&lt;p&gt;Is that intended to become a namespaced keyword at some point (further up in the stack than the bencode parser or transport, of course)?&lt;/p&gt;

&lt;p&gt;If so, does that imply that other keys (perhaps &quot;nonstandard&quot; ones defined by middlewares) should be namespaced as well?&lt;/p&gt;

&lt;p&gt;Also, this is actually impacting the protocol; &lt;tt&gt;nrepl/*&lt;/tt&gt; makes me think the slot is related to an &quot;application-level&quot; handler provided by nREPL.&lt;/p&gt;

&lt;p&gt;FWIW, my suggestion of &lt;tt&gt;-unencoded&lt;/tt&gt; was a nod to Python&apos;s &lt;tt&gt;_foo&lt;/tt&gt; and Clojure&apos;s &lt;tt&gt;-foo&lt;/tt&gt; to denote private / internal members. &amp;#42;shrug&amp;#42;&lt;/p&gt;</comment>
                    <comment id="27811" author="mbrandmeyer" created="Thu, 23 Feb 2012 05:03:05 -0600"  >&lt;p&gt;Namespaced keywords are indeed the inspiration. So that it should probably be more like &lt;tt&gt;clojure.tools.nrepl.transport/unencoded&lt;/tt&gt; rather than just &lt;tt&gt;nrepl/unencoded&lt;/tt&gt;. However it is not a requirement to be a real keyword. A qualified string works just as well. There could be a middleware which turns the map keys into keywords (considering also a possible namespace). ring has a similar middleware, IIRC. I think that qualified operation and result field values (in some form or the other) are a best practise in this respect.&lt;/p&gt;

&lt;p&gt;However your argument of &lt;tt&gt;unencoded&lt;/tt&gt; being part of the protocol is valid. But then why should it be private? Document it in the official protocol spec and let middlewares also add fields to it. The question is then: what happens with nested structures (eg. &lt;tt&gt;:status&lt;/tt&gt;, which has to be traversed now painfully)? If middlewares weren&apos;t allowed to add to it, then only &lt;tt&gt;:value&lt;/tt&gt; would be an interesting target for &lt;tt&gt;unencoded&lt;/tt&gt;. So a simple flag would suffice.&lt;/p&gt;

&lt;p&gt;In general, I still think a tagged protocol would have been the better solution since it also allows nesting and each slot knows whether it&apos;s encoded or not.&lt;/p&gt;

&lt;p&gt;Maybe we should clarify what middlewares are allowed to do. Is there already some documentation on this? (I&apos;m must confess I&apos;m not up-to-date with all the design changes.)&lt;/p&gt;</comment>
                    <comment id="27900" author="cemerick" created="Thu, 1 Mar 2012 15:32:33 -0600"  >&lt;p&gt;Re: encoding, I&apos;ve started to think perhaps nothing should be decoded by default, and middlewares can independently handle such things.  The standard middlewares will stake out one approach, but that at least leaves open the possibility of a different convention emerging over time that can be adopted later.&lt;/p&gt;

&lt;p&gt;Opinions?&lt;/p&gt;</comment>
                    <comment id="29234" author="cemerick" created="Mon, 20 Aug 2012 16:14:44 -0500"  >&lt;p&gt;Sorry, where is the code for this?  No .patch here, and nothing in bitbucket looks right.&lt;/p&gt;

&lt;p&gt;Leaving aside the code for now, defaulting to unencoded strings continues to seem reasonable; a default &lt;tt&gt;Transport&lt;/tt&gt; impl/substrate can perform the en/decoding, as well as establish a default convention for indicating that some fields values should be left unencoded and should not be decoded.&lt;/p&gt;</comment>
                    <comment id="29235" author="mbrandmeyer" created="Mon, 20 Aug 2012 16:21:28 -0500"  >&lt;p&gt;The code is here: &lt;a href=&quot;https://github.com/kotarak/tools.nrepl/tree/bencode-improvements2&quot;&gt;https://github.com/kotarak/tools.nrepl/tree/bencode-improvements2&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29237" author="cemerick" created="Mon, 20 Aug 2012 22:14:49 -0500"  >&lt;p&gt;Looks good, patch applied.&lt;/p&gt;

&lt;p&gt;I&apos;m less and less sure re: &lt;tt&gt;-unencoded&lt;/tt&gt;.  Thinking back to your &quot;tagged protocol&quot; comment, adopting a convention of keys like &lt;tt&gt;&quot;value/binary&quot;&lt;/tt&gt; (or something similar) would be quite a bit more flexible and somewhat simpler to handle.&lt;/p&gt;

&lt;p&gt;(Thinking of rich content, mime types could then be sent in e.g. &lt;tt&gt;&quot;value/mime&quot;&lt;/tt&gt; &#8212; not that the transport would care about that, but it would at least be easy to pair up data with its &quot;tag&quot;.)&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;</comment>
                    <comment id="29248" author="cemerick" created="Tue, 21 Aug 2012 20:26:25 -0500"  >&lt;p&gt;Releasing -beta9 now; further discussion of unencoded value semantics can continue elsewhere&#8230;&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>[NREPL-10] SocketExceptions on transport/bencode when the other end has gone away</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-10</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When running the tests, I&apos;m occasionally getting SocketExceptions (which don&apos;t fail the test suite) with the message &quot;Broken pipe&quot;. I think these stem from one end of the nREPL socket trying to write to the socket after the other end has gone away. &lt;/p&gt;

&lt;p&gt;There&apos;s an existing test (ensure-closeable) that explicitly expects a SocketException to be raised if the socket has had .close called directly on it, rather than having the other end hang up, which I think is what the &quot;Broken pipe&quot; tells us. I&apos;m curious as to whether this is important for some reason I haven&apos;t seen, or whether catching all SocketExceptions on transport/bencode&apos;s write function and returning nil would be appropriate. &lt;/p&gt;

&lt;p&gt;If the end doing the socket closing actually should affect the behavior, we could sniff the exception message, but that feels a bit yucky.&lt;/p&gt;

&lt;p&gt;I can actually reproduce this in &quot;real life&quot; by firing up an nREPL server / client (`reply --nrepl --port 9999`), then attaching to it (`reply --nrepl --attach 9999`), and in the attached client, run (Thread/sleep 10000) and immediately kill the process. Then the &quot;Broken pipe&quot; exception shows up in the original REPL with the server in the same process.&lt;/p&gt;

&lt;p&gt;I&apos;ve got a patch for this in my bitbucket fork (socket-exception branch): &lt;a href=&quot;https://bitbucket.org/trptcolin/nrepl/changeset/4a432f3ce95a&quot;&gt;https://bitbucket.org/trptcolin/nrepl/changeset/4a432f3ce95a&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15232">NREPL-10</key>
            <summary>SocketExceptions on transport/bencode when the other end has gone away</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Feb 2012 15:34:36 -0600</created>
                <updated>Fri, 12 Oct 2012 00:51:13 -0500</updated>
                    <resolved>Fri, 12 Oct 2012 00:51:13 -0500</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                <fixVersion>0.2.0-RC1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27790" author="cemerick" created="Tue, 21 Feb 2012 05:35:05 -0600"  >&lt;p&gt;What do we really want to happen when a &lt;tt&gt;SocketException&lt;/tt&gt; (or really, any error) occurs?&lt;/p&gt;

&lt;p&gt;I&apos;m all for better error handling/reporting, but it shouldn&apos;t obfuscate what&apos;s going wrong.  Catching and squelching isn&apos;t doing anyone any favors.  That could be particularly confusing if done at the transport level. &quot;You mean all the messages I&apos;ve been sending have been dropped on the floor silently, and I was supposed to be checking for a &lt;tt&gt;nil&lt;/tt&gt; return?&quot;&lt;/p&gt;</comment>
                    <comment id="27877" author="trptcolin" created="Sun, 26 Feb 2012 12:46:53 -0600"  >&lt;p&gt;Yeah, you&apos;re right. Although, isn&apos;t checking for a nil return already necessary to account for timeouts?&lt;/p&gt;

&lt;p&gt;What about having a server-side transport error handler that&apos;s rebindable, and re-throws by default? Or maybe we could collect errors somewhere, similar to what clojure.core/agent-error does.&lt;/p&gt;

&lt;p&gt;The more I think about it, the less important this seems, though - mainly an annoyance when running tests.&lt;/p&gt;</comment>
                    <comment id="29639" author="cemerick" created="Fri, 12 Oct 2012 00:51:13 -0500"  >&lt;p&gt;Was simply a disconnection stacktrace due to a client closing up prior to an evaluation response being written to the transport.&lt;/p&gt;

&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/clojure/tools.nrepl/commit/2d90bdd4fe14298bbfcaab52ecdea48781c71604&quot;&gt;https://github.com/clojure/tools.nrepl/commit/2d90bdd4fe14298bbfcaab52ecdea48781c71604&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>[NREPL-9] (read-line) doesn&apos;t prompt for input after a (read)</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-9</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;When (read-line) is preceded by (read), it already has a newline in the stream, and returns &quot;&quot; immediately rather than prompting for input.&lt;/p&gt;

&lt;p&gt;(read) then (read-line) works fine in the stock Clojure repl because the REPL shares STDIN with the &lt;b&gt;in&lt;/b&gt; used by the normal (read) and (read-line) calls. So when the REPL&apos;s loop does clojure.main/repl-read (to get my evaluation input &quot;(read-line)&quot;), it skips whitespace before the read for the thing to eval, reads that thing, and then skips a newline, if that&apos;s the next thing: &lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L145-161&quot;&gt;https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L145-161&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That allows the .read calls &lt;b&gt;generated&lt;/b&gt; by the (read-line) execution to start after a trailing newline left in the stream.&lt;/p&gt;

&lt;p&gt;We can do the same thing in nrepl.middleware.session/add-stdin on an eval message, but we need to check .ready first, to avoid sending unnecessary :need-input requests back to the client. I think this does belong in add-stdin, since it&apos;s essentially a stdin concern, even though it acts on the eval message.&lt;/p&gt;

&lt;p&gt;I&apos;ve got one test exposing the problem, and one proving we only eat newlines, not any old trailing character. I had to stick :stdin-reader on the session to enable consuming the newline from the middleware - not sure whether there&apos;s a way to do without it that I&apos;m not seeing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15231">NREPL-9</key>
            <summary>(read-line) doesn&apos;t prompt for input after a (read)</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="trptcolin">Colin Jones</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Feb 2012 09:03:25 -0600</created>
                <updated>Tue, 21 Feb 2012 05:17:52 -0600</updated>
                    <resolved>Tue, 21 Feb 2012 05:17:52 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27788" author="cemerick" created="Tue, 21 Feb 2012 05:17:36 -0600"  >&lt;p&gt;Thanks for chasing this down!  Patch applied to master.&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>[NREPL-8] set stack size for Android</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-8</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;If you want to use nREPL on Android (currently only possible with sattvik&apos;s fork of Clojure) then you need bigger stack sizes than Android&apos;s default 8k to eval even moderately complex expressions. For comparison: A regular JVM on a PC has default stack sizes around 256k ... 512k depending on platform.&lt;/p&gt;

&lt;p&gt;In nrepl.clj, modify&lt;/p&gt;

&lt;p&gt;(doto (Thread. r)&lt;br/&gt;
  (.setDaemon true))))))&lt;/p&gt;

&lt;p&gt;to read&lt;/p&gt;

&lt;p&gt;(doto (Thread. (.getThreadGroup (Thread/currentThread)) r &quot;nREPL&quot; 524288)  ; 512k generous stack size&lt;br/&gt;
  (.setDaemon true))))))&lt;/p&gt;

&lt;p&gt;Note: There are warnings here &lt;a href=&quot;http://bit.ly/u86tF1&quot;&gt;http://bit.ly/u86tF1&lt;/a&gt; about choosing a good stack size but since in practice nREPL seems to have &amp;lt;10 threads running with 1 active client connection we can be generous here.&lt;/p&gt;

&lt;p&gt;The more advanced version would be to make this somehow configurable but that&apos;d probably be over-engineering things.&lt;/p&gt;</description>
                <environment>Android</environment>
            <key id="15089">NREPL-8</key>
            <summary>set stack size for Android</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="hank">Hank</reporter>
                        <labels>
                        <label>Android</label>
                    </labels>
                <created>Fri, 30 Dec 2011 09:05:19 -0600</created>
                <updated>Wed, 3 Oct 2012 07:03:59 -0500</updated>
                    <resolved>Wed, 3 Oct 2012 07:03:59 -0500</resolved>
                            <version>0.0.5</version>
                                <fixVersion>0.2.0-beta9</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27500" author="cemerick" created="Fri, 30 Dec 2011 09:14:15 -0600"  >&lt;p&gt;Noted, thank you.  I&apos;ll try to make sure a provision for this gets into the next significant release.&lt;/p&gt;

&lt;p&gt;My first inclination is to ensure that the stack size is configurable; a hardcoded size would likely be just as inappropriate in some environments as the system default.&lt;/p&gt;</comment>
                    <comment id="27789" author="cemerick" created="Tue, 21 Feb 2012 05:21:48 -0600"  >&lt;p&gt;nREPL is now using Clojure&apos;s built-in agent threadpools.  This should theoretically simplify things for you, correct?  i.e. Isn&apos;t a patched build of Clojure necessary for use on Android for this stack size issue, among other reasons?&lt;/p&gt;</comment>
                    <comment id="27796" author="hank" created="Wed, 22 Feb 2012 07:21:21 -0600"  >&lt;p&gt;The patched build is only necessary for the JVM byte code that the Clojure compiler dynamically generates to be converted to Dalvik bytecode. However adding additional android patches such as configuring the agent threadpool with a larger stack size do make sense. I&apos;m not the official Android Clojure maintainer though &amp;#8211; I guess there isn&apos;t an official one really &amp;#8211; so my opinion on this only goes so far.&lt;/p&gt;</comment>
                    <comment id="27797" author="cemerick" created="Wed, 22 Feb 2012 08:11:02 -0600"  >&lt;p&gt;Well, I think you have a solid case for expanding the scope of the android fork, or even for a change to parameterize the threadpools in Clojure itself.&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this; there&apos;s really nothing to be done from within nREPL given that it doesn&apos;t maintain its own threadpool anymore.&lt;/p&gt;</comment>
                    <comment id="29035" author="cemerick" created="Tue, 24 Jul 2012 04:49:27 -0500"  >&lt;p&gt;Reopening; since the use of agents was a fool&apos;s errand, parameterizing stack size needs to happen.&lt;/p&gt;</comment>
                    <comment id="29189" author="cemerick" created="Wed, 15 Aug 2012 15:58:29 -0500"  >&lt;p&gt;Now that I look at this again, there are a number of options in nREPL to solve this.&lt;/p&gt;

&lt;p&gt;First, you can provide an &lt;tt&gt;:executor&lt;/tt&gt; argument to the &lt;tt&gt;interruptible-eval&lt;/tt&gt; middleware.  This could be any &lt;tt&gt;java.util.concurrent.Executor&lt;/tt&gt;, so you can configure it to use whatever threads you want.&lt;/p&gt;

&lt;p&gt;Second, and if you want to minimize work and retain as much of nREPL&apos;s default configuration otherwise, you can patch in your own thread pool by binding &lt;tt&gt;#&apos;clojure.tools.nrepl.middleware.interruptible-eval/configure-thread-factory&lt;/tt&gt; like so:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(def thread-group ...)
(def stack-size ...)

(defn android-thread-factory
  &quot;Returns a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ThreadFactory suitable &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; use with android. This implementation
   generates daemon threads, with names that include the session id.&quot;
  []
  (let [session-thread-counter (AtomicLong. 0)]
    (reify ThreadFactory
      (newThread [_ runnable]
        (doto (&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;. thread-group
                runnable
                (format &lt;span class=&quot;code-quote&quot;&gt;&quot;nREPL-worker-%s&quot;&lt;/span&gt; (.getAndIncrement session-thread-counter))
                stack-size)
          (.setDaemon &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;))))))

(with-bindings {#&apos;clojure.tools.nrepl.middleware.interruptible-eval/configure-thread-factory
                android-thread-factory}
  (clojure.tools.nrepl.server/start-server ...))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The above totally untested, but I hope you get the idea.  Give it a shot, and let me know how it goes.  I&apos;m going to take off this issue&apos;s fix target for now.&lt;/p&gt;</comment>
                    <comment id="29587" author="cemerick" created="Wed, 3 Oct 2012 07:03:59 -0500"  >&lt;p&gt;I hear good things at this point about people connecting to nREPL endpoints running on Android.  Please file another issue if this or other Android-specific problems arise in the future.&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>[NREPL-7] Dependency on 1.3.0-master-SNAPSHOT instead of 1.3.0</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-7</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Running &quot;mvn install&quot; on tools.nrepl results in a build failure:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; Missing:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; ----------&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;INFO&amp;#93;&lt;/span&gt; 1) org.clojure:clojure:jar:1.3.0-master-SNAPSHOT&lt;/p&gt;

&lt;p&gt;Changing 1.3.0-master-SNAPSHOT to 1.3.0 in src/integration/clojure-1.3.0/pom.xml seems to fix it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15009">NREPL-7</key>
            <summary>Dependency on 1.3.0-master-SNAPSHOT instead of 1.3.0</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="stevelindsay">Steve Lindsay</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 04:36:17 -0600</created>
                <updated>Tue, 15 Nov 2011 05:22:46 -0600</updated>
                    <resolved>Tue, 15 Nov 2011 05:22:46 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27298" author="cemerick" created="Tue, 15 Nov 2011 05:13:19 -0600"  >&lt;p&gt;Bizarre, since it is building cleanly here and on &lt;a href=&quot;http://build.clojure.org/job/tools.nrepl/&quot;&gt;build.clojure.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I should certainly update the version number in that pom to &lt;tt&gt;1.3.0&lt;/tt&gt; though.  I&apos;ll do that shortly.&lt;/p&gt;

&lt;p&gt;FWIW, maybe adding a &lt;tt&gt;-U&lt;/tt&gt; to your &lt;tt&gt;mvn&lt;/tt&gt; invocation would help?  That forces a check of all snapshots.&lt;/p&gt;</comment>
                    <comment id="27299" author="cemerick" created="Tue, 15 Nov 2011 05:22:46 -0600"  >&lt;p&gt;fixed on HEAD&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>[NREPL-6] Add simple HOWTO to README for both tooling and application developers</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-6</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;...maybe push the protocol details into a /doc directory.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14660">NREPL-6</key>
            <summary>Add simple HOWTO to README for both tooling and application developers</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 11:15:53 -0500</created>
                <updated>Wed, 21 Nov 2012 15:50:42 -0600</updated>
                    <resolved>Wed, 21 Nov 2012 15:50:42 -0600</resolved>
                                            <fixVersion>0.2.0</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>[NREPL-5] Add support for reading from stdin</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-5</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Swank does this by polling back to the connected client to request input.  In the face of asynchronous operations, this may be the only option.&lt;/p&gt;

&lt;p&gt;Will require adding to the protocol.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14659">NREPL-5</key>
            <summary>Add support for reading from stdin</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 11:14:24 -0500</created>
                <updated>Tue, 21 Feb 2012 05:58:42 -0600</updated>
                    <resolved>Tue, 21 Feb 2012 05:58:42 -0600</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27792" author="cemerick" created="Tue, 21 Feb 2012 05:58:42 -0600"  >&lt;p&gt;See &lt;tt&gt;clojure.tools.nrepl.middleware.session/add-stdin&lt;/tt&gt; for the implementation.  Userland documentation coming.&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>[NREPL-4] Provide sane multiplexing of output in the face of multithreaded, asynchronous operation</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-4</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;Basically, &lt;tt&gt;(send-off some-agent println)&lt;/tt&gt; &amp;amp; co. should get what&apos;s printed to &lt;tt&gt;&lt;b&gt;out&lt;/b&gt;&lt;/tt&gt; in that agent&apos;s thread back to the nREPL client &#8212; not silently let it dump out to &lt;tt&gt;System/out&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/flatland/portal&quot;&gt;Portal&lt;/a&gt; ostensibly does this well.  Examine their approach, see if it is compatible with nREPL&apos;s objectives.&lt;/p&gt;

&lt;p&gt;Ill-formed brain dump:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;multiplex new &lt;b&gt;out&lt;/b&gt;&apos;s to System/out
	&lt;ul&gt;
		&lt;li&gt;(still won&apos;t solve clojure.test/&lt;b&gt;test-out&lt;/b&gt; content will disappearing into the ether when it&apos;s loaded when &lt;b&gt;out&lt;/b&gt; is bound to an nREPL out; maybe we should ensure &lt;b&gt;out&lt;/b&gt; is bound to System/out while code is being loaded?)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;optionally multiplex System/out and System/err&lt;/li&gt;
	&lt;li&gt;optionally join multiplexed S/out and S/err, receive :stdout, :stderr msgs&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14658">NREPL-4</key>
            <summary>Provide sane multiplexing of output in the face of multithreaded, asynchronous operation</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 11:10:25 -0500</created>
                <updated>Wed, 3 Oct 2012 07:29:23 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-3] Adopt default port</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-3</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;7888 is &quot;free&quot;, at least in IANA.&lt;/p&gt;

&lt;p&gt;Most users want to put an nREPL port on their app, and that should always be on a typical port.  Auto-selection of a port is only desirable in tooling scenarios, and tooling authors can pass an argument to &lt;tt&gt;start-server&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This will change the behaviour of &lt;tt&gt;(start-server)&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14657">NREPL-3</key>
            <summary>Adopt default port</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="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 10:56:53 -0500</created>
                <updated>Mon, 22 Oct 2012 19:54:53 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[NREPL-2] send-ack probably leaks connections/sockets</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-2</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;The &lt;tt&gt;let&lt;/tt&gt; in &lt;tt&gt;send-ack&lt;/tt&gt; should be be &lt;tt&gt;with-open&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14656">NREPL-2</key>
            <summary>send-ack probably leaks connections/sockets</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 10:35:10 -0500</created>
                <updated>Tue, 21 Feb 2012 05:55:56 -0600</updated>
                    <resolved>Tue, 21 Feb 2012 05:55:56 -0600</resolved>
                                            <fixVersion>0.2.0</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>[NREPL-1] Whitespace is not printed via :out</title>
                <link>http://dev.clojure.org/jira/browse/NREPL-1</link>
                <project id="10022" key="NREPL">tools.nrepl</project>
                        <description>&lt;p&gt;This:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (println &lt;span class=&quot;code-quote&quot;&gt;&quot; &quot;&lt;/span&gt;)
nil&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Should be this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;=&amp;gt; (println &lt;span class=&quot;code-quote&quot;&gt;&quot; &quot;&lt;/span&gt;)
 
nil&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Perhaps &lt;tt&gt;:out&lt;/tt&gt; isn&apos;t being sent if the content {{.trim}}s down to a zero-length string?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14655">NREPL-1</key>
            <summary>Whitespace is not printed via :out</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="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="cemerick">Chas Emerick</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2011 10:33:03 -0500</created>
                <updated>Tue, 21 Feb 2012 05:54:01 -0600</updated>
                    <resolved>Tue, 21 Feb 2012 05:54:01 -0600</resolved>
                                            <fixVersion>0.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27791" author="cemerick" created="Tue, 21 Feb 2012 05:54:01 -0600"  >&lt;p&gt;Resolved in the redesign.&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>
</channel>
</rss>