mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
even one modified groovy file may force recompiling others (circular dependency)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user