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

[K2] Kotlinx serialization plugin is not compatible with experimental_use_abi_jars #1233

Open
zalewskise opened this issue Oct 29, 2024 · 1 comment

Comments

@zalewskise
Copy link
Contributor

After updating Kotlin to 2.0, compilation of target that uses kotlinx serialization plugin, started failing with:
error: serializer has not been found for type `FooType`. To use context serializer as fallback, explicitly annotate type or property with @Contextual, where FooType comes from a different target. It fails only with experimental_use_abi_jars = True.

Repro

  1. Apply the diff (20dcc94)
  2. Change dir to: examples/plugin/serialization
  3. Build data target: bazel build data

Expected

Build completed successfully

Actual

src/serialization/Data.kt:6:78: error: serializer has not been found for type 'plugin.serialization.AnotherData'. To use context serializer as fallback, explicitly annotate type or property with @Contextual
data class Data(val stringValue: String, val intValue: Int, val anotherData: AnotherData)
                                                                             ^^^^^^^^^^^
@agluszak
Copy link
Contributor

I reproduced it, changing api_version and language_version to 1.9 indeed fixes it

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

2 participants