You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ernst de Haan <er...@pensioenpage.com> on 2009/09/03 11:39:10 UTC

Proposal for improving Ant output (post-1.7)

Here's an initial proposal for improving Ant output, making it less  
verbose:
http://ernstdehaan.blogspot.com/2009/09/improving-ant-output.html

What do you think? Do you consider the current Ant output too verbose  
or just fine?
Have you every had issues examining why an Ant build failed and you  
wish you would have passed -verbose in the first place?
And what do you think of the suggested changes?

Kind regards,


Ernst de Haan
PensioenPage B.V.
www.pensioenpage.com

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Gilbert Rebhan <an...@schillbaer.de>.
Ernst de Haan schrieb:
> Here's an initial proposal for improving Ant output, making it less
> verbose:
> http://ernstdehaan.blogspot.com/2009/09/improving-ant-output.html
> 
> What do you think? Do you consider the current Ant output too verbose or
> just fine?

Sometimes it's too verbose as some ant tasks are too talkative IMO,
f.e. copy, cvs ..
Ant core has features to set the loglevel for the whole build but lacks
a feature that allows to set the loglevel _inside_ the script for
selective tasks only

But there are solutions, like own loggers or special tasks =
years ago i read about a setloglevel task on a blog - don't remember
where - so the idea for that task is not mine.
Only had to change the code that has been posted a bit to make it work

The task is very simple, but very useful, see source =
http://marc.info/?l=ant-user&m=115504180503962&w=2

This little task should be part of ant core
- use it quit often for chatty :-) tasks - but i don't know
how to get it into ant core, and finally it's not grown in my brain
originally ..


Regards, Gilbert

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Fri, Sep 4, 2009 at 21:35, David Weintraub<qa...@gmail.com> wrote:
> You're thinking about Ant as a programming language. You assume that Ant
> tries to execute your target, sees the depends, and then executes that
> first.
>

I have trouble with this analogy.

I'm not thinking of ant as a programming language at all. What you're
basically saying is that ant has no dependency tree, that is, it does
not unroll a stack of targets. Instead, it goes through all targets
and their dependencies and then constructs a list of targets to
execute, in that order, without even a reminder of what depends=""
existed in the original targets (but it does remember the if/unless).
This is how I understand it: ant has no "stack".

Well, that's a way to do things, but I don't see that as a
"programming language vs build system" analogy. Make pretty much
"stacks".

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Re: Proposal for improving Ant output (post-1.7)

Posted by David Weintraub <qa...@gmail.com>.
On Fri, Sep 4, 2009 at 3:35 PM, David Weintraub <qa...@gmail.com> wrote:

> Use the -default flag, and you can see it build the build dependency step.
>

DEBUG FLAG! USE THE DEBUG FLAG!

It should have been -debug and not -default.

I hate it when I do these stupid mistakes.


-- 
David Weintraub
qazwart@gmail.com

Re: Proposal for improving Ant output (post-1.7)

Posted by David Weintraub <qa...@gmail.com>.
You're thinking about Ant as a programming language. You assume that Ant
tries to execute your target, sees the depends, and then executes that
first.

Ant is a build description tool. The very first thing Ant does is to build a
complete matrix dependency of all targets and then executes the targets
based upon the matrix. It has no way of knowing at that point that target
"d" called target "a". It simply knows that to execute "d", it must execute
"a" first.

Use the -default flag, and you can see it build the build dependency step.

On Thu, Sep 3, 2009 at 8:27 AM, Francis GALIEGUE <fg...@one2team.com> wrote:

> On Thu, Sep 3, 2009 at 14:15, <Ja...@rzf.fin-nrw.de> wrote:
> > <target name="a"/>
> > <target name="b" depends="a"/>
> > <target name="c" depends="a"/>
> > <target naem="d" depends="b,c"/>
> >
> > current output is
> >  a:
> >  b:
> >  c:
> >  d:
> >
> > What do you expect here?
> >
> >
>
> If you call target d, I suspect? Well, a is called from b and c, and b
> is the first in the call chain. Ant will have resolved the fact that
> there's no need to call a from c, right?
>
> So that would be:
>
> ----
> a (from b) (from d):
>
> b (from d):
>
> c (from d):
>
> d:
> ----
>
> --
>
> Francis Galiegue
> ONE2TEAM
> Ingénieur système
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> fge@one2team.com
> 40 avenue Raymond Poincaré
> 75116 Paris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
David Weintraub
qazwart@gmail.com

Re: Proposal for improving Ant output (post-1.7)

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Thu, Sep 3, 2009 at 14:15, <Ja...@rzf.fin-nrw.de> wrote:
> <target name="a"/>
> <target name="b" depends="a"/>
> <target name="c" depends="a"/>
> <target naem="d" depends="b,c"/>
>
> current output is
>  a:
>  b:
>  c:
>  d:
>
> What do you expect here?
>
>

If you call target d, I suspect? Well, a is called from b and c, and b
is the first in the call chain. Ant will have resolved the fact that
there's no need to call a from c, right?

So that would be:

----
a (from b) (from d):

b (from d):

c (from d):

d:
----

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


AW: Proposal for improving Ant output (post-1.7)

Posted by Ja...@rzf.fin-nrw.de.
<target name="a"/>
<target name="b" depends="a"/>
<target name="c" depends="a"/>
<target naem="d" depends="b,c"/> 

current output is
  a:
  b:
  c:
  d:

What do you expect here?


Jan


>-----Ursprüngliche Nachricht-----
>Von: Francis GALIEGUE [mailto:fge@one2team.com] 
>Gesendet: Donnerstag, 3. September 2009 14:04
>An: Ant Users List
>Betreff: Re: Proposal for improving Ant output (post-1.7)
>
>On Thu, Sep 3, 2009 at 11:39, Ernst de 
>Haan<er...@pensioenpage.com> wrote:
>> Here's an initial proposal for improving Ant output, making 
>it less verbose:
>> http://ernstdehaan.blogspot.com/2009/09/improving-ant-output.html
>>
>> What do you think? Do you consider the current Ant output 
>too verbose or
>> just fine?
>> Have you every had issues examining why an Ant build failed 
>and you wish you
>> would have passed -verbose in the first place?
>> And what do you think of the suggested changes?
>>
>> Kind regards,
>>
>
>In a more general way, I consider the lack of chaining information
>disturbing. That is, if you do,
>
><target name="a"/>
>
><target name="b" depends="a"/>
>
>and you invoke target b, the output will be:
>
>----
>a:
>
>b:
>----
>
>I'd prefer:
>
>----
>a (from b):
>
>b:
>----
>
>And more generally:
>
>----
>t1 (from t2) (from t3):
>----
>
>or alike.
>
>I have the habit to separate targets as much as I can and deeply nest
>them. Such information would be nice to have.
>
>HTH,
>-- 
>
>Francis Galiegue
>ONE2TEAM
>Ingénieur système
>Mob : +33 (0) 683 877 875
>Tel : +33 (0) 178 945 552
>fge@one2team.com
>40 avenue Raymond Poincaré
>75116 Paris
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Thu, Sep 3, 2009 at 11:39, Ernst de Haan<er...@pensioenpage.com> wrote:
> Here's an initial proposal for improving Ant output, making it less verbose:
> http://ernstdehaan.blogspot.com/2009/09/improving-ant-output.html
>
> What do you think? Do you consider the current Ant output too verbose or
> just fine?
> Have you every had issues examining why an Ant build failed and you wish you
> would have passed -verbose in the first place?
> And what do you think of the suggested changes?
>
> Kind regards,
>

In a more general way, I consider the lack of chaining information
disturbing. That is, if you do,

<target name="a"/>

<target name="b" depends="a"/>

and you invoke target b, the output will be:

----
a:

b:
----

I'd prefer:

----
a (from b):

b:
----

And more generally:

----
t1 (from t2) (from t3):
----

or alike.

I have the habit to separate targets as much as I can and deeply nest
them. Such information would be nice to have.

HTH,
-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-09-03, Ernst de Haan <er...@ERNSTDEHAAN.COM> wrote:

> Now you're implicitly bringing up something else, which is colored output.
> That would be very nice indeed for terminals that support it.

<http://ant.apache.org/manual/listeners.html#AnsiColorLogger> added in
Ant 1.5.

Stefan

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Michael Ludwig <ml...@as-guides.com>.
Ernst de Haan schrieb:
> Michael Ludwig-4 wrote:

>> That said, there is a potential for using less screen real estate.
>> I would see that as an improvement. It may be a matter of taste.
>
> True, it is on one hand a matter of taste, but on the other hand it is
> related to how much data humans can process in a given time span.

I very much agree with you. Less is more. But not everybody may think
so. The screen, I think, is for executive summary, althemore as both
screen size and screen buffer size are not infinite. The gory details
may go to the logfile.

>> I regard the Knoppix boot screen as formally perfect for terminals.
>
> Now you're implicitly bringing up something else, which is colored
> output. That would be very nice indeed for terminals that support it.

Colored, well-structured, nicely animated. Too good to be true. Probably
out of reach for a cross-platform tool.

> Taking the same approach, something similar [to progressbars] could be
> built into Ant. But then it would need to know how much time a target
> is expected to take.

This is not how I fancy progressbars. The uses has to supply some clues
as in the great Perl module Term::ProgressBar and in the example I gave
here:

Ant - Users - Progessbar on the console?
http://www.nabble.com/Progessbar-on-the-console--td24103052.html

-- 
Michael Ludwig

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


Re: Proposal for improving Ant output (post-1.7)

Posted by Ernst de Haan <er...@ERNSTDEHAAN.COM>.

Michael Ludwig-4 wrote:
> 
> I don't adhere to the UNIX philosophy that a tool should produce no
> output if it has nothing interesting to report. A tool such as Ant
> should definitely report what it is doing.
> 

Agreed. Ant should give an indication of what it is about to do and/or what
is has just done, depending on whether things take a lot of time. For
example, if a process takes a couple of minutes to complete, the user should
know what it is doing.


Michael Ludwig-4 wrote:
> That said, there is a potential for using less screen real estate.
> I would see that as an improvement. It may be a matter of taste.

True, it is on one hand a matter of taste, but on the other hand it is
related to how much data humans can process in a given time span. It's by
definition easier to parse 1 summary line with information than 50 lines of
data, if both appear on the screen for only 3 seconds.


Michael Ludwig-4 wrote:
> I regard the Knoppix boot screen as formally perfect for terminals.

Now you're implicitly bringing up something else, which is colored output.
That would be very nice indeed for terminals that support it.


Michael Ludwig-4 wrote:
> In addition, accomodating progressbars would be nice.

Note that continuous integration servers provide progressbars. They do this
by looking at the history. If the last 5 runs took 7 minutes on average,
then the next task is expected to take about 7 minutes as well. At least
this is more or less what Hudson does for me.

Note that Hudson is not a command-line tool, but it provides a web
interface.

Taking the same approach, something similar could be built into Ant. But
then it would need to know how much time a target is expected to take. This
can be quite complicated, because there is a lot of flexibility here that
does not apply to CI. For example, in a CI-context, typically the same
targets are executed every time, with the same parameters. When invoking Ant
directly, this is typically not a given.

Cheers,


Ernst
-- 
View this message in context: http://www.nabble.com/Proposal-for-improving-Ant-output-%28post-1.7%29-tp25272878p25277871.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Proposal for improving Ant output (post-1.7)

Posted by Michael Ludwig <ml...@as-guides.com>.
Ernst de Haan schrieb:
> Here's an initial proposal for improving Ant output, making it less
> verbose:
> http://ernstdehaan.blogspot.com/2009/09/improving-ant-output.html

> Do you consider the current Ant output too verbose or just fine?

I don't adhere to the UNIX philosophy that a tool should produce no
output if it has nothing interesting to report. A tool such as Ant
should definitely report what it is doing.

That said, there is a potential for using less screen real estate.
I would see that as an improvement. It may be a matter of taste.

I regard the Knoppix boot screen as formally perfect for terminals.

http://www.linuxcdmall.com/screenshots/knoppix-5.3.1-04.png
http://www.linuxcdmall.com/screenshots/knoppix-5.3.1-22.png
http://www.linuxcdmall.com/knoppix-5.3.1-screenshots.html

Windows Powershell is very nice, too.

In addition, accomodating progressbars would be nice.

Progessbar on the console? - Michael Ludwig - org.apache.ant.user
http://markmail.org/thread/gjazyu7gzwzcmhgh

-- 
Michael Ludwig

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