Recompile all subclasses of changed classes

Previously inter-project IC recompiled only direct subclasses
of changed classes

    #KT-25455 fixed
This commit is contained in:
Alexey Tsvetkov
2018-07-13 01:54:10 +03:00
parent 73f7c2ef3c
commit 272f9b8a10
4 changed files with 4 additions and 7 deletions
@@ -132,6 +132,7 @@ fun ChangesCollector.getDirtyData(
if (change is ChangeInfo.SignatureChanged) {
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
dirtyClassesFqNames.addAll(fqNames)
for (classFqName in fqNames) {
assert(!classFqName.isRoot) { "$classFqName is root when processing $change" }
@@ -144,7 +144,7 @@ open class A {
project.build("build") {
assertSuccessful()
val affectedSources = project.projectDir.getFilesByNames("A.kt", "B.kt", "AA.kt", "BB.kt")
val affectedSources = project.projectDir.getFilesByNames("A.kt", "B.kt", "AA.kt", "AAA.kt", "BB.kt")
val relativePaths = project.relativize(affectedSources)
assertCompiledKotlinSources(relativePaths)
}
@@ -2,6 +2,6 @@ package foo
import bar.*
class AA : A() {
open class AA : A() {
fun aa() {}
}
@@ -5,8 +5,4 @@
package foo
import bar.*
class AAA : A() {
fun aa() {}
}
class AAA : AA()