Rename: IncReporter->ICReporter

This commit is contained in:
Alexey Tsvetkov
2016-11-24 15:48:42 +03:00
parent 4fdca24db4
commit fdd3bc31f1
8 changed files with 15 additions and 15 deletions
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.cli.common.ExitCode
import java.io.File
abstract class IncReporter {
abstract class ICReporter {
abstract fun report(message: ()->String)
// used in Gradle plugin
@@ -182,7 +182,7 @@ data class DirtyData(
fun <Target> CompilationResult.getDirtyData(
caches: Iterable<IncrementalCacheImpl<Target>>,
reporter: IncReporter
reporter: ICReporter
): DirtyData {
val dirtyLookupSymbols = HashSet<LookupSymbol>()
val dirtyClassesFqNames = HashSet<FqName>()
@@ -220,7 +220,7 @@ fun <Target> CompilationResult.getDirtyData(
fun mapLookupSymbolsToFiles(
lookupStorage: LookupStorage,
lookupSymbols: Iterable<LookupSymbol>,
reporter: IncReporter,
reporter: ICReporter,
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
@@ -237,7 +237,7 @@ fun mapLookupSymbolsToFiles(
fun <Target> mapClassesFqNamesToFiles(
caches: Iterable<IncrementalCacheImpl<Target>>,
classesFqNames: Iterable<FqName>,
reporter: IncReporter,
reporter: ICReporter,
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
@@ -784,7 +784,7 @@ private fun CompilationResult.doProcessChanges(
}
}
private class JpsIncReporter : IncReporter() {
private class JpsICReporter : ICReporter() {
override fun report(message: ()->String) {
if (KotlinBuilder.LOG.isDebugEnabled) {
KotlinBuilder.LOG.debug(message())
@@ -800,7 +800,7 @@ private fun CompilationResult.doProcessChangesUsingLookups(
) {
val lookupStorage = dataManager.getStorage(KotlinDataContainerTarget, JpsLookupStorageProvider)
val allCaches = caches.flatMap { it.thisWithDependentCaches }
val reporter = JpsIncReporter()
val reporter = JpsICReporter()
reporter.report { "Start processing changes" }
@@ -217,7 +217,7 @@ open class KotlinCompile : AbstractKotlinCompile<K2JVMCompilerArguments>(), Kotl
}
logger.warn(USING_EXPERIMENTAL_INCREMENTAL_MESSAGE)
val reporter = GradleIncReporter(project.rootProject.projectDir)
val reporter = GradleICReporter(project.rootProject.projectDir)
val compiler = IncrementalJvmCompilerRunner(
taskBuildDirectory,
sourceRoots.javaSourceRoots,
@@ -20,8 +20,8 @@ import org.gradle.api.logging.Logging
import org.jetbrains.kotlin.gradle.plugin.kotlinDebug
import java.io.File
internal class GradleIncReporter(private val projectRootFile: File) : IncReporter() {
private val log = Logging.getLogger(GradleIncReporter::class.java)
internal class GradleICReporter(private val projectRootFile: File) : ICReporter() {
private val log = Logging.getLogger(GradleICReporter::class.java)
override fun report(message: ()->String) {
log.kotlinDebug(message)
@@ -48,7 +48,7 @@ internal fun makeIncrementally(
sourceRoots: Iterable<File>,
args: K2JVMCompilerArguments,
messageCollector: MessageCollector = MessageCollector.NONE,
reporter: IncReporter = EmptyIncReporter
reporter: ICReporter = EmptyICReporter
) {
val versions = listOf(normalCacheVersion(cachesDir),
experimentalCacheVersion(cachesDir),
@@ -70,7 +70,7 @@ internal fun makeIncrementally(
}
}
private object EmptyIncReporter : IncReporter() {
private object EmptyICReporter : ICReporter() {
override fun report(message: ()->String) {
}
}
@@ -94,7 +94,7 @@ internal class IncrementalJvmCompilerRunner(
workingDir: File,
private val javaSourceRoots: Set<File>,
private val cacheVersions: List<CacheVersion>,
private val reporter: IncReporter,
private val reporter: ICReporter,
private var kaptAnnotationsFileUpdater: AnnotationFileUpdater? = null,
private val artifactDifferenceRegistryProvider: ArtifactDifferenceRegistryProvider? = null,
private val artifactFile: File? = null
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.incremental.multiproject
import org.jetbrains.kotlin.incremental.DirtyData
import org.jetbrains.kotlin.incremental.IncReporter
import org.jetbrains.kotlin.incremental.ICReporter
import java.io.File
internal interface ArtifactDifferenceRegistry {
@@ -36,7 +36,7 @@ internal interface ArtifactDifferenceRegistryProvider {
): T?
fun <T> withRegistry(
reporter: IncReporter,
reporter: ICReporter,
fn: (ArtifactDifferenceRegistry) -> T
): T? {
return withRegistry({reporter.report {it}}, fn)
@@ -125,7 +125,7 @@ class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() {
val compiledSources = arrayListOf<File>()
var resultExitCode = ExitCode.OK
val reporter = object : IncReporter() {
val reporter = object : ICReporter() {
override fun report(message: ()->String) {
}