Baby steps for incremental compilation.

This commit is contained in:
Evgeny Gerashchenko
2014-01-22 23:38:57 +04:00
parent 9e22c29825
commit 5acd054c72
16 changed files with 226 additions and 19 deletions
@@ -34,6 +34,7 @@ import org.jetbrains.jet.compiler.CompilerSettings;
import java.io.File;
import java.io.PrintStream;
import java.util.Collection;
import java.util.List;
public class KotlinCompilerRunner {
@@ -65,7 +66,7 @@ public class KotlinCompilerRunner {
MessageCollector messageCollector,
CompilerEnvironment environment,
OutputItemsCollector collector,
List<File> sourceFiles,
Collection<File> sourceFiles,
List<String> libraryFiles,
File outputFile
) {
@@ -151,7 +152,7 @@ public class KotlinCompilerRunner {
private static void setupK2JsArguments(
File outputFile,
List<File> sourceFiles,
Collection<File> sourceFiles,
List<String> libraryFiles,
K2JSCompilerArguments settings
) {
@@ -85,13 +85,13 @@ public class KotlinModuleXmlBuilderFactory implements KotlinModuleDescriptionBui
public void processClassPathSection(@NotNull String sectionDescription, @NotNull Collection<File> files) {
p.println("<!-- ", sectionDescription, " -->");
for (File file : files) {
boolean isOutput = directoriesToFilterOut.contains(file);
boolean isOutput = directoriesToFilterOut.contains(file); // TODO make it optional
if (isOutput) {
// For IDEA's make (incremental compilation) purposes, output directories of the current module and its dependencies
// appear on the class path, so we are at risk of seeing the results of the previous build, i.e. if some class was
// removed in the sources, it may still be there in binaries. Thus, we delete these entries from the classpath.
p.println("<!-- Output directory, commented out -->");
p.println("<!-- ");
//p.println("<!-- ");
p.pushIndent();
}
@@ -99,7 +99,7 @@ public class KotlinModuleXmlBuilderFactory implements KotlinModuleDescriptionBui
if (isOutput) {
p.popIndent();
p.println("-->");
//p.println("-->");
}
}
}