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

Dependency conflict prevents usage of this library if a project has newer kotlinx-serialization #313

Open
arkadiuszpalka opened this issue Dec 4, 2023 · 0 comments
Labels
dependencies Pull requests that update a dependency file PR welcome Users are welcome to submit PR

Comments

@arkadiuszpalka
Copy link

I am facing a compatibility issue while trying to integrate the AWS library into my project. The library relies on an outdated version of kotlinx.serialization, creating a conflict with the current version used in my project.
To address this, I have made the following changes in the toml file, set the "rich version" to { strictly = "[1.6, )", prefer = "1.6.1", rejects = "[, 1.6[" } of org.jetbrains.kotlinx:kotlinx-serialization-core-jvm.
Despite these changes, the issue persists. The build scan indicates that I have successfully overridden the version, but I continue to encounter the following error messages

Your current kotlinx.serialization core version is too low, while the current Kotlin compiler plugin 1.9.10 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency.

Obviously, in the following configuration, the project compiles successfully. However, it leads to a runtime error as the required class cannot be found:

implementation(libs.aws.glue.schema.registry) {
    exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-core-jvm")
}
implementation(libs.kotlinx.serialization.core) {
    version { strictly("1.6.1") }
}

As a workaround, I discovered that annotating each Serializable class with @Suppress("PROVIDED_RUNTIME_TOO_LOW") seems to mitigate the issue. This solution has been discussed further in the context of the problem on GitHub: kotlinx.serialization issue #993.

  • AWS Library: software.amazon.glue:schema-registry-serde:1.1.17
  • kotlinx.serialization Version: 1.6.1
  • Kotlin Compiler Plugin Version: 1.9.10
  • Gradle Version: 8.3
@blacktooth blacktooth added dependencies Pull requests that update a dependency file PR welcome Users are welcome to submit PR labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file PR welcome Users are welcome to submit PR
Projects
None yet
Development

No branches or pull requests

2 participants