You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Not sure if this is the best place to report it. I was trying out Kotlin 2.0.0-Beta4 in our company codebase. When trying it with kapt.use.k2 set to true, we noticed that we were getting errors in the generated code for serialization.
Stack trace provided:
> Task :app:kaptGenerateStubsDebugKotlin
w: K2 kapt is an experimental feature. Use with caution.
> Task :app:kaptDebugKotlin FAILED
serialization/app/build/tmp/kapt3/stubs/debug/com/sample/serialization/response/SampleResponse.java:94: error: illegal '.'
public static final com.sample.serialization.response.SampleResponse..serializer INSTANCE = null;
You can see it generates the code with a double dot here: SampleResponse..serializer
I attached a small sample which highlights this issue. If you set kapt.use.k2=false then the project compiles and runs however setting it to true causes the issue above.
Hopefully the sample is useful.
Expected behavior
I would expect that kapt doesn't interfere with kotlinx-serialization.
Environment
Kotlin version: 2.0.0-Beta4
Library version: 1.6.3
Kotlin platforms: Android
Gradle version: 8.2
Other relevant context: kapt.use.k2=true
The text was updated successfully, but these errors were encountered:
Describe the bug
Not sure if this is the best place to report it. I was trying out
Kotlin 2.0.0-Beta4
in our company codebase. When trying it withkapt.use.k2
set to true, we noticed that we were getting errors in the generated code for serialization.Stack trace provided:
You can see it generates the code with a double dot here:
SampleResponse..serializer
To Reproduce
serialization.zip
I attached a small sample which highlights this issue. If you set
kapt.use.k2=false
then the project compiles and runs however setting it to true causes the issue above.Hopefully the sample is useful.
Expected behavior
I would expect that kapt doesn't interfere with kotlinx-serialization.
Environment
kapt.use.k2=true
The text was updated successfully, but these errors were encountered: