committed by
Space Team
parent
86e6912447
commit
a4a433fd65
@@ -49,7 +49,7 @@ interface IncrementalCacheCommon {
|
||||
*/
|
||||
abstract class AbstractIncrementalCache<ClassName>(
|
||||
workingDir: File,
|
||||
val icContext: IncrementalCompilationContext,
|
||||
protected val icContext: IncrementalCompilationContext,
|
||||
) : BasicMapsOwner(workingDir), IncrementalCacheCommon {
|
||||
companion object {
|
||||
private const val CLASS_ATTRIBUTES = "class-attributes"
|
||||
@@ -229,8 +229,6 @@ abstract class AbstractIncrementalCache<ClassName>(
|
||||
}
|
||||
|
||||
override fun updateComplementaryFiles(dirtyFiles: Collection<File>, expectActualTracker: ExpectActualTrackerImpl) {
|
||||
if (icContext.useCompilerMapsOnly && this is IncrementalJvmCache) return
|
||||
|
||||
dirtyFiles.forEach {
|
||||
complementaryFilesMap.remove(it)
|
||||
}
|
||||
|
||||
@@ -71,8 +71,10 @@ open class IncrementalJvmCache(
|
||||
private val multifileFacadeToParts = registerMap(MultifileClassFacadeMap(MULTIFILE_CLASS_FACADES.storageFile, icContext))
|
||||
private val partToMultifileFacade = registerMap(MultifileClassPartMap(MULTIFILE_CLASS_PARTS.storageFile, icContext))
|
||||
private val inlineFunctionsMap = registerMap(InlineFunctionsMap(INLINE_FUNCTIONS.storageFile, icContext))
|
||||
|
||||
// todo: try to use internal names only?
|
||||
private val internalNameToSource = registerMap(InternalNameToSourcesMap(INTERNAL_NAME_TO_SOURCE.storageFile, icContext))
|
||||
|
||||
// gradle only
|
||||
private val javaSourcesProtoMap = registerMap(JavaSourcesProtoMap(JAVA_SOURCES_PROTO_MAP.storageFile, icContext))
|
||||
|
||||
@@ -101,6 +103,11 @@ open class IncrementalJvmCache(
|
||||
return toSystemIndependentName(File(outputDir, "$internalClassName.class").normalize().absolutePath)
|
||||
}
|
||||
|
||||
override fun updateComplementaryFiles(dirtyFiles: Collection<File>, expectActualTracker: ExpectActualTrackerImpl) {
|
||||
if (icContext.useCompilerMapsOnly) return
|
||||
super.updateComplementaryFiles(dirtyFiles, expectActualTracker)
|
||||
}
|
||||
|
||||
fun saveModuleMappingToCache(sourceFiles: Collection<File>, file: File) {
|
||||
val jvmClassName = JvmClassName.byInternalName(MODULE_MAPPING_FILE_NAME)
|
||||
protoMap.storeModuleMapping(jvmClassName, file.readBytes())
|
||||
@@ -204,7 +211,7 @@ open class IncrementalJvmCache(
|
||||
classProto: ProtoBuf.Class,
|
||||
stringTable: JvmStringTable,
|
||||
sourceFiles: List<File>?,
|
||||
changesCollector: ChangesCollector
|
||||
changesCollector: ChangesCollector,
|
||||
) {
|
||||
|
||||
val className = JvmClassName.byClassId(classId)
|
||||
@@ -231,7 +238,7 @@ open class IncrementalJvmCache(
|
||||
}
|
||||
|
||||
fun collectClassChangesByFeMetadata(
|
||||
className: JvmClassName, classProto: ProtoBuf.Class, stringTable: JvmStringTable, changesCollector: ChangesCollector
|
||||
className: JvmClassName, classProto: ProtoBuf.Class, stringTable: JvmStringTable, changesCollector: ChangesCollector,
|
||||
) {
|
||||
//class
|
||||
feProtoMap.check(className, classProto, stringTable, changesCollector)
|
||||
@@ -374,7 +381,7 @@ open class IncrementalJvmCache(
|
||||
className: JvmClassName,
|
||||
newMapValue: ProtoMapValue,
|
||||
newProtoData: ProtoData,
|
||||
changesCollector: ChangesCollector
|
||||
changesCollector: ChangesCollector,
|
||||
) {
|
||||
val key = className.internalName
|
||||
val oldMapValue = storage[key]
|
||||
@@ -384,7 +391,7 @@ open class IncrementalJvmCache(
|
||||
}
|
||||
|
||||
fun check(
|
||||
className: JvmClassName, classProto: ProtoBuf.Class, stringTable: JvmStringTable, changesCollector: ChangesCollector
|
||||
className: JvmClassName, classProto: ProtoBuf.Class, stringTable: JvmStringTable, changesCollector: ChangesCollector,
|
||||
) {
|
||||
val key = className.internalName
|
||||
val oldProtoData = storage[key]?.toProtoData(className.packageFqName)
|
||||
|
||||
Reference in New Issue
Block a user