ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Scope of Types
Date Fri, 01 Jun 2001 10:17:06 GMT
Peter Donald <> wrote:

> I would like to see what people think about the scope of Type
> definitions in Ant2. Types include things like tasks, mappers,
> filesets etc. There has been three different scopes proposed so far;
> flat, hierarchial and global.
> Global is the scope that Ant1 uses. Once registered a taskdef can no
> be unregistered.

Not really, it is hierarchical. Types and tasks defined in a subbuild
don't propagate back to the main build.

Instances of types are even worse ATM, properties are hierarchical
while instances of types have build file scope - but we've agreed to
change that.

I'm not sure that we can separate the discussion of type scope from
the discussion of instance scope - at least not completely.  If we
allow an instance of a type to cross build file boundaries, the type
itself obviously must do so as well.

> Hierarchial can introduce far too many ambiguities in a project file
> resolved according to a context.


Global scope has the disadvantage that you could run into name

> Flat is theoretically the best example because all definitions are
> local.  However I guess I am worried about usability.

What if you'd allow to import types from a nested namespace into the
default namespace? Something that is what you call flat with a little
bit of global added to it?


View raw message