diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt index 5e2cbda7856..23f6b5d89c9 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt @@ -340,6 +340,8 @@ public abstract class AbstractIncrementalJpsTest( UsefulTestCase.assertSameLinesWithFile(buildLogFile.absolutePath, logs) } + if (!enableExperimentalIncrementalCompilation && File(testDataDir, "dont-check-caches-in-non-experimental-ic.txt").exists()) return + val lastMakeResult = otherMakeResults.last() rebuildAndCheckOutput(lastMakeResult) clearCachesRebuildAndCheckOutput(lastMakeResult) diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/ExperimentalIncrementalJpsTestGenerated.java b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/ExperimentalIncrementalJpsTestGenerated.java index 3c555c78eae..83368bbcf34 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/ExperimentalIncrementalJpsTestGenerated.java +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/ExperimentalIncrementalJpsTestGenerated.java @@ -185,6 +185,18 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta doTest(fileName); } + @TestMetadata("changeTypeImplicitlyWithCircularDependency") + public void testChangeTypeImplicitlyWithCircularDependency() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); + doTest(fileName); + } + + @TestMetadata("changeWithRemovingUsage") + public void testChangeWithRemovingUsage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); + doTest(fileName); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java index bd0218cefb6..6fa3e46f594 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java @@ -185,6 +185,18 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { doTest(fileName); } + @TestMetadata("changeTypeImplicitlyWithCircularDependency") + public void testChangeTypeImplicitlyWithCircularDependency() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); + doTest(fileName); + } + + @TestMetadata("changeWithRemovingUsage") + public void testChangeWithRemovingUsage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); + doTest(fileName); + } + @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/build.log new file mode 100644 index 00000000000..9dd9067ed02 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/build.log @@ -0,0 +1,14 @@ +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/Usage1Kt.class +End of files +Compiling files: +src/usage1.kt +End of files +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/Usage2Kt.class +End of files +Compiling files: +src/usage2.kt +End of files diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/dont-check-caches-in-non-experimental-ic.txt b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/dont-check-caches-in-non-experimental-ic.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/experimental-ic-build.log b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/experimental-ic-build.log new file mode 100644 index 00000000000..6e1cc4cca29 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/experimental-ic-build.log @@ -0,0 +1,23 @@ +========== Step #1 ============ + +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/Usage1Kt.class +End of files +Compiling files: +src/usage1.kt +End of files +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/Usage2Kt.class +End of files +Compiling files: +src/usage2.kt +End of files +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/Usage1Kt.class +End of files +Compiling files: +src/usage1.kt +End of files diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt new file mode 100644 index 00000000000..6b9eeddad03 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt @@ -0,0 +1,5 @@ +package test + +fun foo() = "" + +fun baz() = bar() diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt.new b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt.new new file mode 100644 index 00000000000..8acd1a28007 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage1.kt.new @@ -0,0 +1,5 @@ +package test + +fun foo() = 1 + +fun baz() = bar() diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage2.kt b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage2.kt new file mode 100644 index 00000000000..07980db6a94 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/usage2.kt @@ -0,0 +1,3 @@ +package test + +fun bar() = foo() diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/bar.kt b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/bar.kt new file mode 100644 index 00000000000..07980db6a94 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/bar.kt @@ -0,0 +1,3 @@ +package test + +fun bar() = foo() diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/bar.kt.delete b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/bar.kt.delete new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/build.log new file mode 100644 index 00000000000..55e24cd49c0 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/build.log @@ -0,0 +1,10 @@ +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/BarKt.class +End of files +Cleaning output files: +out/production/module/test/FooKt.class +End of files +Compiling files: +src/foo.kt +End of files diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/experimental-ic-build.log b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/experimental-ic-build.log new file mode 100644 index 00000000000..e738a4a0702 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/experimental-ic-build.log @@ -0,0 +1,12 @@ +========== Step #1 ============ + +Cleaning output files: +out/production/module/META-INF/module.kotlin_module +out/production/module/test/BarKt.class +End of files +Cleaning output files: +out/production/module/test/FooKt.class +End of files +Compiling files: +src/foo.kt +End of files diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt new file mode 100644 index 00000000000..b17f6633603 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt @@ -0,0 +1,3 @@ +package test + +fun foo() = "" diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt.new b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt.new new file mode 100644 index 00000000000..8a4c388ca29 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/foo.kt.new @@ -0,0 +1,3 @@ +package test + +fun foo() = 1