ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: javac task
Date Fri, 29 Nov 2002 03:33:54 GMT

----- Original Message -----
From: <loic.lefevre@bnpparibas.com>
To: <ant-dev@jakarta.apache.org>
Sent: Thursday, November 28, 2002 00:58
Subject: javac task



>Hello,
>One thing I would like to know is the way the files to be compiled are
>managed.

There is no way anyone would countenance fixing the dependency checking to
handle files that are in the wrong place according to the java lang rules.

The only thing we could possibly consider doing is have something look at
the source of every file and whenever a file is in the 'wrong' place, fail
the build with a 'hey, this file has the wrong package name' error. But that
would slow down every build and be a regression against those cases where
people had stuff in the wrong place and didnt care about rebuild issues.

But recompilation is only a fraction of the reason why it is wrong to have
stuff in the wrong place, and therefore not our problem to fix it,


>Take the following src directory structure:

>src -+- org - +- foo -+- Foo.java
>                                     +- Foo2.java

>Now if the Foo.java file has the package name: org.foo
>and Foo2.java has no package name

then what happens if Foo.java goes:

import Foo2.java; ?


the underlying javac compiler knows about dir structure and demand compiles
dependency files if they are in the right place. But if they arent it doesnt
know what to do, and the compiler dies.

so: if you keep stuff out of place, it aint just ant's problem, and you do
need to fix it. sorry

-steve





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