ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: Questions about new (1.8) PropertyHelper+pals...
Date Fri, 08 Jan 2010 23:53:30 GMT

On Jan 8, 2010, at 5:24 PM, Wascally Wabbit wrote:

> Hello all--
>
> I've just reviewed the latest Ant trunk (1.8RC1 I believe) to estimate
> how much effort it would take to port my extensions (esp. those
> dependent on the 1.7x PropertyHelper implementation). For this class
> I have a few questions about current code:

Firstly, Wabbit.... I am somewhat at a loss because I personally  
attempted, twice if I recall correctly, to engage you on this subject  
back when the API redesign was taking place, what, over two years  
ago?  I don't want to appear unwilling to work with you here, but...  
wow.  This could have been a lot easier then, especially considering  
the difference in code familiarity two years makes.  In all honesty,  
I've found a lot less time than I would like to work on OSS lately.   
Ant in particular (and I hope this won't offend any of my comrades)  
has suffered neglect from many of its developers as of late; I  
vehemently include myself among the guilty.

>
> 1) No way for an evaluator to test if it's already installed as
> getDelegates() is protected and there is no public getEvaluators()
> method.
>

This is a fair assessment for you to have made from the API; however  
the (base) implementation of PropertyHelper actually discards equal  
delegates as they are installed.  We could document this fact, and  
probably make the method final.  Would that suffice?

> 2) Still no way to have PropertyHelpers passed through to subprojects
> automatically (all configuration lost). [See Project.initSubproject]
>

I can see how this might be desirable, but what happens when said  
subproject installs a completely new PropertyHelper that has no idea  
how to cope with the properties the parent project expects the  
subproject to know how to interpret?  This would seem to want more  
discussion.

> 3) Even with the current rework, installing a recursive property
> evaluator requires that I replace the entire PropertyHelper because:
>   1) The ParseProperties utility is created directly by the helper
>      and that's where the algorithm basically lies. I would be nice
>      to replace just *this* bit...
>   2) The ParseProperties seems to be assuming a sequential walk thru
>      the input string (it moves from left->right first getting a
>      property name then mapping that name to a value...) Maybe I'm
>      missing something here (I hope)?...
>

I am far less familiar with the relevant code now, but a recursive  
property evaluator is certainly possible because it exists in the  
[props] sandbox Antlib, which we will promote to proper and release  
shortly after Ant 1.8.0 is released.  I think perhaps what you've  
missed is that ParseProperties is not meant to be extended by  
PropertyHelper extensions (although I suppose in dire need it could  
be extended or bypassed); it's simply a class which contains the  
algorithms for parsing properties using whatever PropertyExpander  
delegates live in the active PropertyHelper.

> Any feedback would be appreciated!
>

Regards,
Matt

> Thanks,
> -The Wabbit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Mime
View raw message