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: Name collisions
Date Mon, 04 Mar 2002 03:00:00 GMT
From: "Peter Donald" <peter@apache.org>

> On Mon, 4 Mar 2002 11:29, Jose Alberto Fernandez wrote:
> > To make clear what is the situation I am referring to let me formalize it:
> >
> >     - Given two roles, A & B, triggered by the same container interface
> > (e.g., task and data-type) and given that a particular element name, N, is
> > registered in role A, what should be the correct behaviour when one
> > attempts to register N in B.
> >
> >     Should the new definition be (a) rejected; (b) override the definition
> > on A; (c) ignored.
> 
> Its a difficult question to answer 100% I think - because DataTypes in Ant1.x 
> are used within same namespace. In practice I think it would be a good idea 
> to make the base datatype class extend Task. I am not sure how feasible that 
> is but it would solve quite a few of the inconsistencies with the model. 
> 

The problem is that in ANT1 data-types do not need to extend from DataType.
Anything can be a DataType. 

> However if that is not the way then we should follow the same pattern we use 
> for properties (ie silently ignore redefinitions unless go via a *privlidged* 
> method). This is mainly for consistency.
> 

Well we need to allow users to redefine tasks and data-types. We cannot just ignore it
always. The funny case is when things are comming from separate amalgamated spaces.

> In ant2 it is likely that we will have types in different roles with the same 
> shorthand name. For instance myrmidon has a "classic" ProjectBuilder, a 
> "classic" Configurerr and a "classic" ProjectListener (all emulating ant1.x 
> behaviour). 
> 

Oh, you can do the same thing in <antlib>. That is not a problem. The problem is that
one also may have different roles whose namespaces have been amalgamated. This
happens when 2 roles use the same definition for the container interface (with different 
adapter, for example). This is the mechanism used in <antlib> to model the behaviour
of task and data-type. Data-types can be used anywhere a task can be used  which means that
they use the same container interface.

The issue is what to do in this amalgamated name space situation.

Jose Alberto



--
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