From 0950205a47c1b9cababb5335c80fca0e49366778 Mon Sep 17 00:00:00 2001 From: "Aleksei.Cherepanov" Date: Wed, 13 Jul 2022 18:28:17 +0200 Subject: [PATCH] [IC] Add test for lookups flushing #KT-53168 --- ...ghtTreeJvmCompilerRunnerTestGenerated.java | 5 + ...ntalFirJvmCompilerRunnerTestGenerated.java | 5 + ...ghtTreeJvmCompilerRunnerTestGenerated.java | 5 + ...rementalJsCompilerRunnerTestGenerated.java | 5 + ...erRunnerWithMetadataOnlyTestGenerated.java | 5 + ...ntalJsKlibCompilerRunnerTestGenerated.java | 5 + ...WithScopeExpansionRunnerTestGenerated.java | 5 + ...ementalJvmCompilerRunnerTestGenerated.java | 5 + ...OldBackendCompilerRunnerTestGenerated.java | 5 + .../build/IncrementalJvmJpsTestGenerated.java | 5 + .../DataClass.kt | 4 + .../DataClass.kt.new.2 | 3 + .../DataClass.kt.new.3 | 4 + .../DataClass.kt.new.5 | 3 + .../build.log | 94 +++++++++++++++++++ .../main.kt | 6 ++ .../main.kt.new.1 | 5 + .../main.kt.new.4 | 6 ++ 18 files changed, 175 insertions(+) create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.2 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.3 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.5 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/build.log create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.1 create mode 100644 jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.4 diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java index e41953956c9..8859012ff3c 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java @@ -627,6 +627,11 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java index 46fe6f1bc8d..ea627c87e6e 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java @@ -627,6 +627,11 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java index 47de6426261..3367d29d989 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java @@ -627,6 +627,11 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java index f033c1a36a3..849673032e3 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java @@ -631,6 +631,11 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java index e5e0581f4bd..415c6ff9545 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated.java @@ -631,6 +631,11 @@ public class IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated extends Ab runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java index 58691640479..b0af1418c46 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerRunnerTestGenerated.java @@ -596,6 +596,11 @@ public class IncrementalJsKlibCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java index 82a6f42779f..ec4dd8bb7c5 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated.java @@ -596,6 +596,11 @@ public class IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated exte runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java index 82448511e72..2264e4d0237 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java @@ -632,6 +632,11 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmOldBackendCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmOldBackendCompilerRunnerTestGenerated.java index 66d1a6476da..276e237ab3c 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmOldBackendCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmOldBackendCompilerRunnerTestGenerated.java @@ -632,6 +632,11 @@ public class IncrementalJvmOldBackendCompilerRunnerTestGenerated extends Abstrac runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java index eb9b12b60ac..e8bfb9724e1 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java @@ -1301,6 +1301,11 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes runTest("jps/jps-plugin/testData/incremental/pureKotlin/secondaryConstructorInlined/"); } + @TestMetadata("sequentualAddingAndDeletingOfPropertyAndUsage") + public void testSequentualAddingAndDeletingOfPropertyAndUsage() throws Exception { + runTest("jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/"); + } + @TestMetadata("serializedSubClassAndChangedInterfaces") public void testSerializedSubClassAndChangedInterfaces() throws Exception { runTest("jps/jps-plugin/testData/incremental/pureKotlin/serializedSubClassAndChangedInterfaces/"); diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt new file mode 100644 index 00000000000..428254841df --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt @@ -0,0 +1,4 @@ +data class DatClass( + val a: Boolean = false, + val b: Int = 1 +) diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.2 b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.2 new file mode 100644 index 00000000000..dbe35fbd645 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.2 @@ -0,0 +1,3 @@ +data class DatClass( + val a: Boolean = false +) diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.3 b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.3 new file mode 100644 index 00000000000..428254841df --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.3 @@ -0,0 +1,4 @@ +data class DatClass( + val a: Boolean = false, + val b: Int = 1 +) diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.5 b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.5 new file mode 100644 index 00000000000..63368cfc1e3 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/DataClass.kt.new.5 @@ -0,0 +1,3 @@ +data class DatClass( + val a: Boolean = false, +) diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/build.log new file mode 100644 index 00000000000..aad58ef46f7 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/build.log @@ -0,0 +1,94 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/main.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #2 ================= + +Cleaning output files: + out/production/module/DatClass.class + out/production/module/META-INF/module.kotlin_module +End of files +Compiling files: + src/DataClass.kt +End of files +After build round. Marked as dirty by Kotlin: + src/main.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/main.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #3 ================= + +Cleaning output files: + out/production/module/DatClass.class + out/production/module/META-INF/module.kotlin_module +End of files +Compiling files: + src/DataClass.kt +End of files +After build round. Marked as dirty by Kotlin: + src/main.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/main.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #4 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/main.kt +End of files +Exit code: OK +------------------------------------------ + +================ Step #5 ================= + +Cleaning output files: + out/production/module/DatClass.class + out/production/module/META-INF/module.kotlin_module +End of files +Compiling files: + src/DataClass.kt +End of files +After build round. Marked as dirty by Kotlin: + src/main.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/main.kt +End of files +Exit code: ABORT +------------------------------------------ +COMPILATION FAILED +Cannot find a parameter with this name: b \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt new file mode 100644 index 00000000000..b6465922f08 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt @@ -0,0 +1,6 @@ +fun main(args: Array) { + DatClass( + a=true, + b= 3 + ) +} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.1 b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.1 new file mode 100644 index 00000000000..20bb54af5e5 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.1 @@ -0,0 +1,5 @@ +fun main(args: Array) { + DatClass( + a=true + ) +} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.4 b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.4 new file mode 100644 index 00000000000..b6465922f08 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/pureKotlin/sequentualAddingAndDeletingOfPropertyAndUsage/main.kt.new.4 @@ -0,0 +1,6 @@ +fun main(args: Array) { + DatClass( + a=true, + b= 3 + ) +} \ No newline at end of file