greg at gerg.ca
Tue Sep 4 15:55:35 EDT 2012
On 04 September 2012, Peter Gummer said:
> Greg Ward wrote:
> > The *other* thing that's hard about Java, which AFAIK *no one* has
> > solved, is incremental compilation. You can't understand the
> > dependencies between .java source files without parsing them
> > completely and understanding the type system, at which point you've
> > written 30% of a Java compiler. Better just to run the compiler and
> > analyze the byte code... which gets us back to feeding compiler output
> > back into the DAG. Really not compatible with SCons' design, as near
> > as I could tell.
> I'm curious about what is the usage scenario here.
Incremental testing. javac is fast enough that incremental compilation
at the level of files is not necessary. (It's necessary for
interactive use, which is why Eclipse has it. But for continuous
builds, it's a "nice-to-have" feature.)
But unit tests aren't necessarily fast, and you might not want to
spend 30 min running all your unit tests just because you happened
to modify one method in one source file that's grouped in a component
("source set" in Gradle terminology) that everything else in your tree
depends on. You should only have to run the unit tests that are
affected by that source file, which means you need fine-grained
file-level dependency info. And that's hard in Java.
Greg Ward http://www.gerg.ca/
Police arrested two kids yesterday -- one was drinking battery acid,
the other was eating fireworks. They charged one and let the other one off.
More information about the Scons-users