> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]
> 
> Costin Manolache wrote, On 06/08/2003 6.44:
> 
> ...
> > One think I don't understand is why the import should be 
> used as a OO 
> > substitute. Most languages I know define the import in a 
> much simpler
> > way. Maybe I'm missing too much of the context, I'm still 
> trying to get
> > updated with the mailing lists.
> 
> Just to get you up to speed, the current issue is about multiple 
> inheritance, and how the current system allows cross-import 
> (unwanted?) 
> side-effects, as Conor has brilliantly shown.
> 
> A brief recap of decisions taken IIUC:
> 
> - add an attribute to project: @importable=true, false, only
> - add possibility of prefix in import declaration
>      <import file="xxx" prefix="xxy"/>
> - all paths are resolved resolved to the importing file basedir
> - keep projectname.ant.file property for relative path resolutions
> 
> - add <include/> task, like entity includes
> - add <override-target/> task to override targets
> 

Very good sumary!
I just wish we are still in time to recant on some of those 
decisions if we find a better overall scheme of things.
I would argue that we are still experimeting with this ideas.

> 
> Threads about import (in order):
>     1 - ImportTask ant 1.6
>     2 - ant 1.5.4 : Import
>     3 - override
> 
>  From thread 2 I wrote:
> "
> multi-import(import a,b)
>    target test depends=a.test, b.test
> 
> a
>    target critical
>    target test depends=critical
> 
> b
>    target critical
>    target test depends=critical
> 
> 
> Here "critical" means a.critical to a and b.critical to b, but since 
> they reference a generic "critical", they get the only one 
> that remains 
> after being redefined. The problem is that I did not redefine 
> it in the 
> main buildfile!
> "

For those following my proposal, one way to deal with this issue
in my proposal is declare both critical targets as private.
Which means each test target will use its own version.

So in my wold you could write it like this:

 multi-import(import a,b)
    target test depends=a->test, b->test
 
 a
    target critical visibility=private
    target test depends=critical
 
 b
    target critical visibility=private
    target test depends=critical
 
Voila! you get the behavior wanted.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to