Log incremental options before passing them to kotlin daemon
This commit is contained in:
+25
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.daemon.common
|
|||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
open class CompilationOptions(
|
open class CompilationOptions(
|
||||||
val compilerMode: CompilerMode,
|
val compilerMode: CompilerMode,
|
||||||
@@ -32,6 +33,16 @@ open class CompilationOptions(
|
|||||||
companion object {
|
companion object {
|
||||||
const val serialVersionUID: Long = 0
|
const val serialVersionUID: Long = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "CompilationOptions(" +
|
||||||
|
"compilerMode=$compilerMode, " +
|
||||||
|
"targetPlatform=$targetPlatform, " +
|
||||||
|
"reportCategories=${Arrays.toString(reportCategories)}, " +
|
||||||
|
"reportSeverity=$reportSeverity, " +
|
||||||
|
"requestedCompilationResults=${Arrays.toString(requestedCompilationResults)}" +
|
||||||
|
")"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class IncrementalCompilationOptions(
|
class IncrementalCompilationOptions(
|
||||||
@@ -55,6 +66,20 @@ class IncrementalCompilationOptions(
|
|||||||
companion object {
|
companion object {
|
||||||
const val serialVersionUID: Long = 0
|
const val serialVersionUID: Long = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "IncrementalCompilationOptions(" +
|
||||||
|
"super=${super.toString()}, " +
|
||||||
|
"areFileChangesKnown=$areFileChangesKnown, " +
|
||||||
|
"modifiedFiles=$modifiedFiles, " +
|
||||||
|
"deletedFiles=$deletedFiles, " +
|
||||||
|
"workingDir=$workingDir, " +
|
||||||
|
"customCacheVersionFileName='$customCacheVersionFileName', " +
|
||||||
|
"customCacheVersion=$customCacheVersion, " +
|
||||||
|
"resultDifferenceFile=$resultDifferenceFile, " +
|
||||||
|
"friendDifferenceFile=$friendDifferenceFile" +
|
||||||
|
")"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class CompilerMode : Serializable {
|
enum class CompilerMode : Serializable {
|
||||||
|
|||||||
+2
@@ -259,6 +259,8 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
|||||||
resultDifferenceFile = environment.buildHistoryFile,
|
resultDifferenceFile = environment.buildHistoryFile,
|
||||||
friendDifferenceFile = environment.friendBuildHistoryFile
|
friendDifferenceFile = environment.friendBuildHistoryFile
|
||||||
)
|
)
|
||||||
|
|
||||||
|
log.info("Options for KOTLIN DAEMON: $compilationOptions")
|
||||||
val servicesFacade = GradleIncrementalCompilerServicesFacadeImpl(project, environment)
|
val servicesFacade = GradleIncrementalCompilerServicesFacadeImpl(project, environment)
|
||||||
val argsArray = ArgumentUtils.convertArgumentsToStringList(environment.compilerArgs).toTypedArray()
|
val argsArray = ArgumentUtils.convertArgumentsToStringList(environment.compilerArgs).toTypedArray()
|
||||||
return daemon.compile(sessionId, argsArray, compilationOptions, servicesFacade, GradleCompilationResults(project))
|
return daemon.compile(sessionId, argsArray, compilationOptions, servicesFacade, GradleCompilationResults(project))
|
||||||
|
|||||||
Reference in New Issue
Block a user