Recompile all class and member usages when flag and member are changed
This commit is contained in:
+6
@@ -1081,6 +1081,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("flagsAndMemberInSameClassChanged")
|
||||
public void testFlagsAndMemberInSameClassChanged() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jvmNameChanged")
|
||||
public void testJvmNameChanged() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/jvmNameChanged/");
|
||||
|
||||
+14
-8
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.jps.incremental
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import com.intellij.util.SmartList
|
||||
import org.jetbrains.kotlin.jps.incremental.storage.ProtoMapValue
|
||||
import org.jetbrains.kotlin.load.kotlin.header.isCompatibleClassKind
|
||||
import org.jetbrains.kotlin.load.kotlin.header.isCompatibleFileFacadeKind
|
||||
@@ -112,16 +113,21 @@ abstract class AbstractProtoComparisonTest : UsefulTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
val changes = when (diff) {
|
||||
is DifferenceKind.NONE ->
|
||||
"NONE"
|
||||
is DifferenceKind.CLASS_SIGNATURE ->
|
||||
"CLASS_SIGNATURE"
|
||||
is DifferenceKind.MEMBERS ->
|
||||
"MEMBERS\n ${diff.names.sorted()}"
|
||||
val changes = SmartList<String>()
|
||||
|
||||
if (diff.isClassSignatureChanged) {
|
||||
changes.add("CLASS_SIGNATURE")
|
||||
}
|
||||
|
||||
println("changes in ${oldLocalFileKotlinClass.classId}: $changes")
|
||||
if (diff.changedMembersNames.isNotEmpty()) {
|
||||
changes.add("MEMBERS\n ${diff.changedMembersNames.sorted()}")
|
||||
}
|
||||
|
||||
if (changes.isEmpty()) {
|
||||
changes.add("NONE")
|
||||
}
|
||||
|
||||
println("changes in ${oldLocalFileKotlinClass.classId}: ${changes.joinToString()}")
|
||||
}
|
||||
|
||||
private fun File.createSubDirectory(relativePath: String): File {
|
||||
|
||||
@@ -37,6 +37,12 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("classFlagsAndMembersChanged")
|
||||
public void testClassFlagsAndMembersChanged() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classFlagsChanged")
|
||||
public void testClassFlagsChanged() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/");
|
||||
|
||||
Reference in New Issue
Block a user