ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <j_a_fernan...@yahoo.com>
Subject Re: Update to Sandbox/antlib
Date Tue, 12 Feb 2002 16:07:07 GMT
 --- Peter Donald <peter@apache.org> wrote: > On Mon,
11 Feb 2002 12:57, Jose Alberto Fernandez
> wrote:
> > 1) Antlib/antjar allowing the definition of roles.
> There are two predefined
> > roles "task" and "datatype". The meaning of roles
> is simillar to that of
> > Peter but the way they work (are declared) is
> somewhat different. A role
> > declaration especifies:
> >
> >  - a name for the role
> >
> >  - an interface with only one method which is used
> be the container to add
> > elements of that particular role.
> 
> Im not sure why this is needed - can you explain why
> you would want this?
> 

Well, I do  not know what you mean by "this" but let
me tell you the thoughts behind it.

I like and want your idea of Roles that is, user
defined groups, in which different kinds of things
with different functionality can be registered.
I want it for task-container, for ebj-jar subelements,
for javac-compilers, for conditions, etc.

I need something that is to some extent compatible
with the current code in ANT1 and the way ANT1 finds
things in the only two roles it understands today:
task and datatype. The way this is done today is using
the TaskContainer interface. That is you do not look
at the parameters of the methods in the container-task
but instead you look at the interface implemented by
the container-task itself.

This has in my opinion the advantage that the
container needs to declare what it is that it allows
to contain, as oppose to trying to discover it.
Still one can have conflicts, but it should really
reduce the chances for those. 

Proxys need to be there also (optionally) so that we
can do what TaskAdapter does AND more importantly, try
to solve the type inconsistency issue between
TaskContainers and Datatypes that now is solved by
accident.

As I said, I am still working on it, so it is not
there yet.

> > 3) A new SymbolTable scope structure (in
> resemblace of the ExecutionFrames
> > in ANT2 proposals). In this way role declarations
> can be inherited from one
> > project to the next instead of being copied.
> 
> Unfortunately DataTypes are mutable. So by this
> change modifications in 
> sub-builds will now modify the objects in original
> build. This kinda feels 
> icky.

If you mean by "mutable" the fact that a class
implementing a datatype can be changed by a
subproject, then I would have expect you to have more
confidence on my design ;-)

It is a hierarchical symbol table, redefinitions in a
subproject are only visible in that subproject and its
decendants, when you leave the subproject the
definitions revert to the original ones.

Hope that this answers your questions,

Jose Alberto


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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


Mime
View raw message