From ee8dc049b58a4605d4048a7b3b25c2b9caf7c9eb Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Tue, 17 Sep 2024 15:38:17 +0000 Subject: [PATCH] [Wasm] No reporting for JS klib incremental ^KT-71536 fixed --- .../kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api | 2 +- .../kotlin/gradle/plugin/statistics/FusMetrics.kt | 5 ----- .../org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt | 7 ------- .../jetbrains/kotlin/statistics/metrics/BooleanMetrics.kt | 3 +-- .../kotlin/statistics/ModuleChangesCatchingTest.kt | 2 +- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api index 4bd4542330ec7..26bdee3051b67 100644 --- a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api +++ b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api @@ -6701,7 +6701,7 @@ public abstract class org/jetbrains/kotlin/gradle/tasks/GradleCompileTaskProvide public final fun getSessionsDir ()Lorg/gradle/api/provider/Provider; } -public abstract class org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile : org/jetbrains/kotlin/gradle/tasks/AbstractKotlinCompile, org/jetbrains/kotlin/gradle/dsl/KotlinJsCompile, org/jetbrains/kotlin/gradle/internal/tasks/ProducesKlib, org/jetbrains/kotlin/gradle/plugin/statistics/UsesBuildFusService, org/jetbrains/kotlin/gradle/targets/js/internal/UsesLibraryFilterCachingService, org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask { +public abstract class org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile : org/jetbrains/kotlin/gradle/tasks/AbstractKotlinCompile, org/jetbrains/kotlin/gradle/dsl/KotlinJsCompile, org/jetbrains/kotlin/gradle/internal/tasks/ProducesKlib, org/jetbrains/kotlin/gradle/targets/js/internal/UsesLibraryFilterCachingService, org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask { public fun (Lorg/jetbrains/kotlin/gradle/dsl/KotlinJsCompilerOptions;Lorg/gradle/api/model/ObjectFactory;Lorg/gradle/workers/WorkerExecutor;)V public synthetic fun callCompilerAsync$kotlin_gradle_plugin_common (Lorg/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments;Lorg/gradle/work/InputChanges;Lorg/jetbrains/kotlin/gradle/tasks/TaskOutputsBackup;)V public fun compilerOptions (Lkotlin/jvm/functions/Function1;)V diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/statistics/FusMetrics.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/statistics/FusMetrics.kt index a81324517513c..5e896cb80d7f0 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/statistics/FusMetrics.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/statistics/FusMetrics.kt @@ -206,11 +206,6 @@ internal object CompileKotlinTaskMetrics : FusMetrics { metricsContainer.report(BooleanMetrics.COMPILATION_STARTED, true) } } -internal object CompileKotlinJsTaskMetrics : FusMetrics { - internal fun collectMetrics(incrementalCompilation: Boolean, metricsContainer: StatisticsValuesConsumer) { - metricsContainer.report(BooleanMetrics.JS_KLIB_INCREMENTAL, incrementalCompilation) - } -} internal object CompileKotlinJsIrLinkMetrics : FusMetrics { internal fun collectMetrics( diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt index 21f5912d2aabe..3f59167333518 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt @@ -34,8 +34,6 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.Contri import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.create import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion -import org.jetbrains.kotlin.gradle.plugin.statistics.CompileKotlinJsTaskMetrics -import org.jetbrains.kotlin.gradle.plugin.statistics.UsesBuildFusService import org.jetbrains.kotlin.gradle.report.BuildReportMode import org.jetbrains.kotlin.gradle.targets.js.internal.LibraryFilterCachingService import org.jetbrains.kotlin.gradle.targets.js.internal.UsesLibraryFilterCachingService @@ -57,7 +55,6 @@ abstract class Kotlin2JsCompile @Inject constructor( workerExecutor: WorkerExecutor, ) : AbstractKotlinCompile(objectFactory, workerExecutor), UsesLibraryFilterCachingService, - UsesBuildFusService, KotlinJsCompile, K2MultiplatformCompilationTask, ProducesKlib { @@ -341,10 +338,6 @@ abstract class Kotlin2JsCompile @Inject constructor( ) } else null - buildFusService.orNull?.reportFusMetrics { - CompileKotlinJsTaskMetrics.collectMetrics(icEnv != null, it) - } - val environment = GradleCompilerEnvironment( defaultCompilerClasspath, gradleMessageCollector, outputItemCollector, outputFiles = allOutputFiles(), diff --git a/libraries/tools/kotlin-gradle-statistics/src/main/kotlin/org/jetbrains/kotlin/statistics/metrics/BooleanMetrics.kt b/libraries/tools/kotlin-gradle-statistics/src/main/kotlin/org/jetbrains/kotlin/statistics/metrics/BooleanMetrics.kt index abe3e827be902..15d21c8d7aaa2 100644 --- a/libraries/tools/kotlin-gradle-statistics/src/main/kotlin/org/jetbrains/kotlin/statistics/metrics/BooleanMetrics.kt +++ b/libraries/tools/kotlin-gradle-statistics/src/main/kotlin/org/jetbrains/kotlin/statistics/metrics/BooleanMetrics.kt @@ -52,7 +52,6 @@ enum class BooleanMetrics(val type: BooleanOverridePolicy, val anonymization: Bo JS_SOURCE_MAP(OR, SAFE), - JS_KLIB_INCREMENTAL(OR, SAFE), JS_IR_INCREMENTAL(OR, SAFE), //Build reports @@ -89,6 +88,6 @@ enum class BooleanMetrics(val type: BooleanOverridePolicy, val anonymization: Bo COCOAPODS_PLUGIN_ENABLED(OR, SAFE); companion object { - const val VERSION = 8 + const val VERSION = 9 } } diff --git a/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/org/jetbrains/kotlin/statistics/ModuleChangesCatchingTest.kt b/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/org/jetbrains/kotlin/statistics/ModuleChangesCatchingTest.kt index 3453dcba48fba..2b430b1d47fd6 100644 --- a/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/org/jetbrains/kotlin/statistics/ModuleChangesCatchingTest.kt +++ b/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/org/jetbrains/kotlin/statistics/ModuleChangesCatchingTest.kt @@ -23,7 +23,7 @@ private const val STRING_METRICS_RELATIVE_PATH = "$SOURCE_CODE_RELATIVE_PATH/Str private const val NUMERICAL_METRICS_RELATIVE_PATH = "$SOURCE_CODE_RELATIVE_PATH/NumericalMetrics.kt" private val STRING_METRICS_EXPECTED_VERSION_AND_HASH = Pair(2, "636529439256b809cd4fb99e20310505") -private val BOOLEAN_METRICS_EXPECTED_VERSION_AND_HASH = Pair(8, "d37c7db617f29778207e3ad6908b68b9") +private val BOOLEAN_METRICS_EXPECTED_VERSION_AND_HASH = Pair(9, "703773d386f9374794f40484e1e6f3b1") private val NUMERICAL_METRICS_EXPECTED_VERSION_AND_HASH = Pair(2, "d8c1a1f4fb7227fbe8247320bf3370ca") private val SOURCE_FOLDER_EXPECTED_VERSION_AND_HASH = Pair(