Enabled incremental compilation by default.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Incremental Compilation Tests" type="JUnit" factoryName="JUnit">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="jps-plugin" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.jps.build" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="pattern" />
|
||||
<option name="VM_PARAMETERS" value="-ea -Xmx512m -XX:MaxPermSize=320m -Dkotlin.incremental.compilation=true" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="moduleWithDependencies" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns>
|
||||
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalJpsTestGenerated" />
|
||||
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalCacheVersionChangedTest" />
|
||||
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalConstantSearchTest" />
|
||||
</patterns>
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method>
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="dist-quick-compiler-only" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -17,5 +17,5 @@
|
||||
package org.jetbrains.kotlin.config;
|
||||
|
||||
public class IncrementalCompilation {
|
||||
public static final boolean ENABLED = "true".equals(System.getProperty("kotlin.incremental.compilation"));
|
||||
public static final boolean ENABLED = !"false".equals(System.getProperty("kotlin.incremental.compilation"));
|
||||
}
|
||||
|
||||
+1
-4
@@ -5,10 +5,7 @@
|
||||
<sources path="s2"/>
|
||||
<!-- Java source roots -->
|
||||
<!-- Classpath -->
|
||||
<!-- Output directory, commented out -->
|
||||
<!--
|
||||
<classpath path="cp1"/>
|
||||
-->
|
||||
<classpath path="cp1"/>
|
||||
<classpath path="cp2"/>
|
||||
<!-- External annotations -->
|
||||
<externalAnnotations path="a1/f1"/>
|
||||
|
||||
+2
-8
@@ -5,10 +5,7 @@
|
||||
<sources path="s2"/>
|
||||
<!-- Java source roots -->
|
||||
<!-- Classpath -->
|
||||
<!-- Output directory, commented out -->
|
||||
<!--
|
||||
<classpath path="cp1"/>
|
||||
-->
|
||||
<classpath path="cp1"/>
|
||||
<classpath path="cp2"/>
|
||||
<!-- External annotations -->
|
||||
<externalAnnotations path="a1/f1"/>
|
||||
@@ -20,10 +17,7 @@
|
||||
<sources path="s22"/>
|
||||
<!-- Java source roots -->
|
||||
<!-- Classpath -->
|
||||
<!-- Output directory, commented out -->
|
||||
<!--
|
||||
<classpath path="cp12"/>
|
||||
-->
|
||||
<classpath path="cp12"/>
|
||||
<classpath path="cp22"/>
|
||||
<!-- External annotations -->
|
||||
<externalAnnotations path="a12/f12"/>
|
||||
|
||||
@@ -219,10 +219,6 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() {
|
||||
}
|
||||
|
||||
protected fun doTest(testDataPath: String) {
|
||||
if (!IncrementalCompilation.ENABLED) {
|
||||
return
|
||||
}
|
||||
|
||||
testDataDir = File(testDataPath)
|
||||
workDir = FileUtilRt.createTempDirectory(TEMP_DIRECTORY_TO_USE, "jps-build", null)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.google.common.collect.Lists;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.io.ZipUtil;
|
||||
import kotlin.KotlinPackage;
|
||||
@@ -303,12 +304,16 @@ public class KotlinJpsBuildTest extends AbstractKotlinJpsBuildTestCase {
|
||||
checkWhen(touch("src/main.kt"), null, packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"));
|
||||
checkWhen(touch("src/boo.kt"), null, packageClasses("kotlinProject", "src/boo.kt", "boo.BooPackage"));
|
||||
checkWhen(touch("src/Bar.kt"),
|
||||
new String[] {"src/Bar.kt", "src/boo.kt", "src/main.kt"},
|
||||
new String[] {"src/Bar.kt"},
|
||||
new String[] {klass("kotlinProject", "foo.Bar")});
|
||||
|
||||
checkWhen(del("src/main.kt"),
|
||||
new String[] {"src/Bar.kt", "src/boo.kt"},
|
||||
packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"));
|
||||
mergeArrays(
|
||||
packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"),
|
||||
packageClasses("kotlinProject", "src/boo.kt", "boo.BooPackage"),
|
||||
new String[]{ klass("kotlinProject", "foo.Bar") }
|
||||
));
|
||||
assertFilesExistInOutput(module, "boo/BooPackage.class", "foo/Bar.class");
|
||||
assertFilesNotExistInOutput(module, "foo/FooPackage.class");
|
||||
|
||||
@@ -325,7 +330,7 @@ public class KotlinJpsBuildTest extends AbstractKotlinJpsBuildTestCase {
|
||||
checkWhen(touch("src/main.kt"), null, packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"));
|
||||
checkWhen(touch("src/boo.kt"), null, packageClasses("kotlinProject", "src/boo.kt", "boo.BooPackage"));
|
||||
checkWhen(touch("src/Bar.kt"),
|
||||
new String[] {"src/Bar.kt", "src/boo.kt", "src/main.kt"},
|
||||
new String[] {"src/Bar.kt"},
|
||||
new String[] {
|
||||
klass("kotlinProject", "foo.Bar"),
|
||||
klass("kotlinProject", "foo.FooPackage"),
|
||||
@@ -333,7 +338,12 @@ public class KotlinJpsBuildTest extends AbstractKotlinJpsBuildTestCase {
|
||||
|
||||
checkWhen(del("src/main.kt"),
|
||||
new String[] {"src/Bar.kt", "src/boo.kt"},
|
||||
packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"));
|
||||
mergeArrays(
|
||||
packageClasses("kotlinProject", "src/main.kt", "foo.FooPackage"),
|
||||
packageClasses("kotlinProject", "src/Bar.kt", "foo.FooPackage"),
|
||||
packageClasses("kotlinProject", "src/boo.kt", "boo.BooPackage"),
|
||||
new String[] {klass("kotlinProject", "foo.Bar")}
|
||||
));
|
||||
assertFilesExistInOutput(module, "foo/FooPackage.class", "boo/BooPackage.class", "foo/Bar.class");
|
||||
|
||||
checkWhen(touch("src/boo.kt"), null, packageClasses("kotlinProject", "src/boo.kt", "boo.BooPackage"));
|
||||
@@ -618,6 +628,14 @@ public class KotlinJpsBuildTest extends AbstractKotlinJpsBuildTestCase {
|
||||
return klass(moduleName, AsmUtil.internalNameByFqNameWithoutInnerClasses(packagePartFqName));
|
||||
}
|
||||
|
||||
public static String[] mergeArrays(String[]... stringArrays) {
|
||||
Set<String> result = new HashSet<String>();
|
||||
for (String[] array : stringArrays) {
|
||||
result.addAll(Arrays.asList(array));
|
||||
}
|
||||
return ArrayUtil.toStringArray(result);
|
||||
}
|
||||
|
||||
private enum Operation {
|
||||
CHANGE, DELETE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user