@@ -203,7 +203,7 @@ public class IncrementalCacheImpl(
|
|||||||
return result.map { File(it) }
|
return result.map { File(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getRecompilationDecision(protoChanged: Boolean, constantsChanged: Boolean, inlinesChanged: Boolean) =
|
private fun getRecompilationDecision(protoChanged: Boolean, constantsChanged: Boolean) =
|
||||||
when {
|
when {
|
||||||
constantsChanged -> RECOMPILE_OTHER_IN_CHUNK_AND_DEPENDANTS
|
constantsChanged -> RECOMPILE_OTHER_IN_CHUNK_AND_DEPENDANTS
|
||||||
protoChanged -> RECOMPILE_OTHER_KOTLIN_IN_CHUNK
|
protoChanged -> RECOMPILE_OTHER_KOTLIN_IN_CHUNK
|
||||||
@@ -237,8 +237,7 @@ public class IncrementalCacheImpl(
|
|||||||
header.isCompatiblePackageFacadeKind() ->
|
header.isCompatiblePackageFacadeKind() ->
|
||||||
getRecompilationDecision(
|
getRecompilationDecision(
|
||||||
protoChanged = protoMap.put(className, BitEncoding.decodeBytes(header.annotationData!!), isPackage = true),
|
protoChanged = protoMap.put(className, BitEncoding.decodeBytes(header.annotationData!!), isPackage = true),
|
||||||
constantsChanged = false,
|
constantsChanged = false
|
||||||
inlinesChanged = false
|
|
||||||
)
|
)
|
||||||
header.isCompatibleFileFacadeKind() -> {
|
header.isCompatibleFileFacadeKind() -> {
|
||||||
assert(sourceFiles.size() == 1) { "Package part from several source files: $sourceFiles" }
|
assert(sourceFiles.size() == 1) { "Package part from several source files: $sourceFiles" }
|
||||||
@@ -253,8 +252,7 @@ public class IncrementalCacheImpl(
|
|||||||
when (header.classKind!!) {
|
when (header.classKind!!) {
|
||||||
JvmAnnotationNames.KotlinClass.Kind.CLASS -> getRecompilationDecision(
|
JvmAnnotationNames.KotlinClass.Kind.CLASS -> getRecompilationDecision(
|
||||||
protoChanged = protoMap.put(className, BitEncoding.decodeBytes(header.annotationData!!), isPackage = false),
|
protoChanged = protoMap.put(className, BitEncoding.decodeBytes(header.annotationData!!), isPackage = false),
|
||||||
constantsChanged = constantsMap.process(className, fileBytes),
|
constantsChanged = constantsMap.process(className, fileBytes)
|
||||||
inlinesChanged = inlineFunctionsMap.process(className, fileBytes)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
JvmAnnotationNames.KotlinClass.Kind.LOCAL_CLASS, JvmAnnotationNames.KotlinClass.Kind.ANONYMOUS_OBJECT -> DO_NOTHING
|
JvmAnnotationNames.KotlinClass.Kind.LOCAL_CLASS, JvmAnnotationNames.KotlinClass.Kind.ANONYMOUS_OBJECT -> DO_NOTHING
|
||||||
@@ -266,8 +264,7 @@ public class IncrementalCacheImpl(
|
|||||||
|
|
||||||
getRecompilationDecision(
|
getRecompilationDecision(
|
||||||
protoChanged = false,
|
protoChanged = false,
|
||||||
constantsChanged = constantsMap.process(className, fileBytes),
|
constantsChanged = constantsMap.process(className, fileBytes)
|
||||||
inlinesChanged = inlineFunctionsMap.process(className, fileBytes)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
@@ -287,8 +284,7 @@ public class IncrementalCacheImpl(
|
|||||||
|
|
||||||
val newDecision = getRecompilationDecision(
|
val newDecision = getRecompilationDecision(
|
||||||
protoChanged = internalClassName in protoMap,
|
protoChanged = internalClassName in protoMap,
|
||||||
constantsChanged = internalClassName in constantsMap,
|
constantsChanged = internalClassName in constantsMap
|
||||||
inlinesChanged = internalClassName in inlineFunctionsMap
|
|
||||||
)
|
)
|
||||||
if (newDecision != DO_NOTHING) {
|
if (newDecision != DO_NOTHING) {
|
||||||
KotlinBuilder.LOG.debug("$newDecision because $internalClassName is removed")
|
KotlinBuilder.LOG.debug("$newDecision because $internalClassName is removed")
|
||||||
|
|||||||
Reference in New Issue
Block a user