<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sat May 18 09:24:59 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/CONTRIB-90/CONTRIB-90.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>[CONTRIB-90] clojure.contrib.io does not support appending anymore</title>
                <link>http://dev.clojure.org/jira/browse/CONTRIB-90</link>
                <project id="10012" key="CONTRIB">Clojure-Contrib</project>
                        <description>&lt;p&gt;Reproduce the bug 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;(require &apos;clojure.contrib.io)
(clojure.contrib.io/append-writer &lt;span class=&quot;code-quote&quot;&gt;&quot;/xyz.txt&quot;&lt;/span&gt;)
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
which will &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; an Exception &#65533;&#65533;&#65533;Cannot change an open stream to append mode&#65533;&#65533;&#65533;.

This is caused because of a flaw in the call chain.
*clojure.contrib.io/writer* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; Strings calls again *writer* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; whatever *clojure.contrib.io/output-stream*
returns. We call *append-writer* which then calls *writer* on the &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; which in turn then calls:
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;
output-stream &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ^&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; which calls
    output-stream &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ^URL which calls
        output-stream &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ^File which binds *append* to &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; and calls
            output-stream &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ^OutputStream which
            returns a BufferedOutputStream instance which then jumps back to the
        ^File handler, which removes its binding &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; *append*!! and returns the BOS to the
    ^URL handler which returns the BOS to the
^&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; handler&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;At this point the outer binding (for &lt;b&gt;append&lt;/b&gt;) is set to &lt;em&gt;true&lt;/em&gt; again, and assert-not-appending fails.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14250">CONTRIB-90</key>
            <summary>clojure.contrib.io does not support appending anymore</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                        <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="bpsm">bpsm</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Aug 2010 15:54:00 -0500</created>
                <updated>Thu, 26 Aug 2010 20:25:00 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="25837" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/90&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/90&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
0002-t90-default-reader-implementation-special-cases-for-.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/auuXEWSiur35DyeJe5cbCb/download/auuXEWSiur35DyeJe5cbCb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/auuXEWSiur35DyeJe5cbCb/download/auuXEWSiur35DyeJe5cbCb&lt;/a&gt;&lt;br/&gt;
0001-t90-regression-test.patch - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/amTyVwSt8r378NeJe5cbLr/download/amTyVwSt8r378NeJe5cbLr&quot;&gt;https://www.assembla.com/spaces/clojure/documents/amTyVwSt8r378NeJe5cbLr/download/amTyVwSt8r378NeJe5cbLr&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="25838" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: I&apos;ve looked at this defect (on master). It seems thorny to me.&lt;/p&gt;

&lt;p&gt;I&apos;m finding the control flow in c.c.io rather difficult to follow, what with all those extensions of the Streams protocol delegating to one-another. I&apos;m reasonably certain that the solution is to special case the creation of a reader in &lt;b&gt;append&lt;/b&gt; mode.&lt;/p&gt;

&lt;p&gt;I&apos;ll attach a patch that does this by providing a default implementation for :writer, which seems to solve the problem, but I think I still need to think about it some more before I can call it &apos;done&apos;.&lt;/p&gt;

&lt;p&gt;Note: this defect is also present in &lt;b&gt;clojure.java.io 1.2.0&lt;/b&gt;.&lt;/p&gt;</comment>
                    <comment id="25839" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: [&lt;a href=&quot;file:auuXEWSiur35DyeJe5cbCb&quot;&gt;file:auuXEWSiur35DyeJe5cbCb&lt;/a&gt;]&lt;/p&gt;</comment>
                    <comment id="25840" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: Correction: This issue is &lt;b&gt;not&lt;/b&gt; &lt;b&gt;present&lt;/b&gt; in clojure 1.2.0. my bad.&lt;br/&gt;
I was mistaken about this bug being present in clojure.java.io. append-writer doesn&apos;t even exist there and the &lt;b&gt;append&lt;/b&gt; magic is gone there too as per &lt;a href=&quot;https://www.assembla.com/spaces/clojure/tickets/311&quot;&gt;clojure#311&lt;/a&gt;.&lt;br/&gt;
I think there was just something wonky with my swank-clojure:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;clojure.contrib.io&amp;gt; (require &apos;clojure.java.io)
nil
clojure.contrib.io&amp;gt; (in-ns &apos;clojure.java.io)
#&amp;lt;Namespace clojure.java.io&amp;gt;
clojure.java.io&amp;gt; (with-open [x (append-writer &lt;span class=&quot;code-quote&quot;&gt;&quot;/tmp/foo.txt&quot;&lt;/span&gt;)] x)
; Evaluation aborted.  ;;; EXCEPTION HERE&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="25841" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: [&lt;a href=&quot;file:amTyVwSt8r378NeJe5cbLr&quot;&gt;file:amTyVwSt8r378NeJe5cbLr&lt;/a&gt;]: regression test&lt;/p&gt;</comment>
                    <comment id="25842" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: The provided regression test demonstrates the described issue and confirms that the provided patch resolves the issue. All other io unit tests continue to pass.&lt;/p&gt;</comment>
                    <comment id="25843" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;stuart.sierra said: clojure.contrib.io is deprecated and will be removed before the next release.&lt;/p&gt;</comment>
                    <comment id="25844" author="importer" created="Thu, 26 Aug 2010 20:25:00 -0500"  >&lt;p&gt;bpsm said: Let&apos;s see if I&apos;m on the same page that you&apos;re on:&lt;/p&gt;

&lt;p&gt;Since 1.2.0 is at RC3 already, you must mean 1.3.0 when you say &quot;next release&quot;, yes/no? Predicated on that:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;I think this should be fixed on the 1.2.x branch, where c.c.io is available, though deprecated. (&quot;deprecated, but working&quot; is better than &quot;deprecated by slightly buggy.&quot;) The attached patch is against 1.2.x, not master, despite what my initial comment on this issue says.&lt;/li&gt;
	&lt;li&gt;I&apos;ve provided a patch on #93 to remove c.c.io on master (1.3.x).&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10013">Test</customfieldvalue>

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