ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: circular <import>s
Date Wed, 17 Sep 2003 13:00:02 GMT
Stefan Bodewig wrote:

> On Wed, 17 Sep 2003, Nicola Ken Barozzi <nicolaken@apache.org> wrote:
> 
>>Stefan Bodewig wrote:
> 
>>>I feel this is wrong for two reasons: 
>>>(1) The current build file (the one intially loaded) should be
>>>added to the list of already imported files implicitly so it
>>>doesn't get loaded twice at all.
>>>
>>>(2) circular imports look like a bug to me - the build should fail.
>>
>>This is the only possible issue. The decision on this point will
>>automatically define number 1.
> 
> I'm not sure.  Even if you think the current "flat" import rules are
> correct, (1) should be addressed IMHO.

Wait, you said that it prints out:

"Skipped already imported file build.xml"

This means that the current file is *not* imported twice... how do you 
gather that it executes the import once?

>>So the current behaviour is correct given the actual -flat- import
>>rules.
> 
> I see and understand that - I just question that rule.  If A imports B
> and B imports A, I do consider it a bug in the build file.

It is not. It means that both need each other, not "call" each other, 
there is no recursion.
If I import class A from B, and B from A, Java will correctly compile 
the code, it already takes care of it too.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



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


Mime
View raw message