-
Notifications
You must be signed in to change notification settings - Fork 636
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
Bogus error messages in IntelliJ IDEA after switching to 1.7.2 #2810
Comments
Can it be connected to #2809? Do you see any errors in Gradle sync? |
I get the attached output when I change "1.7.1" to "1.7.2" in "libs.versions.toml" and then hit the blue sync icon in IntelliJ IDEA. When I then revert this action and hit the icon again I get no error message. So, by looking at the error message I'd say this is the same cause. |
Yes, it looks like the same issue. Perhaps you can provide a small reproducer project? |
I think I found a reproducer. I generated a compose multiplatform project via the Jetbrains wizard. I then added my libs.versions.toml and added several dependencies from my project to this new project. I did not modify any code. Therefore most of the dependencies are not actually used (including serialization) but I still can reproduce this error when I toggle between 1.7.1 and 1.7.2 in the libs.versions.toml. Please let me know if you can reproduce this too. |
Thanks, I was finally able to reproduce the issue. It looks like some misunderstanding between Kotlin and Android plugins: if you comment out |
Also, it seems that releasing the library with Kotlin 2.0.20 altered the Gradle module file, which led to this artifact resolving problems. If I build the library from the same 1.7.2 commit but with Kotlin 2.0.0, a project you've provided syncs without issues. |
That seems to indicate a hidden Kotlin or Gradle issue. What are you going to do with it? |
I |
@mipastgt It is most likely a Kotlin Gradle plugin issue, as POMs of kotlinx.serialization 1.7.1 and 1.7.2 have a lot of differences. I've filed https://youtrack.jetbrains.com/issue/KT-71443, and it is likely to be fixed from the Kotlin side. In the meantime, I'll try to workaround this issue in the next kx.serialization release. |
…log. Using explicit versions helps work around the issue where the stdlib version was missing from the POM (https://youtrack.jetbrains.com/issue/KT-71443/Unexpected-POM-file-change-when-updating-from-Kotlin-2.0.0-to-Kotlin-2.0.20). Also, simplify dependencies' setup since `stdlib-common` does not have to be declared explicitly since 1.9.20 (https://kotlinlang.org/docs/whatsnew1920.html#easier-configuration-of-new-standard-library-versions-in-gradle) and kotlin-test-junit is selected automatically if no other runner is specified (https://kotlinlang.org/docs/gradle-configure-project.html#jvm-variants-of-kotlin-test). Fixes #2810
tried kotlin 2.1.0-Beta1 with 1.7.2 for kmp project, still has this issue |
Describe the bug
As soon as I switch to version 1.7.2 (from 1.7.1) of
org.jetbrains.kotlinx:kotlinx-serialization-json
I see bogus error messages in my code like the one in the screen shot below. I call this bogus because neither gradle nor the compiler nor the runtime system seem to have a problem. The code still compiles and runs nicely as before. It's only IntelliJ which seems to be confused. As soon as I switch back to 1.7.1 the error also vanishes. I already tried a complete re-build with deletion of .gradle and .idea but that did not make any difference.Environment
The text was updated successfully, but these errors were encountered: