Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Kotlin Coroutines Debug Agent premain class name #1794

Open
hsz opened this issue Oct 14, 2024 · 0 comments
Open

Adjust Kotlin Coroutines Debug Agent premain class name #1794

hsz opened this issue Oct 14, 2024 · 0 comments
Assignees

Comments

@hsz
Copy link
Member

hsz commented Oct 14, 2024

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:

val manifest = Manifest(
"""
Manifest-Version: 1.0
Premain-Class: kotlinx.coroutines.debug.AgentPremain
Can-Retransform-Classes: true
Multi-Release: true
""".trimIndent().byteInputStream()
)

As soon as the Kotlin/kotlinx.coroutines#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 hsz self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant