ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: <macrodef> and local
Date Mon, 21 Jun 2004 10:45:52 GMT
> From: Stefan Bodewig [mailto:bodewig@apache.org] 
> 
> Peter's original patch went beyond that, it introduced scoped 
> properties on all the "block building" levels.  Restricting 
> "local" properties to the macrodef task and not allowing any 
> other task to use the same mechanism feels wrong to me.
> 
> Once we decided that macrodef shouldn't use properties for 
> attributes at all, the topic of scoped properties became less 
> pressing.  The discussion was tabled and here we are.
> 
> IIRC (but my memory is failing quite a bit lately) the main 
> unresolved discussion items have been
> 
> * whether we want to add a new block type that forces you to list the
>   scoped properties:
> 
> <macrodef>
>   <sequential>
>     <let>
>       <property/>
>       <property/>
>       ...
>       <yet-another-container>
>         <actual-task1/>
>         <actual-task2/>
>         ...
>       </yet-another-container>
>     </let>
>   </sequential>
> </macrodef>
> 
> vs.
> 
> <macrodef>
>   <sequential>
>     <local-property/>
>     <local-property/>
>     ...
>     <actual-task1/>
>     <actual-task2/>
>     ...
>   </sequential>
> </macrodef>
> 
> * shadowing: Is a local property allowed to have the same name as an
>   existing plain old property and override the global value at all?
> 
> * scoping rules for <ant> and friends:  Are local properties visible
>   to the build being invoked in something like
> 
>   <macrodef>
>     <sequential>
>       .. set up local properties ..
>       <ant file="some-other-file"/>
>     </sequential>
>   </macrodef>
> 
>   i.e. do we choose lexical (they are not visible) or dynamic (they
>   are visible) scoping?
> 
> Peter and Jose Alberto, did I miss a point?

I really need to go over the old fight (discussion) on the subject :-)
But basically, I think we need to decide (by taking into account the
consequences)
if this local properties ARE properties or are something else that look
like
properties. For example, if I invoke an <script/> will I see this new
values
when I do a Project.getProperty() or not. This will actually define if
<ant/>
will see it or not.

As per shadowing and threadsafety, all this things point as to whether
we need
an scopped execution stack per thread for the properties. If you have a
proper one
all this things work thamselves out as corollaries. 

So, I think we should first work out what is the execution model we want
for this
future ANT and then we can fight about the syntax. I like <let/>, but
can 
accept other suggestions <block/>, none, etc.

At this point I am not too keen on having something specific to
<macrodef/>
but I may be convinced otherwised. 

Jose Alberto

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


Mime
View raw message