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: What is going on in ANT1.x
Date Thu, 07 Feb 2002 15:58:32 GMT
 --- Stefan Bodewig <bodewig@apache.org> wrote: > On
Thu, 7 Feb 2002, Jose Alberto Fernandez
> <j_a_fernandez@yahoo.com>
> wrote:
> 
> > I hope I can get your support if you think any
> solution I offer is
> > an alternative.
> 
> You do.
> 
> > From: "Stefan Bodewig" <bodewig@apache.org>
> > 
> >> On Wed, 6 Feb 2002, Jose Alberto Fernandez
> >> <j_a_fernandez@yahoo.com> wrote:
> 
> >> > One of the problems I see, is that when code
> gets put in by
> >> > committers, in very few occacions other review
> the code.
> >> 
> >> I hope (and believe) that this is not true.
> >> 
> > 
> > I think the same thing happens with committers
> written code.
> 
> I read all commit messages to the main branch, I
> bootstrap and run all
> tests after each update - and thanks to Steve,
> Stephane, Erik and
> Magesh we are covering an increasing amount of Ant
> with testcases
> every day. 
> 

Just for the record, please you all do not take my
comments as bad rap from me. I think that you do quite
a good job and it is always getting better.

What I am saying is what I think is the reality of
life in a project like this. The agraviating issue is
that any mistake that escapes our eagle eyes,
inmediatelly becomes a feature and there is no way out
of it.

And I fear that we will start ANT2 with a clean slate
and in less that a year we will be back facing the
same backward compatibility isues we are facing today.
It seems to me we should try to find an alternative,
but I do not have it today.

> >> > Another solution which I think could be
> backward compatible is to
> >> > have DataType extend Task
> >> 
> >> This would work for the data types shipping with
> Ant, but there is
> >> nothing in the code that forces a data type to
> extend DataType.
> > 
> > Now, this is real news to me. I had no idea that
> there were no type
> > constraints what so ever for DataTypes.
> 
> It has always been that way.  In the beginning,
> DataType wasn't even
> there, it was added as a base class to factor out
> common functionality
> from Path, FileSet and PatternSet.
> 

Really, well I guess you remember better than I do.
Then the problem may be with TaskContainer. We should
have pick up the fact that TaskContainer needs to
accept things other than Task, if as you say we should
have been aware that datatypes can be anything.

> > We could define a DataTypeTaskAdaptor which takes
> an object, defined
> > as a datatype, and produces a Task that can be
> passed to the
> > TaskContainer.
> 
> If an element is not known at parser time, you don't
> know whether it
> will be task or a data type later - how would you
> address this?
> 

By using UnknownElement. Not as a task per-se, but as
a placeholder, which is what it is suppose to be. Once
you know what it is, it should replace itself with the
actual thing, either a real task, a TaskAdapter for a
bean, or a DataTypeAdapterTask for a datatype. That
way we have a consistent rule.

> Isn't UnknownElement exactly this type of adaptor? 
> It inherits from
> Task and manages data types at execution time as
> well.
> 

I really think we are overloading the meaning of
UnknownElement which produces really confusing code.
To tell you the truth everytime I have started reading
that part of the code it take forever to understand
what is going on. As someone said before it is quite
brittle code.

Also, I still do not understand why UnknownElement has
to showup at all when I use a core task like
<sequential>, it is predefined and its implementation
known when the element is found, and it says that it
is a TaskContainer. ProjectHelper should be able to
build it just as it is able to build anything without
usiing UnknownElement.

Or, we should be building a tree of only
UnknownElements for everything and then build the tree
as we execute (i.e. ADOM -- Ant DOM representation).

Peter, sorry for not continuing pestering with
patches, but between the last round with Antlib and my
day work, I really did not have the stamina to be
there patching. I may do some more now that I starting
to need more from ANT.

As I am sure you may realize out of all this specific
questions, I am working in some proposal (for ANT1.x)
and will be asking you guys to patch my sandbox not
long from now, I hope. Then we can discuss if what I
am proposing is worthwhile or not.

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