Javac doesn't perform a full dependency analysis on the *sources* it compiles. My point is that when you compile the sources of a module (which are in a source tree of their own), the modules it depends on are referenced as JARs (or classes dirs) on the <javac> classpath. The source of the module can never be out of sync it's depend JARs (and their own corresponding sources).
You can still have issues like 2 modules depending on the same third low-level module using incompatible versions of that modules... Stuff that leads to runtime errors like method not found and co. This is easily avoidable when you control all the sources, and can setup your system to compile projects in the right order, from low level to higher levels. You can even setup a Gump build, like the Jakarta one, to make sure all the modules are all compatible. So yes, keeping everything in a single project with a single <javac> works, but it doesn't scale, and doesn't usually lead to clean projects, composed of lean and mean modules, with clear and defined (and few) dependencies between them. The single project architecture is easier to setup, but if your project keeps growing, and your code gets re-used by other people, then it's bound to bite you in the end... It's biting us for sure! --DD -----Original Message----- From: Alexey Solofnenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 1:44 PM To: 'Ant Users List' Subject: RE: Working around jikes bug in large projects Are you sure, that javac correctly tracks classpath/library changes? I had a few encounters that I can explain only by javac not checking that files on classpath were changed. We perform clean before javac if it happens. - Alexey. -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 11:38 AM To: 'Ant Users List' Subject: RE: Working around jikes bug in large projects Nope! Just put the source for the different modules in separate source directories, so Javac can only find classes this module depends on thanks to the classpath, and not through any sourcepath, and make sure to use a clean classpath. You do not need to humongous single <javac> to ensure correct dependencies!!! --DD -----Original Message----- From: Alexey Solofnenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 1:19 PM To: 'Ant Users List' Subject: RE: Working around jikes bug in large projects However a single command compilation is almost always faster. At least it is the only way to be sure that all dependencies will be correct. - Alexey. -- { http://trelony.cjb.net/ } Alexey N. Solofnenko { http://www.inventigo.com/ } Inventigo LLC Pleasant Hill, CA (GMT-8 usually) -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 11:10 AM To: 'Ant Users List' Subject: RE: Working around jikes bug in large projects Just increase the memory for <javac>, or better yet, compartiment your software into independent modules that can be compiled in the right order independently. Will makes you software better for it, and it's always a very good idea to have clean separation (and clear dependencies) lines between your different modules (I can't imagine a single module of 3000 files!). We used to compile ~5500 files in one pass (needs gobs of memory!), now it's two independent ones of ~2500 and ~3000 files, and we're breaking that down further to 6/8 different projects. --DD -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 12:59 PM To: [EMAIL PROTECTED] Subject: Working around jikes bug in large projects Has anyone run into jikes bug #222 (compiling large # of classes leads to ClassFormatErrors) when using ant/jikes for large projects? (For information on the bug, see http://www-124.ibm.com/developerworks/bugs/?func=detailbug&bug_id=222&group_ id=10) I'm in the process of changing from makefiles to ant for our build, which consists of over 3000 java files. Our makefiles call jikes for each java file, so we have never run into this before. We also have a makefile in each package. With ant, I currently have a single build.xml at the top level of the project tree, which basically ends up feeding all 3000 files to jikes at once, exposing this ugly jikes bug. I've tried switching to javac, but I run out of memory trying to compile it. In any case, I'd rather stick with jikes if at all possible. Has anybody else run into this? How did you work around it? I suppose I could put a build.xml in each package, but that still wouldn't guarantee I wouldn't run into this bug again. Besides, isn't that counter to ant philosophy? Thanks, Ed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ed Howe * Software Architect * Employease, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
