harrah/xsbt — Issue #220: Java sources don't pick up change is Scala dependency
Author: hubertp
Created: 2011-10-10 12:17:09+00:00
State: open

Let's assume the following situation:
src/main/java/JJ,scala

public class JJ {
public static void main(String[] args) {
new S().foo("ahoy");
}
}

src/main/scala/S.scala

class S {
def foo(s:String) { println("I am foo") }
}

No you have a clean state (i.e. no previous dependency info, or make sure you clean before you start sbt session). Also this is using the default project definition.
The problem happens with the following steps (enter xsbt session)
1) compile -> compiles both files, everything is fine
2) change foo -> foo2 in S.scala
3) compile -> compiles only S.scala *no error*
4) compile (nothing changed, just run the command again) -> compile error for JJ.scala

Step 3) is really weird because I would expect it to report an error. Running on one of the latest 0.11.0 snapshots.
I think this is causing also some issues in the Eclipse which uses the sbt's dependency tracking.