ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Scope of Types
Date Fri, 01 Jun 2001 03:57:11 GMT
Hi,

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.

Flat is the scope that Connor discussed a bit back (especially in regard to
things like namespace resolution). In this scope the type is defined only
in a particular project. So if you define task "blah" it is only present in
current project. To access a type definition from another project you use
namespace resolution. ie "otherProject:taskname" (though the particular
namespace operator needs to be looked at again.

Hierarchial is like Flat except that any type definitions are inherited by
child projects (ie those invoked by antcall/ant tasks).

My personal preference is for either Flat or Global. Hierarchial can
introduce far too many ambiguities in a project file resolved according to
a context.

Flat is theoretically the best example because all definitions are local.
However I guess I am worried about usability. While the default types could
be registered in every project, it could be troublesome when building large
build files. 

If flat is deemed not so useable then I would like to use Global scope.

Thoughts?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message