Add Artifact Transform stat into ES
This commit is contained in:
@@ -52,7 +52,7 @@ object LookupSymbolKeyDescriptor : KeyDescriptor<LookupSymbolKey> {
|
||||
}
|
||||
}
|
||||
|
||||
private val storeFullFqName = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS.value.toBooleanLenient() ?: false
|
||||
private val storeFullFqName = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.value.toBooleanLenient() ?: false
|
||||
|
||||
override fun save(output: DataOutput, value: LookupSymbolKey) {
|
||||
if (storeFullFqName) {
|
||||
|
||||
@@ -35,7 +35,8 @@ enum class CompilerSystemProperties(val property: String, val alwaysDirectAccess
|
||||
DAEMON_RMI_SOCKET_CONNECT_INTERVAL_PROPERTY("kotlin.daemon.socket.connect.interval"),
|
||||
KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY("kotlin.environment.keepalive"),
|
||||
COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS("kotlin.daemon.custom.run.files.path.for.tests"),
|
||||
COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS("kotlin.incremental.classpath.snapshot.enabled"),
|
||||
COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS("kotlin.incremental.classpath.snapshot.enabled"),
|
||||
COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM("kotlin.incremental.useClasspathSnapshot"),
|
||||
KOTLIN_COLORS_ENABLED_PROPERTY("kotlin.colors.enabled"),
|
||||
|
||||
KOTLIN_STAT_ENABLED_PROPERTY("kotlin.plugin.stat.enabled"),
|
||||
|
||||
+1
-1
@@ -313,7 +313,7 @@ fun configureDaemonJVMOptions(opts: DaemonJVMOptions,
|
||||
CompilerSystemProperties.COMPILE_DAEMON_LOG_PATH_PROPERTY.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.COMPILE_DAEMON_LOG_PATH_PROPERTY.property}=\"$it\"") }
|
||||
CompilerSystemProperties.KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY.property}") }
|
||||
//Temporary solution to test abi snapshot
|
||||
CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS.property}") }
|
||||
CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.property}") }
|
||||
}
|
||||
|
||||
if (opts.jvmParams.none { it.matches(jvmAssertArgsRegex) }) {
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ abstract class IncrementalCompilerRunner<
|
||||
protected open val kotlinSourceFilesExtensions: List<String> = DEFAULT_KOTLIN_SOURCE_FILES_EXTENSIONS
|
||||
|
||||
//TODO(valtman) temporal measure to ensure quick disable, should be deleted after successful release
|
||||
protected val withSnapshot: Boolean = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS.value.toBooleanLenient() ?: false
|
||||
protected val withSnapshot: Boolean = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.value.toBooleanLenient() ?: false
|
||||
|
||||
protected abstract fun isICEnabled(): Boolean
|
||||
protected abstract fun createCacheManager(args: Args, projectDir: File?): CacheManager
|
||||
|
||||
+6
-2
@@ -7,7 +7,8 @@ package org.jetbrains.kotlin.compilerRunner
|
||||
|
||||
import org.gradle.api.logging.Logger
|
||||
import org.jetbrains.kotlin.build.report.metrics.*
|
||||
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS
|
||||
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties
|
||||
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||
import org.jetbrains.kotlin.cli.common.toBooleanLenient
|
||||
@@ -139,9 +140,12 @@ internal class GradleKotlinCompilerWork @Inject constructor(
|
||||
throwGradleExceptionIfError(exitCode)
|
||||
} finally {
|
||||
val properties = ArrayList<TaskExecutionProperties>()
|
||||
COMPILE_INCREMENTAL_WITH_CLASSPATH_SHAPSHOTS.value.toBooleanLenient()?.let {
|
||||
COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.value.toBooleanLenient()?.let {
|
||||
if (it) properties.add(ABI_SNAPSHOT)
|
||||
}
|
||||
CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM.value.toBooleanLenient()?.let {
|
||||
if (it) properties.add(TaskExecutionProperties.ARTIFACT_TRANSFORM)
|
||||
}
|
||||
|
||||
val taskInfo = TaskExecutionInfo(
|
||||
changedFiles = incrementalCompilationEnvironment?.changedFiles,
|
||||
|
||||
+4
-2
@@ -6,6 +6,8 @@
|
||||
package org.jetbrains.kotlin.gradle.plugin
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties
|
||||
import org.jetbrains.kotlin.cli.common.toBooleanLenient
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
import org.jetbrains.kotlin.gradle.dsl.NativeCacheKind
|
||||
import org.jetbrains.kotlin.gradle.internal.testing.TCServiceMessageOutputStreamHandler.Companion.IGNORE_TCSM_OVERFLOW
|
||||
@@ -112,8 +114,8 @@ internal class PropertiesProvider private constructor(private val project: Proje
|
||||
// The feature should be controlled by a Gradle property.
|
||||
// Currently, we also allow it to be controlled by a system property to make it easier to test the feature during development.
|
||||
// TODO: Remove the system property later.
|
||||
val gradleProperty = booleanProperty("kotlin.incremental.useClasspathSnapshot") ?: false
|
||||
val systemProperty = project.getSystemProperty("kotlin.incremental.useClasspathSnapshot")?.toBoolean() ?: false
|
||||
val gradleProperty = booleanProperty(CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM.property) ?: false
|
||||
val systemProperty = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM.value.toBooleanLenient() ?: false
|
||||
return gradleProperty || systemProperty
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ internal class TaskExecutionInfo(
|
||||
)
|
||||
|
||||
internal enum class TaskExecutionProperties {
|
||||
ABI_SNAPSHOT
|
||||
ABI_SNAPSHOT,
|
||||
ARTIFACT_TRANSFORM
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user