ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject RE: Delayed element creation implementation
Date Fri, 13 Dec 2002 15:32:54 GMT
Jose Alberto Fernandez wrote:

> I think the main problem with <description> is that we are conceptually
> treating it wrongly. <description> is conceptially a syntactic element of
> <project> and <target>, and not a regular task or <datatype>. The fact
> that was implemented as a <datatype> was just a matter of convinience at
> the time.
> 
> If we were to treat <description> as a syntactic element (i.e.,
> ProjectHelper* must apply them but they do not show in the execution
> tree), then the only drawback is that they will have the same status as
> <target> or <project> and could not be redefined as something else.
> 
> I think this would be the correct thing to do.


  <task name=".." description="task description">
    <description>Project description</>
  </task>

If we want the description to apply to the _project_ and not to the task - 
then I agree, there is no way to implement <description> as a datatype.

Implementing it in ProjectHelper is IMO the worst possible choice. 
( the SAX parsing code should stay simple, and we loose the ability
to use ant without having to do the XML parsing, but directly via API ).

What I'll try is to make description similar with <import> ( in the
sense that it'll walk the tree at startup ), and also "load-on-startup"
( so it'll be called even if there's no top-level description tag ).

I don't think this is a show-stoper for the HEAD - it'll have to be
fixed before the first beta, and I'll like to think more about it.


Costin





> 
> Jose Alberto
> 
>> -----Original Message-----
>> From: Costin Manolache [mailto:cmanolache@yahoo.com]
>> Sent: 12 December 2002 23:13
>> To: Ant Developers List
>> Subject: Re: Delayed element creation implementation
>> 
>> 
>> I see one failure - descriptor4.
>> The test case is:
>>  <project>
>>    <description>a </>
>>    <target>
>>    <description>b </>
>>    </>
>>  </>
>> 
>> And the test expects to see "a b" as description.
>> 
>> IMO this behavior of description is wrong. I could
>> buy the description inside target setting the description
>> for the target, but having it added to the project descr.
>> is at least strange.
>> 
>> If this is not the case - I can try a workaround ( like
>> walking the tree specifically for description elements ).
>> 
>> Costin
>> 
>> 
>> Costin Manolache wrote:
>> 
>> > I'm ready to commit an implementation of the proposed
>> > "delayed" element creation and top level execution order.
>> > 
>> > It is based on the embed ProjectHelperImpl2 - I cleaned
>> > up every other feature ( dynamic properties, component factories )
>> > and remove the 'legacy' code that supported the old execution
>> > model.
>> > The changes can be applied to ProjectHelperImpl, but I think
>> > using the new code is better - and it gives us SAX2 and namespaces
>> > ( not used yet - but available ).
>> > 
>> > I'll make sure the tests are passing and do a gump run
>> > on my machine, then commit. As usual, if you see any problem
>> > ( or if the official gump does ) I'll revert the change
>> > imediately.
>> > 
>> > Please review, it's an important change.
>> > 
>> > Costin
>> 
>> 
>> --
>> To unsubscribe, e-mail:
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>




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