I will go through what the patch does:
* whether we want to add a new block type that forces you to list the
 scoped properties:

 The patch does not have a new block type.
 A new task - <local/> has been added.
 <local name="x"/>
 defines a local property 'x' in the current "block" (target, sequential) which 
is in the un-set state.
 <local name="x" value="a value"/>
 defines a local property 'x' which is set to "a value"

* shadowing: Is a local property allowed to have the same name as an
 existing plain old property and override the global value at all?

 The patch allows local properties to shadow an existing plain property,
 unless that property is a "user" property.

* scoping rules for <ant> and friends:  Are local properties visible
 to the build being invoked in something like

 The patch has "dynamic" scoping of properties, so they will
 be seen by <ant> and friends if <ant> has inheritall set to true.


Peter


Stefan Bodewig wrote:

On Thu, 17 Jun 2004, Steve Loughran <[EMAIL PROTECTED]> wrote:



I am now convinced we need local properties; without it macrodef
doesnt work fully.



I could agree with "is less useful than it could be" 8-)



One option: in the <macrodef> declaration, you declare which
properties are local.



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?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to