[Scons-users] Scala-Support

Peter Gummer p-gummer at bigpond.net.au
Mon Sep 3 19:20:42 EDT 2012

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. I understand why C or C++ programmers would want incremental compilation during the normal working day's code-compile-test cycle (remembering back to the 1980s and 1990s when I used 'make' for that purpose), but why would I want to use SCons for incremental Java compilation? When I'm programming in Java, I'm working inside Eclipse, where incremental builds happen in the background instantly every time I save a tiny change. It's similar in any other language that I've used over the last 15 years: Delphi, C#, Visual Basic, Eiffel ... the compiler figures out all the dependencies for itself and usually integrates my latest changes within a few seconds. Introducing something like SCons into an already-seamless workflow just sounds pointless to me.

My interest in SCons arises for doing complete system rebuilds, usually on an integration server running CruiseControl or Jenkins. We've been using it for that purpose for our Eiffel builds for about 6 years, and it's great, because SCons knows the dependencies between the source files and the final executable or DLL and doesn't waste ten minutes rebuilding everything if the last commit was to something other than a source file. We find out immediately if there has been a bad commit and it automates the generation of deployment packages. I'm currently looking at using it for Java too (though Russel's posts have got me leaning towards Gradle rather than SCons, because it has better support for Java and Jenkins).

So I'm really at a loss to understand why anyone would want SCons to do incremental Java compilation.


More information about the Scons-users mailing list