KT-45777: Replace EmptyICReporter with DoNothingICReporter
to be more consistent (every *Reporter has a DoNothing*Reporter). ^KT-45777 In Progress
This commit is contained in:
+2
-1
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.incremental
|
||||
|
||||
import org.jetbrains.kotlin.build.GeneratedFile
|
||||
import org.jetbrains.kotlin.build.report.BuildReporter
|
||||
import org.jetbrains.kotlin.build.report.DoNothingICReporter
|
||||
import org.jetbrains.kotlin.build.report.ICReporter
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildAttribute
|
||||
import org.jetbrains.kotlin.build.report.metrics.DoNothingBuildMetricsReporter
|
||||
@@ -44,7 +45,7 @@ fun makeJsIncrementally(
|
||||
args: K2JSCompilerArguments,
|
||||
buildHistoryFile: File,
|
||||
messageCollector: MessageCollector = MessageCollector.NONE,
|
||||
reporter: ICReporter = EmptyICReporter,
|
||||
reporter: ICReporter = DoNothingICReporter,
|
||||
scopeExpansion: CompileScopeExpansionMode = CompileScopeExpansionMode.NEVER,
|
||||
modulesApiHistory: ModulesApiHistory = EmptyModulesApiHistory,
|
||||
providedChangedFiles: ChangedFiles? = null
|
||||
|
||||
+2
-11
@@ -27,8 +27,8 @@ import org.jetbrains.kotlin.build.DEFAULT_KOTLIN_SOURCE_FILES_EXTENSIONS
|
||||
import org.jetbrains.kotlin.build.GeneratedFile
|
||||
import org.jetbrains.kotlin.build.GeneratedJvmClass
|
||||
import org.jetbrains.kotlin.build.report.BuildReporter
|
||||
import org.jetbrains.kotlin.build.report.DoNothingICReporter
|
||||
import org.jetbrains.kotlin.build.report.ICReporter
|
||||
import org.jetbrains.kotlin.build.report.ICReporterBase
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildAttribute
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildTime
|
||||
import org.jetbrains.kotlin.build.report.metrics.DoNothingBuildMetricsReporter
|
||||
@@ -77,7 +77,7 @@ fun makeIncrementally(
|
||||
sourceRoots: Iterable<File>,
|
||||
args: K2JVMCompilerArguments,
|
||||
messageCollector: MessageCollector = MessageCollector.NONE,
|
||||
reporter: ICReporter = EmptyICReporter
|
||||
reporter: ICReporter = DoNothingICReporter
|
||||
) {
|
||||
val kotlinExtensions = DEFAULT_KOTLIN_SOURCE_FILES_EXTENSIONS
|
||||
val allExtensions = kotlinExtensions + "java"
|
||||
@@ -104,15 +104,6 @@ fun makeIncrementally(
|
||||
}
|
||||
}
|
||||
|
||||
object EmptyICReporter : ICReporterBase() {
|
||||
override fun report(message: () -> String) {}
|
||||
override fun reportVerbose(message: () -> String) {}
|
||||
override fun reportCompileIteration(incremental: Boolean, sourceFiles: Collection<File>, exitCode: ExitCode) {}
|
||||
override fun reportMarkDirtyClass(affectedFiles: Iterable<File>, classFqName: String) {}
|
||||
override fun reportMarkDirtyMember(affectedFiles: Iterable<File>, scope: String, name: String) {}
|
||||
override fun reportMarkDirty(affectedFiles: Iterable<File>, reason: String) {}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
inline fun <R> withIC(args: CommonCompilerArguments, enabled: Boolean = true, fn: () -> R): R {
|
||||
val isEnabledBackup = IncrementalCompilation.isEnabledForJvm()
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.incremental.classpathDiff
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.kotlin.build.report.DoNothingICReporter
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildMetricsReporter
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildTime
|
||||
import org.jetbrains.kotlin.build.report.metrics.measure
|
||||
@@ -238,7 +239,7 @@ object ClasspathChangesComputer {
|
||||
incrementalJvmCache.clearCacheForRemovedClasses(changesCollector)
|
||||
|
||||
// Normalize the changes and clean up
|
||||
val dirtyData = changesCollector.getDirtyData(listOf(incrementalJvmCache), EmptyICReporter)
|
||||
val dirtyData = changesCollector.getDirtyData(listOf(incrementalJvmCache), DoNothingICReporter)
|
||||
workingDir.deleteRecursively()
|
||||
|
||||
return dirtyData.toProgramSymbols(currentClassSnapshots, previousClassSnapshots)
|
||||
|
||||
Reference in New Issue
Block a user