Le 19 avr. 2011 à 16:42, Antoine Levy-Lambert a écrit : > On 4/19/2011 8:29 AM, Nicolas Lalevée wrote: >> Thank you very much for the pointers. The patch for the bug report #50507 >> seems to tackle the streaming issue. >> >> I guess that in Ant we always want to see the log by line, rather than with >> usual unix tools where the output is streamed. With unix tools, streaming is >> useful when pipelining commands. I guess we never do that with Ant. >> >> In the suggested patch, line ending "awareness" is only enabled when we >> merge both the standard output stream and the error one. > I think the line ending awareness is enabled by the patch in the case when > there is no redirection of either standard err or standard out to files or > properties. I do not think it is the same as merging standard out and > standard err, except that if a line of standard err is produced by the > executable between two lines of standard out it will be visible that way. > > If one of the two stream, out and err, is not redirected to a file or copied > to a property, lines should still be preserved, so other use cases should be > changed functionally if currently they break lines.
Well, if the two streams are not merged, then there should not be any issue then, as each stream will push things into its own "thing". "thing" being a file, or a socket, or even a wrapped standard stream. In that last case of the "wrapped standard stream", it is then the responsibility of the wrapper to properly output it I think. But as you pointed to me in the chat, there is indeed some issue with the LineOrientedOutputStream which is quite sensible with too many flush. It will create a new line on each flush. I then suggest to make the LineOrientedOutputStream#flush function do nothing, which will fix Conor's bug. And the patch in #50507 will actually just fix the bug #50507. >> So if somebody really want to do output stream pipelining, he most probably >> doesn't want mixing these streams. For such used case, the best approach >> would then be to extends the ExecTask and override createHandler() to >> implement its proper pipelining. I was talking about doing stuff like this: $ svn status | grep -e "^\?" | cut -d " " -f 8 But looking closer we do have such things in Ant with the redirector stuff. So forget what I wrote. Nicolas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org