Remove old IC: remove IncrementalCompilation.isExperimental
Original commit: 2bd7d12312
This commit is contained in:
+2
-6
@@ -71,8 +71,6 @@ abstract class AbstractIncrementalJpsTest(
|
|||||||
private val DEBUG_LOGGING_ENABLED = System.getProperty("debug.logging.enabled") == "true"
|
private val DEBUG_LOGGING_ENABLED = System.getProperty("debug.logging.enabled") == "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open val enableExperimentalIncrementalCompilation = false
|
|
||||||
|
|
||||||
protected lateinit var testDataDir: File
|
protected lateinit var testDataDir: File
|
||||||
protected lateinit var workDir: File
|
protected lateinit var workDir: File
|
||||||
protected lateinit var projectDescriptor: ProjectDescriptor
|
protected lateinit var projectDescriptor: ProjectDescriptor
|
||||||
@@ -81,7 +79,7 @@ abstract class AbstractIncrementalJpsTest(
|
|||||||
protected var mapWorkingToOriginalFile: MutableMap<File, File> = hashMapOf()
|
protected var mapWorkingToOriginalFile: MutableMap<File, File> = hashMapOf()
|
||||||
|
|
||||||
protected open val buildLogFinder: BuildLogFinder
|
protected open val buildLogFinder: BuildLogFinder
|
||||||
get() = BuildLogFinder(isExperimentalEnabled = enableExperimentalIncrementalCompilation)
|
get() = BuildLogFinder(isExperimentalEnabled = true)
|
||||||
|
|
||||||
private fun enableDebugLogging() {
|
private fun enableDebugLogging() {
|
||||||
com.intellij.openapi.diagnostic.Logger.setFactory(TestLoggerFactory::class.java)
|
com.intellij.openapi.diagnostic.Logger.setFactory(TestLoggerFactory::class.java)
|
||||||
@@ -112,7 +110,7 @@ abstract class AbstractIncrementalJpsTest(
|
|||||||
override fun setUp() {
|
override fun setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
lookupsDuringTest = hashSetOf()
|
lookupsDuringTest = hashSetOf()
|
||||||
IncrementalCompilation.setIsExperimental(enableExperimentalIncrementalCompilation)
|
IncrementalCompilation.setIsEnabled(true)
|
||||||
|
|
||||||
if (DEBUG_LOGGING_ENABLED) {
|
if (DEBUG_LOGGING_ENABLED) {
|
||||||
enableDebugLogging()
|
enableDebugLogging()
|
||||||
@@ -279,8 +277,6 @@ abstract class AbstractIncrementalJpsTest(
|
|||||||
throw IllegalStateException("No build log file in $testDataDir")
|
throw IllegalStateException("No build log file in $testDataDir")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enableExperimentalIncrementalCompilation && File(testDataDir, "dont-check-caches-in-non-experimental-ic.txt").exists()) return
|
|
||||||
|
|
||||||
val lastMakeResult = otherMakeResults.last()
|
val lastMakeResult = otherMakeResults.last()
|
||||||
rebuildAndCheckOutput(lastMakeResult)
|
rebuildAndCheckOutput(lastMakeResult)
|
||||||
clearCachesRebuildAndCheckOutput(lastMakeResult)
|
clearCachesRebuildAndCheckOutput(lastMakeResult)
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ abstract class AbstractIncrementalLazyCachesTest : AbstractIncrementalJpsTest()
|
|||||||
IncrementalCompilation.setIsEnabled(modification.dataFile.readAsBool())
|
IncrementalCompilation.setIsEnabled(modification.dataFile.readAsBool())
|
||||||
}
|
}
|
||||||
name.endsWith("experimental-compilation") -> {
|
name.endsWith("experimental-compilation") -> {
|
||||||
IncrementalCompilation.setIsExperimental(modification.dataFile.readAsBool())
|
IncrementalCompilation.setIsEnabled(modification.dataFile.readAsBool())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-6
@@ -20,12 +20,9 @@ import org.jetbrains.jps.incremental.ModuleBuildTarget
|
|||||||
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
|
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
|
||||||
import org.jetbrains.kotlin.jps.incremental.CacheVersionProvider
|
import org.jetbrains.kotlin.jps.incremental.CacheVersionProvider
|
||||||
|
|
||||||
abstract class AbstractExperimentalIncrementalJpsTest : AbstractIncrementalJpsTest() {
|
abstract class AbstractExperimentalIncrementalJpsTest : AbstractIncrementalJpsTest()
|
||||||
override val enableExperimentalIncrementalCompilation = true
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class AbstractExperimentalIncrementalLazyCachesTest : AbstractIncrementalLazyCachesTest() {
|
abstract class AbstractExperimentalIncrementalLazyCachesTest : AbstractIncrementalLazyCachesTest() {
|
||||||
override val enableExperimentalIncrementalCompilation = true
|
|
||||||
|
|
||||||
override val expectedCachesFileName: String
|
override val expectedCachesFileName: String
|
||||||
get() = "experimental-expected-kotlin-caches.txt"
|
get() = "experimental-expected-kotlin-caches.txt"
|
||||||
@@ -34,8 +31,6 @@ abstract class AbstractExperimentalIncrementalLazyCachesTest : AbstractIncrement
|
|||||||
abstract class AbstractExperimentalChangeIncrementalOptionTest : AbstractIncrementalLazyCachesTest()
|
abstract class AbstractExperimentalChangeIncrementalOptionTest : AbstractIncrementalLazyCachesTest()
|
||||||
|
|
||||||
abstract class AbstractExperimentalIncrementalCacheVersionChangedTest : AbstractIncrementalCacheVersionChangedTest() {
|
abstract class AbstractExperimentalIncrementalCacheVersionChangedTest : AbstractIncrementalCacheVersionChangedTest() {
|
||||||
override val enableExperimentalIncrementalCompilation = true
|
|
||||||
|
|
||||||
override fun getVersions(cacheVersionProvider: CacheVersionProvider, targets: Iterable<ModuleBuildTarget>) =
|
override fun getVersions(cacheVersionProvider: CacheVersionProvider, targets: Iterable<ModuleBuildTarget>) =
|
||||||
targets.map { cacheVersionProvider.experimentalVersion(it) }
|
targets.map { cacheVersionProvider.experimentalVersion(it) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,5 +29,4 @@ open class IncrementalRenameModuleTest : AbstractIncrementalJpsTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ExperimentalIncrementalRenameModuleTest : IncrementalRenameModuleTest() {
|
class ExperimentalIncrementalRenameModuleTest : IncrementalRenameModuleTest() {
|
||||||
override val enableExperimentalIncrementalCompilation = true
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
override fun buildStarted(context: CompileContext) {
|
override fun buildStarted(context: CompileContext) {
|
||||||
LOG.debug("==========================================")
|
LOG.debug("==========================================")
|
||||||
LOG.info("is Kotlin incremental compilation enabled: ${IncrementalCompilation.isEnabled()}")
|
LOG.info("is Kotlin incremental compilation enabled: ${IncrementalCompilation.isEnabled()}")
|
||||||
LOG.info("is Kotlin experimental incremental compilation enabled: ${IncrementalCompilation.isExperimental()}")
|
|
||||||
LOG.info("is Kotlin compiler daemon enabled: ${isDaemonEnabled()}")
|
LOG.info("is Kotlin compiler daemon enabled: ${isDaemonEnabled()}")
|
||||||
|
|
||||||
val historyLabel = context.getBuilderParameter("history label")
|
val historyLabel = context.getBuilderParameter("history label")
|
||||||
@@ -643,8 +642,6 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
dirtyFilesHolder: DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget>,
|
dirtyFilesHolder: DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget>,
|
||||||
filesToCompile: MultiMap<ModuleBuildTarget, File>
|
filesToCompile: MultiMap<ModuleBuildTarget, File>
|
||||||
) {
|
) {
|
||||||
if (!IncrementalCompilation.isExperimental()) return
|
|
||||||
|
|
||||||
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker::class.java}")
|
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker::class.java}")
|
||||||
|
|
||||||
val lookupStorage = dataManager.getStorage(KotlinDataContainerTarget, JpsLookupStorageProvider)
|
val lookupStorage = dataManager.getStorage(KotlinDataContainerTarget, JpsLookupStorageProvider)
|
||||||
@@ -845,7 +842,7 @@ private fun CompilationResult.processChangesUsingLookups(
|
|||||||
private fun getLookupTracker(project: JpsProject): LookupTracker {
|
private fun getLookupTracker(project: JpsProject): LookupTracker {
|
||||||
val testLookupTracker = project.testingContext?.lookupTracker ?: LookupTracker.DO_NOTHING
|
val testLookupTracker = project.testingContext?.lookupTracker ?: LookupTracker.DO_NOTHING
|
||||||
|
|
||||||
if (IncrementalCompilation.isExperimental()) return LookupTrackerImpl(testLookupTracker)
|
if (IncrementalCompilation.isEnabled()) return LookupTrackerImpl(testLookupTracker)
|
||||||
|
|
||||||
return testLookupTracker
|
return testLookupTracker
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class JpsIncrementalCacheImpl(
|
|||||||
private val inlinedTo = registerMap(InlineFunctionsFilesMap(INLINED_TO.storageFile))
|
private val inlinedTo = registerMap(InlineFunctionsFilesMap(INLINED_TO.storageFile))
|
||||||
|
|
||||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||||
if (!IncrementalCompilation.isExperimental()) {
|
if (!IncrementalCompilation.isEnabled()) {
|
||||||
inlinedTo.add(fromPath, jvmSignature, toPath)
|
inlinedTo.add(fromPath, jvmSignature, toPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user