[IC] Refactoring - Remove obsolete forceExhaustiveWhen util

This commit is contained in:
Evgenii Mazhukin
2023-09-14 19:11:56 +02:00
committed by Space Team
parent 85c2226335
commit 30e49c0879
@@ -239,11 +239,11 @@ open class IncrementalJvmCompilerRunner(
reporter.info { "Could not get classpath changes: ${changedAndImpactedSymbols.reason}" }
return CompilationMode.Rebuild(changedAndImpactedSymbols.reason)
}
is ChangesEither.Known -> Unit
}.forceExhaustiveWhen()
dirtyFiles.addByDirtySymbols(changedAndImpactedSymbols.lookupSymbols)
dirtyFiles.addByDirtyClasses(changedAndImpactedSymbols.fqNames)
is ChangesEither.Known -> {
dirtyFiles.addByDirtySymbols(changedAndImpactedSymbols.lookupSymbols)
dirtyFiles.addByDirtyClasses(changedAndImpactedSymbols.fqNames)
}
}
reporter.measure(GradleBuildTime.IC_ANALYZE_CHANGES_IN_JAVA_SOURCES) {
if (!usePreciseJavaTracking) {
@@ -295,13 +295,6 @@ open class IncrementalJvmCompilerRunner(
)
}
/**
* Helper function to force exhaustive when for statements (see https://youtrack.jetbrains.com/issue/KT-47709).
*
* If the current IDE/Kotlin compiler already supports exhaustive when for statements, consider removing this function and its usages.
*/
private fun Any.forceExhaustiveWhen() = this
private fun processChangedJava(changedFiles: ChangedFiles.Known, caches: IncrementalJvmCachesManager): BuildAttribute? {
val javaFiles = (changedFiles.modified + changedFiles.removed).filter(File::isJavaFile)