From 144652dbaa494cd18a37d54dee7cc61011bf7d1f Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Tue, 21 May 2019 15:47:37 +0300 Subject: [PATCH] Fix IC test for multifile part with property Our JPS and Gradle plugins handle recompilation of multifile classes differently. JPS plugin delegates handling to the JPS itself, which tracks dependencies via bytecode, and marks classes as dirty when they are affected. So in JPS other parts of multifile classes are recompiled only when a part's signature is changed. In Gradle plugin we handle recompilation ourselves in simpler way: any change in any part leads to a recompilation of all parts of the same multifile class. In future we should improve our Gradle plugin, but for now I'm changing the test so that both JPS and Gradle tests recompile all parts. Also the dummy function is added to make sure that we don't blindly recompile everything when a part is changed. Original commit: 7f1d30058a1fdcf31e584e564d0a74c88cc0a97f --- .../other/multifilePartsWithProperties/build.log | 10 ++++++++++ .../other/multifilePartsWithProperties/dummy.kt | 1 + .../other/multifilePartsWithProperties/partB.kt.new.1 | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/dummy.kt diff --git a/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/build.log b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/build.log index 0a12cb05907..260d0b077bf 100644 --- a/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/build.log +++ b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/build.log @@ -9,4 +9,14 @@ Compiling files: src/partB.kt End of files Exit code: OK +------------------------------------------ +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/Utils.class + out/production/module/Utils__PartAKt.class +End of files +Compiling files: + src/partA.kt +End of files +Exit code: OK ------------------------------------------ \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/dummy.kt b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/dummy.kt new file mode 100644 index 00000000000..3f0c1c77242 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/dummy.kt @@ -0,0 +1 @@ +fun dummy() {} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/partB.kt.new.1 b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/partB.kt.new.1 index 258dff7e9f7..f1df801bed2 100644 --- a/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/partB.kt.new.1 +++ b/jps/jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/partB.kt.new.1 @@ -1,4 +1,4 @@ @file:JvmName("Utils") @file:JvmMultifileClass -val bVal: Int get() = 1 \ No newline at end of file +val bVal: String get() = "1" \ No newline at end of file