even one modified groovy file may force recompiling others (circular dependency)

This commit is contained in:
peter
2010-02-03 16:26:35 +00:00
parent c7abfc56c8
commit 6e80e9ae08
2 changed files with 17 additions and 2 deletions
@@ -71,8 +71,7 @@ public class GroovyCompiler extends GroovyCompilerBase {
// groovyc may fail if we don't also recompile files like B such that A depends on B and B depends on C, where A & C \in toCompile
// see http://jira.codehaus.org/browse/GROOVY-4024
// this is important only if >1 files have been changed
if (toCompile.size() > 1 && !"false".equals(System.getProperty("compile.groovy.dependencies", "true"))) {
if (!"false".equals(System.getProperty("compile.groovy.dependencies", "true"))) {
context.getProgressIndicator().checkCanceled();
context.getProgressIndicator().setText("Enumerating Groovy classes...");
@@ -329,5 +329,21 @@ class Goo {}""")
assertEmpty make()
}
public void testRecompileDependentClassesWithOnlyOneChanged() throws Exception {
def bar = myFixture.addFileToProject("Bar.groovy", """
class Bar {
Foo f
}
""")
myFixture.addFileToProject "Foo.groovy", """
class Foo extends Bar {
}"""
assertEmpty make()
touch(bar.virtualFile)
assertEmpty make()
}
}