Hello, I just upgraded Kotlin to the latest EAP an...
# kotlin-native
t
Hello, I just upgraded Kotlin to the latest EAP and am unable to export a framework for Xcode. These are the versions I'm using: Kotlin: 1.3.30-eap-125 Kotlin coroutines: 1.1.1-eap13-125 Serialization: 0.11.0-1.3.30-eap-125 Ktor: 1.2.0-alpha-1.3.0-eap-125 This is the error: https://gist.github.com/Thomas-Vos/c2255004d64261d75f7fc715b242f8ee I'm not sure what this error means, could someone let me know what is going wrong?
s
Are all of those library versions built with the new compiler EAP? That can cause a problem.
t
@Sam I think so yes, I used the same versions as Ktor: https://github.com/ktorio/ktor/blob/1.3.30/gradle.properties#L15L20
That should work, right?
I have no issues building the project with these versions: Kotlin: build-1.3.30-eap-44 Kotlin coroutines: 1.1.1 Serialization: 0.10.0 Ktor: 1.2.0-alpha-2 So for me this is a new issue after upgrading to the versions in the original post.
o
Please report a bug
t
@olonho do you want me to report the bug at kotlin-native on GitHub or somewhere else? I have no idea what the cause is for this issue as it is quite a large project I'm working on. I'm not even sure if this is a Kotlin/Native bug or if it could be something else which is wrong.
o
Github is ok, just provide as much info as you can
t
@olonho ok, thanks. I reported it here: https://github.com/JetBrains/kotlin-native/issues/2834. I'm also having some Kapt issues since this EAP in an Android/JVM module. Not sure if that is related to this issue, but that prevents me building the project for Android as well to see if this same issue occurs.
l
@Thomas Did you report the kapt issue on kotl.in/issue? If so, please link it
t
@louiscad I haven't reported it yet, will look into it soon. The issue is some unresolved references for classes that should be generated by Kapt. The generated classes are visible in Android Studio but it looks like they are just ignored when compiling.
What is interesting is that Dagger has no unresolved references but only AndroidX Navigation has. The only difference I can think of is that AndroidX Navigation generates Kotlin classes and Dagger just generates Java classes.
l
Navigation doesn't use kapt but generates code with a Gradle plugin if you use safeargs.
t
Yes, I use SafeArgs, so then it's probably not a Kapt issue but something else.
@louiscad You're right that Navigation doesn't even use kapt, but only uses the gradle plugin. I was wrong, I didn't look at the unresolved classes yet so I thought it was kapt. I just don't get why this is happening by just updating the Kotlin version. Should I report it at kotl.in/issue or is it an Android navigation issue?
l
@Thomas You should report it on b.android.com under AndroidX, and if possible, provide a (public) reproducing project
t
@louiscad thanks for your help. I reported the Navigation issue here with a sample project: https://issuetracker.google.com/issues/129544020
👍 1
@olonho In case you are still interested in this error, I added some code to the GitHub issue so you should be able to reproduce it.
🙏 1
l
@Thomas Regarding the issue you encounter with the safe args gradle plugin, I think you can tell gradle that the
generateSafeArgs<BuildType>
task depends on
compile<BuildType>Kotlin
, or otherwise tell to do it first with
doFirst
even if that means it is run twice.