ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <macrodef> and local
Date Mon, 21 Jun 2004 10:15:34 GMT
On Thu, 17 Jun 2004, Steve Loughran <steve_l@iseran.com> 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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message