From ac2c29b6c0ad1351f63c23a91858738c38d6d51b Mon Sep 17 00:00:00 2001 From: 0xera <56160164+0xera@users.noreply.github.com> Date: Wed, 28 Aug 2024 23:51:31 +0300 Subject: [PATCH] support kotlin 2.0.20 --- .../checker/SkippabilityComponentRegistrar.kt | 9 ++++++++- .../cleaner/SourceInformationComponentRegistrar.kt | 2 +- .../plugin/compose/test/tag/applier/TestTagApplier.kt | 1 + .../test/tag/applier/TestTagApplierComponentRegistrar.kt | 2 +- .../test/tag/cleaner/TestTagCleanerComponentRegistrar.kt | 2 +- .../test/tag/drawer/TestTagDrawerComponentRegistrar.kt | 2 +- .../RecomposeHighlighterComponentRegistrar.kt | 2 +- .../logger/RecomposeLoggerComponentRegistrar.kt | 2 +- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/compiler-plugin/composable-skippability-checker/plugin/src/main/kotlin/com/vk/compiler/plugin/composable/skippability/checker/SkippabilityComponentRegistrar.kt b/compiler-plugin/composable-skippability-checker/plugin/src/main/kotlin/com/vk/compiler/plugin/composable/skippability/checker/SkippabilityComponentRegistrar.kt index 742757e..2cdc553 100644 --- a/compiler-plugin/composable-skippability-checker/plugin/src/main/kotlin/com/vk/compiler/plugin/composable/skippability/checker/SkippabilityComponentRegistrar.kt +++ b/compiler-plugin/composable-skippability-checker/plugin/src/main/kotlin/com/vk/compiler/plugin/composable/skippability/checker/SkippabilityComponentRegistrar.kt @@ -30,7 +30,14 @@ class SkippabilityComponentRegistrar : ComponentRegistrar { } project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(SkippabilityChecker(isStrongSkippingModeEnabled, isStrongSkippingFailFastEnabled, messageCollector, stableTypeMatchers), LoadingOrder.LAST) + .registerExtension( + SkippabilityChecker( + isStrongSkippingModeEnabled, + isStrongSkippingFailFastEnabled, + messageCollector, + stableTypeMatchers + ), LoadingOrder.LAST, project + ) // FirExtensionRegistrarAdapter.registerExtension(project, SkippabilityCheckerFirExtensionRegistrar()) } diff --git a/compiler-plugin/compose-source-information/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/source/information/cleaner/SourceInformationComponentRegistrar.kt b/compiler-plugin/compose-source-information/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/source/information/cleaner/SourceInformationComponentRegistrar.kt index 90d1395..6438267 100644 --- a/compiler-plugin/compose-source-information/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/source/information/cleaner/SourceInformationComponentRegistrar.kt +++ b/compiler-plugin/compose-source-information/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/source/information/cleaner/SourceInformationComponentRegistrar.kt @@ -13,7 +13,7 @@ class SourceInformationComponentRegistrar : ComponentRegistrar { override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) { if (configuration.get(SourceInformationCommandLineProcessor.ENABLED, true)) { project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(SourceInformationIrGeneration(), LoadingOrder.LAST) + .registerExtension(SourceInformationIrGeneration(), LoadingOrder.LAST, project) } } diff --git a/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplier.kt b/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplier.kt index 8cb29b3..f2b8005 100644 --- a/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplier.kt +++ b/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplier.kt @@ -430,6 +430,7 @@ internal class TestTagApplier( "$FILENAME_PLACEHOLDER-$PARENT_FUNCTION_NAME_PLACEHOLDER($PARENT_FUNCTION_OFFSET_PLACEHOLDER)-$CALLING_FUNCTION_NAME_PLACEHOLDER($CALLING_FUNCTION_OFFSET_PLACEHOLDER)" private const val MODIFIER = "androidx.compose.ui.Modifier" + private val OUTER_FUNCTION_NAME_PLACEHOLDER_REGEX = "%outer_function_name\\[range=(?.+)]\\[delimiter=(?.+)]\\[prefix=(?.+)]\\[suffix=(?.+)]%".toRegex() private const val MODIFIER_COMPANION = "${MODIFIER}.Companion" private val Composable = FqName( "androidx.compose.runtime.Composable") private val modifierObjectClassId = ClassId( diff --git a/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplierComponentRegistrar.kt b/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplierComponentRegistrar.kt index 7655b7f..88e44ef 100644 --- a/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplierComponentRegistrar.kt +++ b/compiler-plugin/compose-test-tag/applier/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/applier/TestTagApplierComponentRegistrar.kt @@ -14,7 +14,7 @@ class TestTagApplierComponentRegistrar : ComponentRegistrar { override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) { if (configuration.get(TestTagApplierCommandLineProcessor.ENABLED, true)) { project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(TestTagApplierIrGeneration(configuration.get(TestTagApplierCommandLineProcessor.TAG_TEMPLATE, DEFAULT_TAG_TEMPLATE)), LoadingOrder.FIRST) + .registerExtension(TestTagApplierIrGeneration(configuration.get(TestTagApplierCommandLineProcessor.TAG_TEMPLATE, DEFAULT_TAG_TEMPLATE)), LoadingOrder.FIRST, project) } } diff --git a/compiler-plugin/compose-test-tag/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/cleaner/TestTagCleanerComponentRegistrar.kt b/compiler-plugin/compose-test-tag/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/cleaner/TestTagCleanerComponentRegistrar.kt index 3de0260..d25c25e 100644 --- a/compiler-plugin/compose-test-tag/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/cleaner/TestTagCleanerComponentRegistrar.kt +++ b/compiler-plugin/compose-test-tag/cleaner/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/cleaner/TestTagCleanerComponentRegistrar.kt @@ -13,7 +13,7 @@ class TestTagCleanerComponentRegistrar : ComponentRegistrar { override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) { if (configuration.get(TestTagCleanerCommandLineProcessor.ENABLED, true)) { project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(TestTagCleanerIrGeneration(), LoadingOrder.FIRST) + .registerExtension(TestTagCleanerIrGeneration(), LoadingOrder.FIRST, project) } } diff --git a/compiler-plugin/compose-test-tag/drawer/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/drawer/TestTagDrawerComponentRegistrar.kt b/compiler-plugin/compose-test-tag/drawer/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/drawer/TestTagDrawerComponentRegistrar.kt index f13f875..f9fe191 100644 --- a/compiler-plugin/compose-test-tag/drawer/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/drawer/TestTagDrawerComponentRegistrar.kt +++ b/compiler-plugin/compose-test-tag/drawer/plugin/src/main/kotlin/com/vk/compiler/plugin/compose/test/tag/drawer/TestTagDrawerComponentRegistrar.kt @@ -13,7 +13,7 @@ class TestTagDrawerComponentRegistrar : ComponentRegistrar { override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) { if (configuration.get(TestTagDrawerCommandLineProcessor.ENABLED, true)) { project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(TestTagDrawerIrGeneration(), LoadingOrder.FIRST) + .registerExtension(TestTagDrawerIrGeneration(), LoadingOrder.FIRST, project) } } diff --git a/compiler-plugin/recompose/highlighter/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/highlighter/RecomposeHighlighterComponentRegistrar.kt b/compiler-plugin/recompose/highlighter/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/highlighter/RecomposeHighlighterComponentRegistrar.kt index 45a8755..be4fd20 100644 --- a/compiler-plugin/recompose/highlighter/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/highlighter/RecomposeHighlighterComponentRegistrar.kt +++ b/compiler-plugin/recompose/highlighter/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/highlighter/RecomposeHighlighterComponentRegistrar.kt @@ -13,7 +13,7 @@ class RecomposeHighlighterComponentRegistrar : ComponentRegistrar { override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) { if (configuration.get(RecomposeHighlighterCommandLineProcessor.ENABLED, true)) { project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(RecomposeHighlighterIrGeneration(), LoadingOrder.FIRST) + .registerExtension(RecomposeHighlighterIrGeneration(), LoadingOrder.FIRST, project) } } diff --git a/compiler-plugin/recompose/logger/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/logger/RecomposeLoggerComponentRegistrar.kt b/compiler-plugin/recompose/logger/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/logger/RecomposeLoggerComponentRegistrar.kt index bcbd18f..dd0c3e8 100644 --- a/compiler-plugin/recompose/logger/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/logger/RecomposeLoggerComponentRegistrar.kt +++ b/compiler-plugin/recompose/logger/plugin/src/main/kotlin/com/vk/compiler/plugin/recompose/logger/RecomposeLoggerComponentRegistrar.kt @@ -15,7 +15,7 @@ class RecomposeLoggerComponentRegistrar : ComponentRegistrar { val logModifierChanges = configuration.get(RecomposeLoggerCommandLineProcessor.LOG_MODIFIER_CHANGES, true) val logFunctionChanges = configuration.get(RecomposeLoggerCommandLineProcessor.LOG_FUNCTION_CHANGES, true) project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName) - .registerExtension(RecomposeLoggerIrGeneration(logModifierChanges, logFunctionChanges), LoadingOrder.FIRST) + .registerExtension(RecomposeLoggerIrGeneration(logModifierChanges, logFunctionChanges), LoadingOrder.FIRST, project) } }