When is the Kotlin 1.9.10 IntelliJ IDE plugin goin...
# intellij
j
When is the Kotlin 1.9.10 IntelliJ IDE plugin going to be available, and could someone please confirm if this fix will be available in it? Unfortunately this false positive error report now fails the Gradle sync entirely with Kotlin 1.9.10, but the issue says it's not targeting release until Kotlin 1.9.20-Beta.
@Sebastian Sellmair [JB], please, would you be able to assist?
s
The fix is in the kotlin gradle plugin and will only be shipped in 1.9.20. I am sending you a personal build of 1.9.20 to test if you like: Note: Obviously this is a personal build of mine, no guarantees given; please do not report issues when using this build; the build will be available for at least a few months (but also no guarantees) Kotlin Version:
1.9.20-seb-0
Repository: https://repo.sellmair.io I would be very happy if you could try this build and confirm the issue is fixed on KGP side
j
Thank you @Sebastian Sellmair [JB]. I tested with your build and can confirm the initial issue is resolved when performing a Gradle sync on a Mac. I do still get these other errors logged for missing CocoaPods dependencies when doing a Gradle sync on Linux and Windows machines though:
Could not resolve <unknown coordinates> for moduleiosArm64Main
It prints out this error for every iOS and macOS target and for every module in my library (dozens of errors). These started happening at the same time as the other Gradle sync errors in Kotlin 1.9.0. The error details are:
moduleiosArm64Main: cinterop file: ../project/module/build/classes/kotlin/iosArm64/main/cinterop/module-cinterop-CocoaPodsDependency.klib does not exist
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
s
Kotlin Version:
1.9.20-seb-1
Repository: https://repo.sellmair.io Will be my last personal build for now, as I will be on vacation for the next two weeks. If you see sync issues like that, that seem really sus, please contact @atyrin, he will be able to help and we really would need to know if there is something off!
j
I tested with
1.9.20-seb-1
and still get the same errors for unresolved CocoaPods dependencies on Linux and Windows machines when doing a Gradle sync. @atyrin let me know if you need help reproducing this. I'm assuming it should be visible on a project that uses CocoaPods dependencies with Kotlin 1.9.0+ when doing a Gradle sync on Linux or Windows.
a
Hi, I think you correctly mentioned that is the same issue as https://youtrack.jetbrains.com/issue/KTIJ-25864. Linux and Windows host machines don’t support building Apple targets, including Cocoadpods dependencies (that are actually cinterop dependencies under the hood). A new dependency resolution is implemented for Kotlin 1.9.0 + the latest IntelliJ versions that cause the regression. But I assume that the errors shouldn’t affect the functionality in IDE, except the resolve of declarations from Cocoapods dependencies. But it shouldn’t work in the previous Kotlin version as well (since it’s an unsupported host). Do you have any troubles in IDE experiences besides errors during the import?
j
I haven't noticed any issues in the IDE, no. I don't expect the Apple targets to build on Linux and Windows host machines. But I need to use them to run Linux and Windows target tests. It's just that the Gradle sync logs dozens of these false positive errors for the project, which obfuscates any real errors that might be logged and gives the appearance of something being wrong. Can these be resolved similar to the other issue that @Sebastian Sellmair [JB] fixed? I'd expect Apple targets to simply be ignored completely on unsupported hosts, only logging the single warning that they're being ignored.
This is what the experience is in my library, with 100 errors logged. The subtle distinction between "finished" (successfully) and "failed" is lost in the sea of red error icons.
Also, upon further inspection, it's actually not Kotlin 1.9.10 that began causing these errors to fail the Gradle sync. It's the Android Gradle Plugin, version 8.1 (I updated both at the same time). But Kotlin 1.9.20 works successfully with AGP 8.1, except for these false positive CocoaPods errors on Linux and Windows hosts.
k
Is there a workaround for this in 1.9.10 by any chance?
I am seeing the same issue when migrating project to use HMPP, also got a intermediate
commonJvm
source set.
Using workaround from here seems to help: https://youtrack.jetbrains.com/issue/KT-39037
The workaround being to exclude modules to prevent circular configuration
157 Views