Summary
The compiler plugin (latest 1.0.0) is incompatible with Kotlin 2.4.0. Any compilation with the plugin applied fails during FIR extension registration.
Stacktrace
java.lang.ClassCastException: class org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrarAdapter$Companion cannot be cast to class org.jetbrains.kotlin.extensions.ProjectExtensionDescriptor
at io.github.santimattius.structured.compiler.StructuredCoroutinesCompilerPluginRegistrar.registerExtensions(StructuredCoroutinesCompilerPluginRegistrar.kt:101)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$org_jetbrains_kotlin_cli_base(KotlinCoreEnvironment.kt:758)
...
Cause
Kotlin 2.4.0 removed/changed the ProjectExtensionDescriptor-based FIR extension registration mechanism (see KT-83341). FirExtensionRegistrarAdapter.Companion no longer extends ProjectExtensionDescriptor, so the cast in registerExtensions throws.
The published structured-coroutines-compiler:1.0.0 POM still declares org.jetbrains.kotlin:kotlin-stdlib:2.3.20, confirming it builds against Kotlin 2.3.x.
Environment
- structured-coroutines:
1.0.0
- Kotlin:
2.4.0
Request
Please publish a release built against Kotlin 2.4.0 with the FIR extension registration migrated to the new API. For reference, skydoves/compose-stability-analyzer hit the identical issue and fixed it in its 0.9.0 release.
Summary
The compiler plugin (latest
1.0.0) is incompatible with Kotlin 2.4.0. Any compilation with the plugin applied fails during FIR extension registration.Stacktrace
Cause
Kotlin 2.4.0 removed/changed the
ProjectExtensionDescriptor-based FIR extension registration mechanism (see KT-83341).FirExtensionRegistrarAdapter.Companionno longer extendsProjectExtensionDescriptor, so the cast inregisterExtensionsthrows.The published
structured-coroutines-compiler:1.0.0POM still declaresorg.jetbrains.kotlin:kotlin-stdlib:2.3.20, confirming it builds against Kotlin 2.3.x.Environment
1.0.02.4.0Request
Please publish a release built against Kotlin 2.4.0 with the FIR extension registration migrated to the new API. For reference,
skydoves/compose-stability-analyzerhit the identical issue and fixed it in its0.9.0release.