From 7d1f2bb1b8a0effb55f3b20158a0e78e83e20322 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 21:57:09 +0200 Subject: [PATCH 01/12] Update IntelliJ to 252.18003.27 --- gradle/libs.versions.toml | 2 +- kmp-nativecoroutines-idea-plugin/build.gradle.kts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bc06e1f6..45aca27e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.2.0-RC" -kotlin-idea = "2.2.0-ij251-78" +kotlin-idea = "2.2.20-dev-4248" kotlinx-coroutines = "1.10.1" kotlinx-binary-compatibility-validator = "0.16.3" ksp = "2.2.0-RC-2.0.1" diff --git a/kmp-nativecoroutines-idea-plugin/build.gradle.kts b/kmp-nativecoroutines-idea-plugin/build.gradle.kts index a0423fb6..e172a133 100644 --- a/kmp-nativecoroutines-idea-plugin/build.gradle.kts +++ b/kmp-nativecoroutines-idea-plugin/build.gradle.kts @@ -25,7 +25,7 @@ kotlin { dependencies { intellijPlatform { - intellijIdeaCommunity("2025.1") + intellijIdeaCommunity("252.18003.27") bundledPlugins("org.jetbrains.kotlin", "com.intellij.gradle") @@ -52,8 +52,8 @@ intellijPlatform { """.trimIndent() ideaVersion { - sinceBuild = "251" - untilBuild = "251.*" + sinceBuild = "252" + untilBuild = "252.*" } vendor { @@ -110,7 +110,6 @@ val runIntelliJUltimate by intellijPlatformTesting.runIde.registering { val runAndroidStudio by intellijPlatformTesting.runIde.registering { type = IntelliJPlatformType.AndroidStudio - version = "2024.3.2.11" } tasks.withType(RunIdeTask::class) { From 8a65810c6e85cab3db1cc0d461f2497807cb00dc Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 21:59:50 +0200 Subject: [PATCH 02/12] Add KtDiagnosticsContainer supertype to diagnostic container https://github.com/JetBrains/kotlin/commit/ebf306c8ce490b5116e24058d0c433a82b907870 https://github.com/JetBrains/kotlin/commit/5311cdfeef70899b8c31bc8ca92c33b49536bd3f --- .../api/kmp-nativecoroutines-compiler.api | 3 ++- .../fir/diagnostics/FirKmpNativeCoroutinesErrors.kt | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api b/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api index 3920579d..1521f011 100644 --- a/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api +++ b/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api @@ -106,7 +106,7 @@ public final class com/rickclephas/kmp/nativecoroutines/compiler/config/Suffixes public static final fun getSUFFIX ()Lcom/rickclephas/kmp/nativecoroutines/compiler/config/ConfigOptionWithDefault; } -public final class com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors { +public final class com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors : org/jetbrains/kotlin/diagnostics/KtDiagnosticsContainer { public static final field INSTANCE Lcom/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors; public final fun getCONFLICT_COROUTINES ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; public final fun getEXPOSED_FLOW_TYPE ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; @@ -141,6 +141,7 @@ public final class com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics public final fun getREDUNDANT_PRIVATE_COROUTINES_REFINED ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; public final fun getREDUNDANT_PRIVATE_COROUTINES_REFINED_STATE ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; public final fun getREDUNDANT_PRIVATE_COROUTINES_STATE ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; + public fun getRendererFactory ()Lorg/jetbrains/kotlin/diagnostics/rendering/BaseDiagnosticRendererFactory; public final fun getUNSUPPORTED_CLASS_EXTENSION_PROPERTY ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors.kt index 79de22fa..c41d3c3d 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors.kt @@ -1,13 +1,14 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.diagnostics import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactory0 +import org.jetbrains.kotlin.diagnostics.KtDiagnosticsContainer import org.jetbrains.kotlin.diagnostics.SourceElementPositioningStrategies import org.jetbrains.kotlin.diagnostics.error0 -import org.jetbrains.kotlin.diagnostics.rendering.RootDiagnosticRendererFactory +import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory import org.jetbrains.kotlin.diagnostics.warning0 import org.jetbrains.kotlin.psi.KtElement -public object FirKmpNativeCoroutinesErrors { +public object FirKmpNativeCoroutinesErrors: KtDiagnosticsContainer() { public val CONFLICT_COROUTINES: KtDiagnosticFactory0 by error0() public val EXPOSED_FLOW_TYPE: KtDiagnosticFactory0 by warning0(SourceElementPositioningStrategies.DECLARATION_RETURN_TYPE) @@ -51,7 +52,5 @@ public object FirKmpNativeCoroutinesErrors { public val IMPLICIT_RETURN_TYPE: KtDiagnosticFactory0 by error0(SourceElementPositioningStrategies.DECLARATION_NAME) - init { - RootDiagnosticRendererFactory.registerFactory(FirDefaultErrorMessages) - } + override fun getRendererFactory(): BaseDiagnosticRendererFactory = FirDefaultErrorMessages } From f344d8f337d5236cc3e3ad7593bc043cf2c78c64 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 22:00:23 +0200 Subject: [PATCH 03/12] Delay initialization of diagnostic messages map https://github.com/JetBrains/kotlin/commit/51c5bb102e4a5eca08cf794037a33ae83500ffe7 --- .../diagnostics/FirDefaultErrorMessages.kt | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirDefaultErrorMessages.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirDefaultErrorMessages.kt index 58b101af..7fe10331 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirDefaultErrorMessages.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirDefaultErrorMessages.kt @@ -39,48 +39,48 @@ import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory @Suppress("DuplicatedCode") internal object FirDefaultErrorMessages: BaseDiagnosticRendererFactory() { - override val MAP: KtDiagnosticFactoryToRendererMap = KtDiagnosticFactoryToRendererMap("KmpNativeCoroutines").apply { - put(CONFLICT_COROUTINES, "NativeCoroutines, NativeCoroutinesRefined, NativeCoroutinesRefinedState and NativeCoroutinesState can't be combined") + override val MAP: KtDiagnosticFactoryToRendererMap by KtDiagnosticFactoryToRendererMap("KmpNativeCoroutines") { map -> + map.put(CONFLICT_COROUTINES, "NativeCoroutines, NativeCoroutinesRefined, NativeCoroutinesRefinedState and NativeCoroutinesState can't be combined") - put(EXPOSED_FLOW_TYPE, "Flow type is exposed to ObjC") - put(EXPOSED_FLOW_TYPE_ERROR, "Flow type is exposed to ObjC") - put(EXPOSED_STATE_FLOW_PROPERTY, "StateFlow property is exposed to ObjC") - put(EXPOSED_STATE_FLOW_PROPERTY_ERROR, "StateFlow property is exposed to ObjC") - put(EXPOSED_SUSPEND_FUNCTION, "suspend function is exposed to ObjC") - put(EXPOSED_SUSPEND_FUNCTION_ERROR, "suspend function is exposed to ObjC") + map.put(EXPOSED_FLOW_TYPE, "Flow type is exposed to ObjC") + map.put(EXPOSED_FLOW_TYPE_ERROR, "Flow type is exposed to ObjC") + map.put(EXPOSED_STATE_FLOW_PROPERTY, "StateFlow property is exposed to ObjC") + map.put(EXPOSED_STATE_FLOW_PROPERTY_ERROR, "StateFlow property is exposed to ObjC") + map.put(EXPOSED_SUSPEND_FUNCTION, "suspend function is exposed to ObjC") + map.put(EXPOSED_SUSPEND_FUNCTION_ERROR, "suspend function is exposed to ObjC") - put(IGNORED_COROUTINES, "NativeCoroutinesIgnore overrides NativeCoroutines") - put(IGNORED_COROUTINES_REFINED, "NativeCoroutinesIgnore overrides NativeCoroutinesRefined") - put(IGNORED_COROUTINES_REFINED_STATE, "NativeCoroutinesIgnore overrides NativeCoroutinesRefinedState") - put(IGNORED_COROUTINES_STATE, "NativeCoroutinesIgnore overrides NativeCoroutinesState") + map.put(IGNORED_COROUTINES, "NativeCoroutinesIgnore overrides NativeCoroutines") + map.put(IGNORED_COROUTINES_REFINED, "NativeCoroutinesIgnore overrides NativeCoroutinesRefined") + map.put(IGNORED_COROUTINES_REFINED_STATE, "NativeCoroutinesIgnore overrides NativeCoroutinesRefinedState") + map.put(IGNORED_COROUTINES_STATE, "NativeCoroutinesIgnore overrides NativeCoroutinesState") - put(INVALID_COROUTINES, "NativeCoroutines is only supported on suspend-functions and Flow declarations") - put(INVALID_COROUTINES_IGNORE, "NativeCoroutinesIgnore is only supported on suspend-functions and Flow declarations") - put(INVALID_COROUTINES_REFINED, "NativeCoroutinesRefined is only supported on suspend-functions and Flow declarations") - put(INVALID_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState is only supported on StateFlow properties") - put(INVALID_COROUTINES_STATE, "NativeCoroutinesState is only supported on StateFlow properties") - put(INVALID_COROUTINE_SCOPE, "NativeCoroutineScope is only supported on CoroutineScope properties") + map.put(INVALID_COROUTINES, "NativeCoroutines is only supported on suspend-functions and Flow declarations") + map.put(INVALID_COROUTINES_IGNORE, "NativeCoroutinesIgnore is only supported on suspend-functions and Flow declarations") + map.put(INVALID_COROUTINES_REFINED, "NativeCoroutinesRefined is only supported on suspend-functions and Flow declarations") + map.put(INVALID_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState is only supported on StateFlow properties") + map.put(INVALID_COROUTINES_STATE, "NativeCoroutinesState is only supported on StateFlow properties") + map.put(INVALID_COROUTINE_SCOPE, "NativeCoroutineScope is only supported on CoroutineScope properties") - put(INCOMPATIBLE_OVERRIDE_COROUTINES, "NativeCoroutines isn't applied to overridden declaration") - put(INCOMPATIBLE_OVERRIDE_COROUTINES_IGNORE, "NativeCoroutinesIgnore isn't applied to overridden declaration") - put(INCOMPATIBLE_OVERRIDE_COROUTINES_REFINED, "NativeCoroutinesRefined isn't applied to overridden declaration") - put(INCOMPATIBLE_OVERRIDE_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState isn't applied to overridden declaration") - put(INCOMPATIBLE_OVERRIDE_COROUTINES_STATE, "NativeCoroutinesState isn't applied to overridden declaration") + map.put(INCOMPATIBLE_OVERRIDE_COROUTINES, "NativeCoroutines isn't applied to overridden declaration") + map.put(INCOMPATIBLE_OVERRIDE_COROUTINES_IGNORE, "NativeCoroutinesIgnore isn't applied to overridden declaration") + map.put(INCOMPATIBLE_OVERRIDE_COROUTINES_REFINED, "NativeCoroutinesRefined isn't applied to overridden declaration") + map.put(INCOMPATIBLE_OVERRIDE_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState isn't applied to overridden declaration") + map.put(INCOMPATIBLE_OVERRIDE_COROUTINES_STATE, "NativeCoroutinesState isn't applied to overridden declaration") - put(INCOMPATIBLE_ACTUAL_COROUTINES, "NativeCoroutines isn't applied to expect declaration") - put(INCOMPATIBLE_ACTUAL_COROUTINES_IGNORE, "NativeCoroutinesIgnore isn't applied to expect declaration") - put(INCOMPATIBLE_ACTUAL_COROUTINES_REFINED, "NativeCoroutinesRefined isn't applied to expect declaration") - put(INCOMPATIBLE_ACTUAL_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState isn't applied to expect declaration") - put(INCOMPATIBLE_ACTUAL_COROUTINES_STATE, "NativeCoroutinesState isn't applied to expect declaration") + map.put(INCOMPATIBLE_ACTUAL_COROUTINES, "NativeCoroutines isn't applied to expect declaration") + map.put(INCOMPATIBLE_ACTUAL_COROUTINES_IGNORE, "NativeCoroutinesIgnore isn't applied to expect declaration") + map.put(INCOMPATIBLE_ACTUAL_COROUTINES_REFINED, "NativeCoroutinesRefined isn't applied to expect declaration") + map.put(INCOMPATIBLE_ACTUAL_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState isn't applied to expect declaration") + map.put(INCOMPATIBLE_ACTUAL_COROUTINES_STATE, "NativeCoroutinesState isn't applied to expect declaration") - put(REDUNDANT_PRIVATE_COROUTINES, "NativeCoroutines is only supported on public declarations") - put(REDUNDANT_PRIVATE_COROUTINES_IGNORE, "NativeCoroutinesIgnore is only supported on public declarations") - put(REDUNDANT_PRIVATE_COROUTINES_REFINED, "NativeCoroutinesRefined is only supported on public declarations") - put(REDUNDANT_PRIVATE_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState is only supported on public declarations") - put(REDUNDANT_PRIVATE_COROUTINES_STATE, "NativeCoroutinesState is only supported on public declarations") + map.put(REDUNDANT_PRIVATE_COROUTINES, "NativeCoroutines is only supported on public declarations") + map.put(REDUNDANT_PRIVATE_COROUTINES_IGNORE, "NativeCoroutinesIgnore is only supported on public declarations") + map.put(REDUNDANT_PRIVATE_COROUTINES_REFINED, "NativeCoroutinesRefined is only supported on public declarations") + map.put(REDUNDANT_PRIVATE_COROUTINES_REFINED_STATE, "NativeCoroutinesRefinedState is only supported on public declarations") + map.put(REDUNDANT_PRIVATE_COROUTINES_STATE, "NativeCoroutinesState is only supported on public declarations") - put(UNSUPPORTED_CLASS_EXTENSION_PROPERTY, "Class extension properties aren't supported") + map.put(UNSUPPORTED_CLASS_EXTENSION_PROPERTY, "Class extension properties aren't supported") - put(IMPLICIT_RETURN_TYPE, "Return type must be specified for NativeCoroutines declarations") + map.put(IMPLICIT_RETURN_TYPE, "Return type must be specified for NativeCoroutines declarations") } } From 8c951c617c35d5b37202e17c3aee95131f50b90a Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 22:03:34 +0200 Subject: [PATCH 04/12] Migrate RemoveAnnotationFix to ModCommand API https://github.com/JetBrains/intellij-community/commit/8c927fe2af9009d7e66d70858830f8d3e8326dfd#diff-74b10bbf4e4849f00266dbab4e9cca349b60aff3f5e7a61ac75f6eba8770f8aa --- .../idea/quickfixes/k1/RemoveAnnotationFixFactory.kt | 2 +- .../idea/quickfixes/k2/RemoveAnnotationFixFactory.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k1/RemoveAnnotationFixFactory.kt b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k1/RemoveAnnotationFixFactory.kt index 6bcfa9bb..5af8e542 100644 --- a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k1/RemoveAnnotationFixFactory.kt +++ b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k1/RemoveAnnotationFixFactory.kt @@ -26,6 +26,6 @@ internal class RemoveAnnotationFixFactory( val diagnosticFactory = diagnosticFactories.firstOrNull { it == diagnostic.factory } ?: return null val annotationEntry = diagnosticFactory.cast(diagnostic).psiElement as? KtAnnotationEntry ?: return null val annotationName = annotationEntry.shortName?.identifierOrNullIfSpecial ?: return null - return RemoveAnnotationFix("Remove @$annotationName annotation", annotationEntry) + return RemoveAnnotationFix("Remove @$annotationName annotation", annotationEntry).asIntention() } } diff --git a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k2/RemoveAnnotationFixFactory.kt b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k2/RemoveAnnotationFixFactory.kt index 2e007053..b984fab2 100644 --- a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k2/RemoveAnnotationFixFactory.kt +++ b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/quickfixes/k2/RemoveAnnotationFixFactory.kt @@ -24,6 +24,6 @@ internal class RemoveAnnotationFixFactory( if (diagnosticFactories.none { it.name == diagnostic.factoryName }) return@IntentionBased emptyList() val annotationEntry = diagnostic.psi as? KtAnnotationEntry ?: return@IntentionBased emptyList() val annotationName = annotationEntry.shortName?.identifierOrNullIfSpecial ?: return@IntentionBased emptyList() - listOf(RemoveAnnotationFix("Remove @$annotationName annotation", annotationEntry)) + listOf(RemoveAnnotationFix("Remove @$annotationName annotation", annotationEntry).asIntention()) } } From 01d94a0259351b9a995cfe1fe78fedb39e5bf120 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 22:27:31 +0200 Subject: [PATCH 05/12] Update API dump for IDEA plugin --- .../api/kmp-nativecoroutines-idea-plugin.api | 1 + 1 file changed, 1 insertion(+) diff --git a/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api b/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api index 70ec35de..347a6232 100644 --- a/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api +++ b/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api @@ -1,6 +1,7 @@ public final class com/rickclephas/kmp/nativecoroutines/idea/compiler/extensions/KmpNativeCoroutinesCompilerPluginProvider : org/jetbrains/kotlin/idea/fir/extensions/KotlinBundledFirCompilerPluginProvider { public fun ()V public fun provideBundledPluginJar (Lcom/intellij/openapi/project/Project;Ljava/nio/file/Path;)Ljava/nio/file/Path; + public fun provideBundledPluginJar (Ljava/nio/file/Path;)Ljava/nio/file/Path; } public final class com/rickclephas/kmp/nativecoroutines/idea/compiler/extensions/KmpNativeCoroutinesStorageComponentContainerContributor : org/jetbrains/kotlin/extensions/StorageComponentContainerContributor { From 2c47e2582c97763abbd0a17d1f1d0a24c8379c11 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Thu, 29 May 2025 22:31:04 +0200 Subject: [PATCH 06/12] Update GHA workflow for IDEA 2025.2 --- .github/workflows/run-idea-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-idea-tests.yaml b/.github/workflows/run-idea-tests.yaml index da1a7261..7001c7da 100644 --- a/.github/workflows/run-idea-tests.yaml +++ b/.github/workflows/run-idea-tests.yaml @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: ide: [ IC, IU, AI ] - build: [ 251 ] + build: [ 252 ] name: ${{ format('{0}-{1}', matrix.ide, matrix.build) }} runs-on: ubuntu-latest steps: From ac452d8e0fbee01f4c15b3e6dca43f2b3d7bf132 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Fri, 30 May 2025 11:01:08 +0200 Subject: [PATCH 07/12] Add IDEA version suffix --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 06e2bae2..b079ec9c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ buildscript { allprojects { group = "com.rickclephas.kmp" - version = "1.0.0-ALPHA-43-kotlin-2.2.0-RC" + version = "1.0.0-ALPHA-43-idea-2025.2-EAP-18003.27" } apiValidation { From ac52ac66300bea70ca244d7610d5b9112ce585fc Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Fri, 6 Jun 2025 17:55:19 +0200 Subject: [PATCH 08/12] Update IntelliJ to 252.19874.12 --- gradle/libs.versions.toml | 2 +- kmp-nativecoroutines-idea-plugin/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e1767a8f..4d64b9b8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.2.0-RC2" -kotlin-idea = "2.2.20-dev-4248" +kotlin-idea = "2.2.20-dev-4604" kotlinx-coroutines = "1.10.1" kotlinx-binary-compatibility-validator = "0.16.3" ksp = "2.2.0-RC2-2.0.1" diff --git a/kmp-nativecoroutines-idea-plugin/build.gradle.kts b/kmp-nativecoroutines-idea-plugin/build.gradle.kts index bca8ed88..6912e1b6 100644 --- a/kmp-nativecoroutines-idea-plugin/build.gradle.kts +++ b/kmp-nativecoroutines-idea-plugin/build.gradle.kts @@ -25,7 +25,7 @@ kotlin { dependencies { intellijPlatform { - intellijIdeaCommunity("252.18003.27") + intellijIdeaCommunity("252.19874.12") bundledPlugins("org.jetbrains.kotlin", "com.intellij.gradle") From b9a1d8e8caa406ada6b91bfac7f2466592853d4c Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Fri, 6 Jun 2025 18:00:53 +0200 Subject: [PATCH 09/12] Add IDEA version suffix --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index bf7b6ade..10ef99c1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { allprojects { group = "com.rickclephas.kmp" - version = "1.0.0-ALPHA-44-kotlin-2.2.0-RC2" + version = "1.0.0-ALPHA-44-idea-2025.2-EAP-19874.12" } apiValidation { From 09e13946ff0f137c9fe0eb6dd7d36c750d4fa11e Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Mon, 4 Aug 2025 20:04:13 +0200 Subject: [PATCH 10/12] Update IntelliJ to 2025.2 --- gradle/libs.versions.toml | 2 +- kmp-nativecoroutines-idea-plugin/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ce6858f3..a3231e7c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.2.0" -kotlin-idea = "2.2.20-dev-4604" +kotlin-idea = "2.2.20-dev-5812" kotlinx-coroutines = "1.10.1" kotlinx-binary-compatibility-validator = "0.16.3" ksp = "2.2.0-2.0.2" diff --git a/kmp-nativecoroutines-idea-plugin/build.gradle.kts b/kmp-nativecoroutines-idea-plugin/build.gradle.kts index 6912e1b6..c64aa2a3 100644 --- a/kmp-nativecoroutines-idea-plugin/build.gradle.kts +++ b/kmp-nativecoroutines-idea-plugin/build.gradle.kts @@ -25,7 +25,7 @@ kotlin { dependencies { intellijPlatform { - intellijIdeaCommunity("252.19874.12") + intellijIdeaCommunity("2025.2") bundledPlugins("org.jetbrains.kotlin", "com.intellij.gradle") From 2e1e69f23ace66a2da00301e94a3f826b084cbcd Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Wed, 16 Jul 2025 19:06:05 +0200 Subject: [PATCH 11/12] containingDeclarations now stores symbols https://github.com/JetBrains/kotlin/commit/7e3f367941aa323e5b6d2fec133a83d359d797cf https://youtrack.jetbrains.com/issue/KT-75499 (cherry picked from commit e42aecf88f5dacda339c063094f46821befe8ddb) --- .../diagnostics/FirKmpNativeCoroutinesDeclarationChecker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesDeclarationChecker.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesDeclarationChecker.kt index ff2b6c71..b370552e 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesDeclarationChecker.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesDeclarationChecker.kt @@ -58,6 +58,7 @@ import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.utils.* import org.jetbrains.kotlin.fir.expressions.FirAnnotation import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenMembersWithBaseScopeSafe +import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol import java.nio.file.Path import kotlin.io.path.Path @@ -165,7 +166,7 @@ internal class FirKmpNativeCoroutinesDeclarationChecker( //region INCOMPATIBLE_* if (isOverride) { - val containingClass = context.containingDeclarations.lastOrNull() as? FirClass + val containingClass = context.containingDeclarations.lastOrNull() as? FirClassSymbol<*> if (containingClass != null) { val firTypeScope = containingClass.unsubstitutedScope(context) val overriddenMemberSymbols = firTypeScope.getDirectOverriddenMembersWithBaseScopeSafe(declaration.symbol) From c602dca6da92a209e423a1d8cfca1dae2da669ac Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Mon, 4 Aug 2025 20:16:28 +0200 Subject: [PATCH 12/12] Add IDEA version suffix --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index fc4f258e..c38168a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { allprojects { group = "com.rickclephas.kmp" - version = "1.0.0-ALPHA-45" + version = "1.0.0-ALPHA-45-idea-2025.2" } apiValidation {