Remove old IC: remove IncrementalCompilation.isExperimental
This commit is contained in:
@@ -112,7 +112,7 @@ fun experimentalCacheVersion(dataRoot: File): CacheVersion =
|
||||
whenVersionChanged = CacheVersion.Action.REBUILD_CHUNK,
|
||||
whenTurnedOn = CacheVersion.Action.REBUILD_CHUNK,
|
||||
whenTurnedOff = CacheVersion.Action.CLEAN_EXPERIMENTAL_CACHES,
|
||||
isEnabled = { IncrementalCompilation.isExperimental() })
|
||||
isEnabled = { IncrementalCompilation.isEnabled() })
|
||||
|
||||
fun dataContainerCacheVersion(dataRoot: File): CacheVersion =
|
||||
CacheVersion(ownVersion = DATA_CONTAINER_VERSION,
|
||||
@@ -120,4 +120,4 @@ fun dataContainerCacheVersion(dataRoot: File): CacheVersion =
|
||||
whenVersionChanged = CacheVersion.Action.REBUILD_ALL_KOTLIN,
|
||||
whenTurnedOn = CacheVersion.Action.REBUILD_ALL_KOTLIN,
|
||||
whenTurnedOff = CacheVersion.Action.CLEAN_DATA_CONTAINER,
|
||||
isEnabled = { IncrementalCompilation.isExperimental() })
|
||||
isEnabled = { IncrementalCompilation.isEnabled() })
|
||||
|
||||
@@ -165,7 +165,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
sourceToClassesMap.add(it, className)
|
||||
}
|
||||
|
||||
if (IncrementalCompilation.isExperimental()) {
|
||||
if (IncrementalCompilation.isEnabled()) {
|
||||
internalNameToSource[className.internalName] = sourceFiles
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
.toList()
|
||||
|
||||
val changes =
|
||||
if (IncrementalCompilation.isExperimental())
|
||||
if (IncrementalCompilation.isEnabled())
|
||||
dirtyClasses.flatMap { computeChanges(it, ::Removed) }.asSequence()
|
||||
else
|
||||
emptySequence<ChangeInfo>()
|
||||
@@ -416,7 +416,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
|
||||
if (oldData == null) {
|
||||
val changes =
|
||||
if (IncrementalCompilation.isExperimental())
|
||||
if (IncrementalCompilation.isEnabled())
|
||||
computeChanges(className, ::MembersChanged).asSequence()
|
||||
else
|
||||
emptySequence<ChangeInfo>()
|
||||
@@ -492,7 +492,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
}
|
||||
|
||||
val changes =
|
||||
if (!IncrementalCompilation.isExperimental() ||
|
||||
if (!IncrementalCompilation.isEnabled() ||
|
||||
constantsMap == null || constantsMap.isEmpty() ||
|
||||
oldMap == null || oldMap.isEmpty()
|
||||
) {
|
||||
@@ -617,7 +617,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
}
|
||||
|
||||
private fun addToClassStorage(kotlinClass: LocalFileKotlinClass, srcFile: File) {
|
||||
if (!IncrementalCompilation.isExperimental()) return
|
||||
if (!IncrementalCompilation.isEnabled()) return
|
||||
|
||||
val classData = JvmProtoBufUtil.readClassDataFrom(kotlinClass.classHeader.data!!, kotlinClass.classHeader.strings!!)
|
||||
val supertypes = classData.classProto.supertypes(TypeTable(classData.classProto.typeTable))
|
||||
@@ -636,7 +636,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
}
|
||||
|
||||
private fun removeAllFromClassStorage(removedClasses: Collection<JvmClassName>) {
|
||||
if (!IncrementalCompilation.isExperimental() || removedClasses.isEmpty()) return
|
||||
if (!IncrementalCompilation.isEnabled() || removedClasses.isEmpty()) return
|
||||
|
||||
val removedFqNames = removedClasses.map { it.fqNameForClassNameWithoutDollars }.toSet()
|
||||
|
||||
@@ -738,7 +738,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
}
|
||||
|
||||
val changes =
|
||||
if (IncrementalCompilation.isExperimental()) {
|
||||
if (IncrementalCompilation.isEnabled()) {
|
||||
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
|
||||
// TODO get name in better way instead of using substringBefore
|
||||
(added.asSequence() + changed.asSequence()).map { ChangeInfo.MembersChanged(fqName, listOf(it.substringBefore("("))) }
|
||||
|
||||
@@ -79,7 +79,7 @@ fun makeCompileServices(
|
||||
}
|
||||
|
||||
fun makeLookupTracker(parentLookupTracker: LookupTracker = LookupTracker.DO_NOTHING): LookupTracker =
|
||||
if (IncrementalCompilation.isExperimental()) LookupTrackerImpl(parentLookupTracker)
|
||||
if (IncrementalCompilation.isEnabled()) LookupTrackerImpl(parentLookupTracker)
|
||||
else parentLookupTracker
|
||||
|
||||
fun<Target> makeIncrementalCachesMap(
|
||||
|
||||
Reference in New Issue
Block a user