Recompile all subclasses of removed classes
This commit is contained in:
@@ -88,11 +88,17 @@ abstract class IncrementalCacheCommon<ClassName>(workingDir: File) : BasicMapsOw
|
||||
|
||||
abstract fun clearCacheForRemovedClasses(changesCollector: ChangesCollector)
|
||||
|
||||
protected fun removeAllFromClassStorage(removedClasses: Collection<FqName>) {
|
||||
protected fun removeAllFromClassStorage(removedClasses: Collection<FqName>, changesCollector: ChangesCollector) {
|
||||
if (removedClasses.isEmpty()) return
|
||||
|
||||
val removedFqNames = removedClasses.toSet()
|
||||
|
||||
for (removedClass in removedFqNames) {
|
||||
for (affectedClass in withSubtypes(removedClass, thisWithDependentCaches)) {
|
||||
changesCollector.collectSignature(affectedClass, areSubclassesAffected = false)
|
||||
}
|
||||
}
|
||||
|
||||
for (cache in thisWithDependentCaches) {
|
||||
val parentsFqNames = hashSetOf<FqName>()
|
||||
val childrenFqNames = hashSetOf<FqName>()
|
||||
|
||||
@@ -100,7 +100,7 @@ open class IncrementalJsCache(cachesDir: File) : IncrementalCacheCommon<FqName>(
|
||||
translationResults.remove(it, changesCollector)
|
||||
inlineFunctions.remove(it)
|
||||
}
|
||||
removeAllFromClassStorage(dirtyOutputClassesMap.getDirtyOutputClasses())
|
||||
removeAllFromClassStorage(dirtyOutputClassesMap.getDirtyOutputClasses(), changesCollector)
|
||||
dirtySources.clear()
|
||||
dirtyOutputClassesMap.clean()
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ open class IncrementalJvmCache(
|
||||
javaSourcesProtoMap.remove(it, changesCollector)
|
||||
}
|
||||
|
||||
removeAllFromClassStorage(dirtyClasses.map { it.fqNameForClassNameWithoutDollars })
|
||||
removeAllFromClassStorage(dirtyClasses.map { it.fqNameForClassNameWithoutDollars }, changesCollector)
|
||||
dirtyOutputClassesMap.clean()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user