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:
@@ -132,6 +132,7 @@ fun ChangesCollector.getDirtyData(
|
|||||||
|
|
||||||
if (change is ChangeInfo.SignatureChanged) {
|
if (change is ChangeInfo.SignatureChanged) {
|
||||||
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
|
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
|
||||||
|
dirtyClassesFqNames.addAll(fqNames)
|
||||||
|
|
||||||
for (classFqName in fqNames) {
|
for (classFqName in fqNames) {
|
||||||
assert(!classFqName.isRoot) { "$classFqName is root when processing $change" }
|
assert(!classFqName.isRoot) { "$classFqName is root when processing $change" }
|
||||||
|
|||||||
+1
-1
@@ -144,7 +144,7 @@ open class A {
|
|||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
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)
|
val relativePaths = project.relativize(affectedSources)
|
||||||
assertCompiledKotlinSources(relativePaths)
|
assertCompiledKotlinSources(relativePaths)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,6 +2,6 @@ package foo
|
|||||||
|
|
||||||
import bar.*
|
import bar.*
|
||||||
|
|
||||||
class AA : A() {
|
open class AA : A() {
|
||||||
fun aa() {}
|
fun aa() {}
|
||||||
}
|
}
|
||||||
+1
-5
@@ -5,8 +5,4 @@
|
|||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
import bar.*
|
class AAA : AA()
|
||||||
|
|
||||||
class AAA : A() {
|
|
||||||
fun aa() {}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user