Make the module script the last message so that it doesn't interfere with the errors

This commit is contained in:
Andrey Breslav
2012-03-02 15:56:30 +04:00
parent 3c566286dd
commit 956865b830
@@ -122,8 +122,6 @@ public class JetCompiler implements TranslatingCompiler {
CharSequence script = generateModuleScript(moduleName, chunk, files, tests, mainOutput, Sets.newHashSet(compileContext.getAllOutputDirectories()));
compileContext.addMessage(STATISTICS, "Generated module script:\n" + script.toString(), "file://" + path(mainOutput), 0, 1);
File scriptFile = new File(path(outputDir), "script.kts");
try {
FileUtil.writeToFile(scriptFile, script.toString());
@@ -138,6 +136,8 @@ public class JetCompiler implements TranslatingCompiler {
else {
runInProcess(compileContext, outputDir, kotlinHome, scriptFile);
}
compileContext.addMessage(INFORMATION, "Generated module script:\n" + script.toString(), "file://" + path(mainOutput), 0, 1);
}
private static CharSequence generateModuleScript(String moduleName, ModuleChunk chunk, List<VirtualFile> files, boolean tests, VirtualFile mainOutput, Set<VirtualFile> allOutputDirectories) {