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

Error using coroutines 1.6.0-RC2 in a KMM project #2592

Closed
niltsiar opened this issue Dec 13, 2021 · 3 comments
Closed

Error using coroutines 1.6.0-RC2 in a KMM project #2592

niltsiar opened this issue Dec 13, 2021 · 3 comments

Comments

@niltsiar
Copy link

I was testing a KMM project with the new 1.6.0-RC2 version of coroutines and I got the following error while trying to execute the linkPodDebugFramework or linkPodReleaseFramework tasks. I know that version is not stable but just letting you know about the issue. It's happening with Arrow 1.0.1 and Arrow 1.0.2-SNAPSHOT

Module "io.arrow-kt:arrow-fx-coroutines" has a reference to symbol kotlinx.coroutines.flow/collect|7051880022478496626[0]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "io.arrow-kt:arrow-fx-coroutines" that has a different version in the project than the version that "io.arrow-kt:arrow-fx-coroutines" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "io.arrow-kt:arrow-fx-coroutines" dependencies that may lead to conflicts:
 1. "io.arrow-kt:arrow-annotations" (a library with unknown version)
 2. "io.arrow-kt:arrow-continuations" (a library with unknown version)
 3. "io.arrow-kt:arrow-core" (a library with unknown version)
 4. "stdlib: 1.6.0" (was initially compiled with "stdlib: 1.5.31")
 5. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains.kotlin.native.platform.CoreFoundation")
 6. "org.jetbrains.kotlin.native.platform.darwin: 1.6.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains.kotlin.native.platform.darwin")
 7. "org.jetbrains.kotlin.native.platform.posix: 1.6.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.5.31")
 8. "org.jetbrains.kotlinx:atomicfu" (a library with unknown version)
 9. "org.jetbrains.kotlinx:atomicfu-cinterop-interop" (a library with unknown version)
10. "org.jetbrains.kotlinx:kotlinx-coroutines-core" (a library with unknown version)

Project dependencies:
\--- io.arrow-kt:arrow-fx-coroutines
     ^^^ This module requires symbol kotlinx.coroutines.flow/collect|7051880022478496626[0].
     +--- io.arrow-kt:arrow-annotations
     |    \--- stdlib: 1.5.31 -> 1.6.0
     +--- io.arrow-kt:arrow-continuations
     |    \--- stdlib: 1.5.31 -> 1.6.0
     +--- io.arrow-kt:arrow-core
     |    +--- io.arrow-kt:arrow-annotations (*)
     |    +--- io.arrow-kt:arrow-continuations (*)
     |    \--- stdlib: 1.5.31 -> 1.6.0
     +--- stdlib: 1.5.31 -> 1.6.0
     +--- org.jetbrains.kotlin.native.platform.posix: 1.5.31 -> 1.6.0
     |    \--- stdlib: 1.6.0
     +--- org.jetbrains.kotlinx:atomicfu
     |    +--- stdlib: 1.6.0
     |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 (*)
     |    \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop
     |         +--- stdlib: 1.6.0
     |         \--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 (*)
     +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop (*)
     \--- org.jetbrains.kotlinx:kotlinx-coroutines-core
          +--- stdlib: 1.6.0
          +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0
          |    +--- stdlib: 1.6.0
          |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.0
          |    |    +--- stdlib: 1.6.0
          |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 (*)
          |    \--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 (*)
          +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.0 (*)
          +--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 (*)
          +--- org.jetbrains.kotlinx:atomicfu (*)
          \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop (*)

(*) - dependencies omitted (listed previously)

@nomisRev
Copy link
Member

Thanks for the report @niltsiar. This will be useful to check if it's fixed before we release it.

Do you have a reproducible sample? I guess if you could share your Gradle config (plugins + dependencies + versions), then we should be easy to reproduce. This seems unrelated to any code used in the project itself.

@serras
Copy link
Member

serras commented Dec 24, 2021

@niltsiar could you check again with the current SNAPSHOT? We have recently merged #2606, which adds support for the stable kotlinx-coroutines 1.6.0.

@niltsiar
Copy link
Author

It seems at some point in the development of kotlinx.coroutines 1.6 the Flow.collect function was marked as @InternalCoroutinesApi which caused this issue when I tried 1.6.0-RC2. It has been solved in #3082 before releasing 1.6.0. I've tried again my project with the stable kotlinx.coroutines 1.6.0 and it builds properly with Arrow 1.0.1 and Arrow 1.0.2-SNAPSHOT. Sorry for creating some noise here.

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

No branches or pull requests

3 participants