In the process of adding tests to my kawa module for buildr, I'm struggling
with build order. The scala module that I've modelled my kawa module on
seems to simply build the scala code first, then the java code for mixed
mode compilation. The code can be found in scala/compiler.rb in the method
compile_with_scalac.

One of the tests that comes with the module then defines a java package
Foo, and a scala package Bar, where Bar inherits from Foo.

When I model my own compile_with_kawac method similar to the scala method,
this test fails. The reason it fails is because the java module Foo hasn't
been compiled when the kawa module Bar is being compiled.

At first I suspected there might be something wrong in my compile_map code,
but after looking at it, it seems that the method does not even try to
figure out build order at all, only mapping from source file to class file.

So how is build order decided in buildr?

For this one test I added a workaround where I retry kawa compilation if it
fails the first time, but considering that I'm doing everything in a
simliar way and order as the scala module, there's got to be something I'm
missing. Worst case, the scala compiler handles such dependencies itself.

Anyway, figured I would ask, hoping somebody could clue me in.

Thanks,

Marius Kjeldahl

Reply via email to