Skip to content

Kotlin/Js compilation failed with missing dependency error. #201

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

Closed
sureshg opened this issue Dec 20, 2021 · 2 comments
Closed

Kotlin/Js compilation failed with missing dependency error. #201

sureshg opened this issue Dec 20, 2021 · 2 comments

Comments

@sureshg
Copy link

sureshg commented Dec 20, 2021

After updating to new version, KotlinJs compilation failed with the following error.

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!

e: Module "io.rsocket.kotlin:rsocket-core" 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.rsocket.kotlin:rsocket-core" that has a different version in the project than the version that "io.rsocket.kotlin:rsocket-core" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "io.rsocket.kotlin:rsocket-core" dependencies that may lead to conflicts:
1. "kotlin" (a library with unknown version)
2. "io.ktor:ktor-io" (a library with unknown version)
3. "org.jetbrains.kotlinx:atomicfu" (a library with unknown version)
4. "org.jetbrains.kotlinx:kotlinx-coroutines-core" (a library with unknown version)

Dependencies updated are,

    kotlin("js") version "1.6.10"
    kotlin("plugin.serialization") version "1.6.10"
    
    ....
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC3")
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1")
    implementation(enforcedPlatform("io.ktor:ktor-bom:1.6.7"))
    implementation("io.ktor:ktor-client-js")
    implementation("io.ktor:ktor-client-websockets")
    implementation("io.rsocket.kotlin:rsocket-core:0.14.3")
    implementation("io.rsocket.kotlin:rsocket-transport-ktor-client:0.14.3")
@ghost
Copy link

ghost commented Dec 21, 2021

looks like after Kotlin/kotlinx.coroutines#3047 coroutines 1.6.0 isn't backward compatible when using simple Flow<T>.collect(action) which is used inside rsocket-core

@sureshg
Copy link
Author

sureshg commented Dec 21, 2021

@olme04 thanks. Revered coroutines to 1.5.2 and it's working fine. Thanks!

@sureshg sureshg closed this as completed Dec 21, 2021
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

1 participant