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