ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Feller" <Emmanuel.Fel...@free.fr>
Subject Re: <succeed/> ?
Date Fri, 03 Oct 2003 12:01:04 GMT

----- Message d'origine ----- 
De : "Spencer Phil (KTXA 2)"
<phil.spencer@credit-suisse.com>
À : "'Ant Users List'" <user@ant.apache.org>
Envoyé : vendredi 3 octobre 2003 11:54
Objet : RE: <succeed/> ?


> I disagree.

So do I too ... :))

>Of course <succeed/> is essentially a goto and you can
always
>rewrite programs to avoid gotos if you have conditional
logic
>constructs. But I would make two observations here

>1. Conditional logic in ANT is very ugly and unreadable

I disagree. I do not speak about the if-then-else from ant
contrib which i agree is very ugly !

but conditionnal execution of target is easily readable and
a very clever way.

>2. <fail/> is also a goto! If I accept that I don't need
>   <succeed/> I must also argue that you don't need <fail/>

I disagree, ANT is a build process description framework. So
if you mind goto you mind programmation.
Fail is an optimising task : you do not need to go to the
end, because you know that you build is non ok.

IMHO you never know than your build process can be stopped
because it is already ok : if it is ok, the steps (target)
after should never be done ! So you can not say my build is
finished.

>My build is a huge, dynamically discovered, recusive tree
>walk. At certain points in the tree I may discover
conditions
>that mean I can't progress further. These conditions may be
>true error conditions (<fail/>) or conditions that mean I
should
>just stop or display an advisory message and stop
<succeed/>.

Ok, your build process is complex ... but me or the
"Masters"  of the list (like Erik, or Dominique, or ... ),
we have complex build process. And I do not think (only my
opinion) that they need surch of succed.

You should do a review from your build process. Mine was
recursive, very very complex, still I had a problem with
recurisve property expand. I post my problem, Dominique gave
me a solution but i was in my way, which was not the Ant way
... Now i am in the ANT way and my build processs is very
better.

I take few days of review, and know my build is only a
declaration of process.

So i propose you to do this review, and if you do not find a
simple solution, send details to solve it...

>Another use for <succeed/> would be to change the success
message
>at the end of a succesful build. The BUILD SUCCESSFUL
message
>can be very worrying to a user if they are just expecting a
>couple of files to be copied for example.

Yes, we can do it but it should not be a good solution in my
humble opinion.

Emmanuel



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


Mime
View raw message