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

resolve conflicts of module-info.class on kotlinx-coroutine-debug #4314

Merged

Conversation

RyuNen344
Copy link

@RyuNen344 RyuNen344 commented Dec 24, 2024

  • From version 1.10.0, kotlinx-coroutines-debug no longer bundles bytebuddy and has stopped using its custom shadowJar task.
  • It now conflicts with build-logic that were configured globally for Java 9 module system.
    • tasks.named<Jar>(target.artifactsTaskName) {
      manifest {
      attributes("Multi-Release" to true)
      }
      from(compileJavaModuleInfo) {
      // Include **only** file we are interested in as JavaCompile output also contains some tmp files
      include("module-info.class")
      into("META-INF/versions/9/")
      }
      }
  • This conflict of module-info.class causes issues in programs that use ASM-based tools like Jacoco, so it needs to be fixed.

@RyuNen344 RyuNen344 changed the title remove the logic to include module-info.class at kotlinx-coroutine-debug resolve conflicts of module-info.class at kotlinx-coroutine-debug Dec 26, 2024
@RyuNen344 RyuNen344 changed the title resolve conflicts of module-info.class at kotlinx-coroutine-debug resolve conflicts of module-info.class on kotlinx-coroutine-debug Dec 26, 2024
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this causes problems for some tools, but indeed, the current configuration has a problem: https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-debug/1.10.1/kotlinx-coroutines-debug-1.10.1.jar contains two files with the path META-INF/versions/9/module-info.class, and with your fix, only one such file remains. Thanks!

@dkhalanskyjb dkhalanskyjb merged commit b9899b5 into Kotlin:develop Jan 7, 2025
@RyuNen344 RyuNen344 deleted the resolve-module-info-conflict branch January 7, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants