diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompiler.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompiler.java index 8a669b0ff836..b18f4507c08f 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompiler.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompiler.java @@ -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..."); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy index 5cb388cad796..a02797bbe10f 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy @@ -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() + } + }