From: "Tim Dawson" <[EMAIL PROTECTED]>
> 
> Alternately, we should just allow anything to appear at the root level,
> because that is the init task.  Ok, I'm being facetious - I wouldn't really
> want this, but it is a logical extension of the current position.
> 

Although I do not care too much about having or not having init target or 
construct, (notice that there are no such things in MAKE and no one is 
complaining) I think it is important to define more properly the bussiness of 
allowing certain tasks outside targets and others not.

Today the allowed tasks are hardcoded in ProjectHelper, which to say the least 
is ugly and produces inconsistencies, since for example, it allows <taskdef> 
but not <typedef> 8-(

I have a patch that tackles this issue by defining a new interface 
DeclaringTask. Task implementing this interface are allowed outside targets, 
and as the name indicates, they are allowed because they are use principally 
for declaring things like: propeties, tasks, datatypes, etc.

This moves the problem of which tasks should be allowed outside code to the 
designer of the task and weather it is really for declaring things or not. And 
we can go and argue about each task until kingdom come. :-)

Jose Alberto
PS: I should be ready to submit the patch by tomorrow. Quite simple actually.



Reply via email to