Gradle IC: fix converting class to package facade

This commit is contained in:
Alexey Tsvetkov
2016-10-27 23:52:39 +03:00
parent 151cf7d073
commit f01a956a8b
2 changed files with 17 additions and 15 deletions
@@ -192,13 +192,19 @@ open class IncrementalCacheImpl<Target>(
// the class' proto wouldn't ever be deleted, // the class' proto wouldn't ever be deleted,
// because we don't write proto for multifile facades. // because we don't write proto for multifile facades.
// As a workaround we can remove proto values for multifile facades. // As a workaround we can remove proto values for multifile facades.
val additionalChangeInfo = if (className in protoMap) {
val info = ChangeInfo.SignatureChanged(className.fqNameForClassNameWithoutDollars, areSubclassesAffected = true)
CompilationResult(protoChanged = true, changes = sequenceOf(info))
}
else CompilationResult.NO_CHANGES
protoMap.remove(className) protoMap.remove(className)
classFqNameToSourceMap.remove(className.fqNameForClassNameWithoutDollars) classFqNameToSourceMap.remove(className.fqNameForClassNameWithoutDollars)
internalNameToSource.remove(className.internalName) internalNameToSource.remove(className.internalName)
// TODO NO_CHANGES? (delegates only) // TODO NO_CHANGES? (delegates only)
constantsMap.process(kotlinClass, isPackage = true) + constantsMap.process(kotlinClass, isPackage = true) +
inlineFunctionsMap.process(kotlinClass, isPackage = true) inlineFunctionsMap.process(kotlinClass, isPackage = true) +
additionalChangeInfo
} }
KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> { KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> {
assert(sourceFiles.size == 1) { "Multifile class part from several source files: $sourceFiles" } assert(sourceFiles.size == 1) { "Multifile class part from several source files: $sourceFiles" }
@@ -10,24 +10,32 @@ Compiling files:
End of files End of files
Marked as dirty by Kotlin: Marked as dirty by Kotlin:
src/AChild.kt src/AChild.kt
src/getA.kt
src/getAChild.kt
src/useF.kt src/useF.kt
src/useG.kt src/useG.kt
src/useH.kt
src/useJ.kt
Exit code: ADDITIONAL_PASS_REQUIRED Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------ ------------------------------------------
Cleaning output files: Cleaning output files:
out/production/module/AChild.class out/production/module/AChild.class
out/production/module/GetAChildKt.class
out/production/module/GetAKt.class out/production/module/GetAKt.class
out/production/module/META-INF/module.kotlin_module out/production/module/META-INF/module.kotlin_module
out/production/module/UseFKt.class out/production/module/UseFKt.class
out/production/module/UseGKt.class out/production/module/UseGKt.class
out/production/module/UseHKt.class out/production/module/UseHKt.class
out/production/module/UseJKt.class
End of files End of files
Compiling files: Compiling files:
src/AChild.kt src/AChild.kt
src/getA.kt src/getA.kt
src/getAChild.kt
src/useF.kt src/useF.kt
src/useG.kt src/useG.kt
src/useH.kt src/useH.kt
src/useJ.kt
End of files End of files
Exit code: ABORT Exit code: ABORT
------------------------------------------ ------------------------------------------
@@ -50,21 +58,9 @@ Compiling files:
src/AChild.kt src/AChild.kt
src/APartF.kt src/APartF.kt
src/APartG.kt src/APartG.kt
src/getAChild.kt
src/useF.kt src/useF.kt
src/useG.kt src/useG.kt
End of files
Marked as dirty by Kotlin:
src/getAChild.kt
src/useJ.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/GetAChildKt.class
out/production/module/META-INF/module.kotlin_module
out/production/module/UseJKt.class
End of files
Compiling files:
src/getAChild.kt
src/useJ.kt src/useJ.kt
End of files End of files
Exit code: OK Exit code: OK