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)
|
abstract fun clearCacheForRemovedClasses(changesCollector: ChangesCollector)
|
||||||
|
|
||||||
protected fun removeAllFromClassStorage(removedClasses: Collection<FqName>) {
|
protected fun removeAllFromClassStorage(removedClasses: Collection<FqName>, changesCollector: ChangesCollector) {
|
||||||
if (removedClasses.isEmpty()) return
|
if (removedClasses.isEmpty()) return
|
||||||
|
|
||||||
val removedFqNames = removedClasses.toSet()
|
val removedFqNames = removedClasses.toSet()
|
||||||
|
|
||||||
|
for (removedClass in removedFqNames) {
|
||||||
|
for (affectedClass in withSubtypes(removedClass, thisWithDependentCaches)) {
|
||||||
|
changesCollector.collectSignature(affectedClass, areSubclassesAffected = false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (cache in thisWithDependentCaches) {
|
for (cache in thisWithDependentCaches) {
|
||||||
val parentsFqNames = hashSetOf<FqName>()
|
val parentsFqNames = hashSetOf<FqName>()
|
||||||
val childrenFqNames = hashSetOf<FqName>()
|
val childrenFqNames = hashSetOf<FqName>()
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ open class IncrementalJsCache(cachesDir: File) : IncrementalCacheCommon<FqName>(
|
|||||||
translationResults.remove(it, changesCollector)
|
translationResults.remove(it, changesCollector)
|
||||||
inlineFunctions.remove(it)
|
inlineFunctions.remove(it)
|
||||||
}
|
}
|
||||||
removeAllFromClassStorage(dirtyOutputClassesMap.getDirtyOutputClasses())
|
removeAllFromClassStorage(dirtyOutputClassesMap.getDirtyOutputClasses(), changesCollector)
|
||||||
dirtySources.clear()
|
dirtySources.clear()
|
||||||
dirtyOutputClassesMap.clean()
|
dirtyOutputClassesMap.clean()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ open class IncrementalJvmCache(
|
|||||||
javaSourcesProtoMap.remove(it, changesCollector)
|
javaSourcesProtoMap.remove(it, changesCollector)
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAllFromClassStorage(dirtyClasses.map { it.fqNameForClassNameWithoutDollars })
|
removeAllFromClassStorage(dirtyClasses.map { it.fqNameForClassNameWithoutDollars }, changesCollector)
|
||||||
dirtyOutputClassesMap.clean()
|
dirtyOutputClassesMap.clean()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/B.kt
|
||||||
|
src/C.kt
|
||||||
|
src/createA.kt
|
||||||
|
src/createB.kt
|
||||||
|
src/createC.kt
|
||||||
|
src/useAfoo.kt
|
||||||
|
src/useBbar.kt
|
||||||
|
src/useCbaz.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: A
|
||||||
|
Unresolved reference: A
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/B.kt
|
||||||
|
src/C.kt
|
||||||
|
src/createA.kt
|
||||||
|
src/createB.kt
|
||||||
|
src/createC.kt
|
||||||
|
src/funA.kt
|
||||||
|
src/useAfoo.kt
|
||||||
|
src/useBbar.kt
|
||||||
|
src/useCbaz.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
|
||||||
Vendored
+36
@@ -0,0 +1,36 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/B.kt
|
||||||
|
src/createA.kt
|
||||||
|
src/createB.kt
|
||||||
|
src/useAfoo.kt
|
||||||
|
src/useBbar.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: A
|
||||||
|
Unresolved reference: A
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
src/B.kt
|
||||||
|
src/createA.kt
|
||||||
|
src/createB.kt
|
||||||
|
src/useAfoo.kt
|
||||||
|
src/useBbar.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
|
||||||
|
================ Step #3 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/failCompilation.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
Expecting a top level declaration
|
||||||
@@ -34,6 +34,20 @@ Compiling files:
|
|||||||
module2/src/createA.kt
|
module2/src/createA.kt
|
||||||
module2/src/useAfoo.kt
|
module2/src/useAfoo.kt
|
||||||
End of files
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
module2/src/createB.kt
|
||||||
|
module2/src/useBbar.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module2/META-INF/module2.kotlin_module
|
||||||
|
out/production/module2/use/CreateBKt.class
|
||||||
|
out/production/module2/use/UseBbarKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
module2/src/createB.kt
|
||||||
|
module2/src/useBbar.kt
|
||||||
|
End of files
|
||||||
Exit code: OK
|
Exit code: OK
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user