fix GroovyCompilerTest: order chunk rebuild when stub generation failed (with NCDFE)
authorpeter <peter@jetbrains.com>
Wed, 11 Feb 2015 16:23:01 +0000 (17:23 +0100)
committerpeter <peter@jetbrains.com>
Wed, 11 Feb 2015 16:24:54 +0000 (17:24 +0100)
plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/GroovycOutputParser.java
plugins/groovy/rt-constants/src/org/jetbrains/groovy/compiler/rt/GroovyRtConstants.java
plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java

index a0e2a97fd94f0b1658c398bc7593323b3fc9d772..c85d5e8bd92e5ba5617fa4534e907fc37e6c9d9b 100644 (file)
@@ -184,6 +184,10 @@ public abstract class GroovycOutputParser {
         LOG.debug("Error message: " + message);
         return true;
       }
+      if (message.getMessageText().contains(GroovyRtConstants.GROOVYC_STUB_GENERATION_FAILED)) {
+        LOG.debug("Stub failed message: " + message);
+        return true;
+      }
     }
     if (getStdErr().length() > 0) {
       LOG.debug("Non-empty stderr: '" + getStdErr() + "'");
index 855b27722595771c0b03a35bb991255d0930a10e..6a37194597f9306c868cd9afa971c81efceac4ea 100644 (file)
@@ -35,4 +35,5 @@ public class GroovyRtConstants {
   public static final String CLEAR_PRESENTABLE = "$@#$%^ CLEAR_PRESENTABLE";
   public static final String NO_GROOVY = "Cannot compile Groovy files: no Groovy library is defined";
   public static final String OPTIMIZE = "optimize";
+  public static final String GROOVYC_STUB_GENERATION_FAILED = "Groovyc stub generation failed";
 }
index 369a112d62ebdc15a00624c62d16fa8a1f4a15c7..6824474b7394f5951f58242b095e4357779b23ac 100644 (file)
@@ -194,7 +194,7 @@ public class GroovyCompilerWrapper {
 
     if (forStubs) {
       collector.add(new CompilerMessage(GroovyCompilerMessageCategories.INFORMATION,
-                                        "Groovyc stub generation failed", null, -1, -1));
+                                        GroovyRtConstants.GROOVYC_STUB_GENERATION_FAILED, null, -1, -1));
     }
 
     final StringWriter writer = new StringWriter();