You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2021/03/14 11:25:19 UTC

Option to discard (error) output?

Hi

https://bz.apache.org/bugzilla/show_bug.cgi?id=62330 reminded me of
something I wanted to discuss.

Sometimes people are simply not interested in the (error) output of a
process started by Ant at all. This is not supported directly as we send
output to the log unless you redirect it to a file or property.

People work around this limitation by sending output to /dev/null on
Unix or "nul" on Windows (which we broke) making the build file
dependent on the OS. Or they write to a property that is never used, but
this consumes memory.

I suggest to add discardOutput/discardErrorOutput properties to
redirector - and exec/apply/java for convenience - which would use
NullOutputStreams to allow pumping of streams without storing the
results anywhere.

Does this sound reasonable?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Option to discard (error) output?

Posted by Jaikiran Pai <ja...@gmail.com>.
Hello Stefan,

Yes that sounds reasonable to me and even the set of tasks that you 
noted to have these properties.

-Jaikiran

On 14/03/21 4:55 pm, Stefan Bodewig wrote:
> Hi
>
> https://bz.apache.org/bugzilla/show_bug.cgi?id=62330 reminded me of
> something I wanted to discuss.
>
> Sometimes people are simply not interested in the (error) output of a
> process started by Ant at all. This is not supported directly as we send
> output to the log unless you redirect it to a file or property.
>
> People work around this limitation by sending output to /dev/null on
> Unix or "nul" on Windows (which we broke) making the build file
> dependent on the OS. Or they write to a property that is never used, but
> this consumes memory.
>
> I suggest to add discardOutput/discardErrorOutput properties to
> redirector - and exec/apply/java for convenience - which would use
> NullOutputStreams to allow pumping of streams without storing the
> results anywhere.
>
> Does this sound reasonable?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org