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

kotlinx-coroutines-bom seems to break upgrade to Spring Boot 2.7.1 #31521

Closed
jesperancinha opened this issue Jun 24, 2022 · 6 comments
Closed
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid

Comments

@jesperancinha
Copy link

jesperancinha commented Jun 24, 2022

Hi there, I'm not sure if I should open the issue here too but I noticed that after trying to upgrade to Spring boot 2.7.1 I'm getting this error:

[ERROR] Failed to execute goal on project stamps-and-coins-service: 
Could not resolve dependencies for project 
org.jesperancinha.enterprise:stamps-and-coins-service:jar:0.0.1-SNAPSHOT: org.jetbrains.kotlinx:kotlinx-coroutines-bom:jar:1.6.3 was not found in 
https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

I dug into the BOM of spring boot and I found that it is using kotlinx-coroutines-bom 1.6.3 which is using kotlinx-coroutines-debug dependency which wants to download apparently a BOM as a jar file:

    <dependency>
      <groupId>org.jetbrains.kotlinx</groupId>
      <artifactId>kotlinx-coroutines-bom</artifactId>
      <version>1.6.3</version>
      <scope>runtime</scope>
    </dependency>

Have you seen this issue and are you going to release a fix soon?

Thanks!

@jesperancinha jesperancinha changed the title kotlinx-coroutines-bom seems to brea kotlinx-coroutines-bom seems to break upgrade to Spring Boot 2.7.1 Jun 24, 2022
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 24, 2022
@wilkinsona
Copy link
Member

No, we haven't seen this as far as I know. Our Gradle-based build is not affected and a Maven-based project that we build as part of the release process was also unaffected. Perhaps the problem only occurs with certain dependencies. Can you please provide a minimal sample that reproduces the problem so that we can assess its impact?

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jun 24, 2022
@jesperancinha
Copy link
Author

jesperancinha commented Jun 24, 2022

Yes you are right about that. It does not occur in the projects where I do not use coroutines. But if I use coroutines, it apparently goes through the build of materials and then it tries to download kotlinx-coroutines-bom.jar which of course does not exist. So indeed this is something related when using some dependencies. I've also opened an issue to them about this, because this isn't something particularly related to Spring Boot: Kotlin/kotlinx.coroutines#3345

I'll make a sample project for you today about this.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jun 24, 2022
@jesperancinha
Copy link
Author

@wilkinsona , maybe this log output helps? It's one of my projects in GitLab. It's a much simpler project: https://gitlab.com/jesperancinha/video-series-app/-/jobs/2634783454

@jesperancinha
Copy link
Author

@wilkinsona And this after I've removed the kotlinx-coroutines BOM from the pom file of that same project: https://gitlab.com/jesperancinha/video-series-app/-/jobs/2635016725

So it just happens whenever I include certain coroutine dependencies that make use of the couroutines debug library, I suppose. But of course apparently Spring Boot now also includes coroutines (I don't know when this started) so this is why I've opened this issue also to you.

@jesperancinha
Copy link
Author

I think I found out what's needing that debug library.

        <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-runner-junit5-jvm</artifactId>
            <scope>test</scope>
        </dependency>

Tough one this one :) because then it will only happen to whoever is using Kotest, but apparently this one actually starts in kotlinx coroutines, that's where the problem seems to begin. I'm waiting for a reaction from them at the moment, but this seems to be an issue with the kotlinx-couroutines libraries.

@wilkinsona
Copy link
Member

Thanks, @jesperancinha. We import kotlinx-coroutines-bom into our spring-boot-dependencies bom. In 2.7.1 we've upgraded from 1.6.1 to 1.6.3 which means that any dependency on the debug library now uses a version with a faulty pom. This didn't affect Boot's build as we do not depend, directly or transitively, on kotlinx-coroutines-debug. You can work around the problem by setting kotlin-coroutines.version to 1.6.1.

Given that the problem is limited to users kotlinx-coroutines-debug and that there is a workaround, we'll leave things as they are in Spring Boot. We'll pick up 1.6.4 when it's released which should address the problem at source.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2022
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants