intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Adjust Kotlin Coroutines Debug Agent premain class name

Open hsz opened this issue 1 year ago • 0 comments

The kotlinx.coroutines library is about to change the name of the kotlinx.coroutines.debug.AgentPremain class, which we refer to with the dynamically created coroutines-javaagent.jar file, required for coroutines debugging to work:

https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/b9b6699ebb95c6c88ee188b9d528506744f24ee5/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/InitializeIntelliJPlatformPluginTask.kt#L145-L153

As soon as the https://github.com/Kotlin/kotlinx.coroutines/pull/4247 change is applied and introduced to the IntelliJ Platform, we need to adjust that name in the IntelliJ Platform Gradle Plugin, too.

For backward compatibility, we need to keep the reference to the old class in place and introduce a new one with the IntelliJ Platform build number check.

A new file has to have a new name to allow the use of IntelliJ Platform in an older version next to the newer platform version, i.e., when one builds the plugin with a different version than when running it locally.

In some cases, it may also be necessary to manually allow plugin developers to switch to the new approach by enabling the dedicated feature flag.

hsz avatar Oct 14 '24 07:10 hsz