[Scons-dev] File-based build tools will never handle Java
Gary Oberbrunner
garyo at oberbrunner.com
Thu Sep 6 11:21:46 EDT 2012
On Wed, Sep 5, 2012 at 10:20 PM, Greg Ward <greg at gerg.ca> wrote:
> OK, I finally sat down and did a little thought experiment, and have
> convinced myself that file-based buld tools will never handle Java.
> The reason? Dependency cycles.
>
> Short version: in Java, cycles between source files in the same
> package are commonplace and often impossible to avoid. Because
> interface and implementation are in the same file, that leads to DAG
> cycles, which any DAG-of-files-based build tool (make, SCons, tup,
> waf, ...) will reject.
I don't think this is really a problem, or doesn't have to be. In
SCons there are no dependencies *between* source files; only from
object (.class files) to source (the object depends on the source(s)).
And the jar depends on the class files. So I don't see how call
graph complexities lead to build dependency cycles. If any of the
source files change, certain objects and jars depend on those and have
to be rebuilt. The real problem (at least as I understand it, I'm not
a Java guy) is the fact that each .java produces unpredictable
outputs. Am I correct about this, or are there actually real
unavoidable build dependency cycles?
--
Gary
More information about the Scons-dev
mailing list