ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Proposal: "Local" Immutable properties
Date Tue, 27 Nov 2001 03:28:25 GMT
Oops, I replied to ant-user....

I'm not fond of the target scoping - I haven't thought it through
extensively, but it doesn't feel right and of course it makes things a lot
more complicated.

As for the <tstamp> issue, since we'll leave in the current
Project.setProperty (perhaps deprecating it) most likely, it could keep its
current functionality so its not a big issue to address right now.  Do folks
play similar tricks with any of the other tasks mentioned?

How does Ant2 deal with property immutability?  How will it deal with this
<tstamp> issue?

    Erik




----- Original Message -----
From: "Bevan Arps" <bevan.arps@actfs.co.nz>
To: <ant-user@jakarta.apache.org>
Sent: Monday, November 26, 2001 9:52 PM
Subject: Proposal: "Local" Immutable properties


>
> I've been following this discussion and just saw Bruce Atherton's post
> about using DSTAMP and TSTAMP to time portions of builds, and this
> triggered a thought.
>
> We on the list seem to be agreeing that properties should all be
immutable.
>
> But should they all be global? (or at least, should they be globally
> accessible from whenever they were first set, or should their lifetime be
> limited/limitable?)
>
> It seems to me that the question of "Should we be able to change a
property
> after it has been set?" is different to "Where should we be able to use
> this property?"
>
> I have a suggestion: How about adding a new attribute to target specifying
> local-properties that works as follows:
>
> - When the target is invoked, an exception is raised if any of the
> properties are already set (preserve property immutability, and ensure
> they're not set at the start)
>
> - When the target is complete, any values for the named properties are
> removed from the project (limits scope)
>
>
> eg (using Bruce's example):
>
>    <target name="build" depends="init,checkout,compile" />
>
>    <target name="init" local-properties="DSTAMP,TSTAMP" >
>      <tstamp />
>      <echo message="Started Build - ${DSTAMP} ${TSTAMP}" />
>    </target>
>
>    <target name="checkout" depends="init,do-checkout"
> local-properties="DSTAMP,TSTAMP">
>      <tstamp />
>      <echo message="Finished Checkout - ${DSTAMP} ${TSTAMP}" />
>    </target>
>
>    <target name="compile" depends="init,do-compile"
> local-properties="DSTAMP,TSTAMP">
>      <tstamp />
>      <echo message="Finished Compile - ${DSTAMP} ${TSTAMP}" />
>    </target>
>
>
> What do y'all think?
>
> Cheers,
> Bevan.
>
>
>
> --
> "Programming is an Art Form that Fights Back"
>
> Bevan Arps (<mailto:bevan.arps@actfs.co.nz>bevan.arps@actfs.co.nz)
> Senior OO Analyst, ACT Financial Systems
>
> This communication  is confidential  to ACT  Financial  Systems  (Asia
> Pacific)  and is intended for  use only by the  addressee.   The  views
and
> opinions  expressed in  this email  are the senders  own and do not
> represent  the  views  and  opinions of  ACT  Financial  Systems  (Asia
> Pacific).
>
>


--
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