ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: condition shortcutting
Date Tue, 15 Jan 2002 00:59:12 GMT
From: "Steve Loughran" <steve_l@iseran.com>

>
> I have a change to <condition> which doesnt run any of the tests if the
> property is already set; shortcutting the entire test.
>

Is your change something along the lines of an extra
element to condition like <propertyset name="foo"/>
which would evaluate to true if foo is set or
<propertyset name="foo" value="bar"/> which will
evaluate to true if foo is set to the value bar?

Or is it along the lines of
<condition unless="foo">
...
</condition>

The former method is richer and short circuit eval
can also still be performed by
<condition>
<or>
    <propertyset name=foo"/>
    <and>
        blah
    </and>
</or>
</condition>

> Does anyone have any objections to me committing this? The only risk is if
> some test has side effects (or was designed to throw a build exception
> somehow) *and* the condition property was already set, then the test wont
> get called.

Will you be able to submit this to the list first?  I drew a lot of heat
when I didn't do it last time ;-)

>
> -steve
>

Cheers,
Magesh



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


Mime
View raw message