<!-- 
RSS generated by JIRA (4.4#649-r158309) at Thu May 23 13:52:57 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/si/jira.issueviews:issue-xml/NREPL-20/NREPL-20.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<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>
</channel>
</rss>