Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

How to move to Kotlin Native 0.9.3? #2176

Closed
yuriry opened this issue Oct 5, 2018 · 4 comments
Closed

How to move to Kotlin Native 0.9.3? #2176

yuriry opened this issue Oct 5, 2018 · 4 comments

Comments

@yuriry
Copy link

yuriry commented Oct 5, 2018

When I change ext.kotlin_native_version = '0.9.2' to ext.kotlin_native_version = '0.9.3' in my project, I get these errors:

Could not find org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.9.3.
Searched in the following locations:
    https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.module
    https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.pom
    https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.module
    https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.pom
    https://dl.bintray.com/jetbrains/kotlin-native-dependencies/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.module
    https://dl.bintray.com/jetbrains/kotlin-native-dependencies/org/jetbrains/kotlin/kotlin-native-gradle-plugin/0.9.3/kotlin-native-gradle-plugin-0.9.3.pom
Required by:
    project :ios

How can I move to Kotlin Native 0.9.3?

@yuriry
Copy link
Author

yuriry commented Oct 6, 2018

What does 0.9.3 mean? This link does not even have 0.9.3, but it has 1.3.0-rc-146, which matches the latest Kotlin version. When I set ext.kotlin_native_version = '1.3.0-rc-146' in my project, kotlin-native gradle plugin is resolved. Is 1.3.0-rc-146 the official latest version?

@olonho
Copy link
Contributor

olonho commented Oct 6, 2018

Now Kotlin/Native versioned by frontend version, so 1.3-rc-146 is the version you shall use.

@yuriry
Copy link
Author

yuriry commented Oct 6, 2018

@olonho Thank you for the information and for confirming the version number.

Will the versioning be the same for the libraries like kotlinx.serialization and ktor-client? The reason I'm asking is because it is not easy to move between versions.

For example when I was working with ext.kotlin_version = '1.3.0-rc-57', ext.kotlin_native_version = '0.9.2' and ext.serialization_version = '0.8.1-rc13', I ran into a threading issue. It was quickly fixed and I was able to work with the library built on eap13 branch and published locally. But when ext.serialization_version = '0.8.2-rc13' was released, I could not use the released version because of compiler version mismatch problem. So I continued using local version of the serialization library.

Then I integrated ext.ktor_version = "0.9.5-rc13" and I ran into undefined symlbols issue on iOS. At this point I thought may be it is time to move to ext.kotlin_native_version = '0.9.3' which everyone was talking about. I removed dependency on Ktor to reduce the number of changing variables. But I couldn't even find '0.9.3' of Kotlin Native.

Thanks to various disucussions in other threads, I moved to ext.kotlin_version = '1.3.0-rc-146', ext.kotlin_native_version = '1.3.0-rc-146' and ext.serialization_version = '0.8.2-rc13'. With this configuration there was no compiler version mismatch, but I ran into unresolved reference problem on iOS.

At this point I decided to revert back to the original ext.kotlin_version = '1.3.0-rc-57', ext.kotlin_native_version = '0.9.2' and the locally built ext.serialization_version = '0.8.1-rc13' to continue integration with ext.ktor_version = "0.9.5-rc13". Even though it does not compile on iOS, I can at least test it on Android.

This example shows that it is not so easy to work with different Kotlin libraries. It would be nice if all library versions follow the same numbering convention to simplify transition between different versions compilers. If this is technically not possible, it would be nice to have a single page describing compatiblity between various libraries and compilers. It would also be nice to have better unit test coverage. iOS versions of the libraries are mostly under tested at the moment.

Even though Kotlin as a language aims for readability to improve productivity, current situation with the libraries does not provide measurable productivity gains.

@olonho
Copy link
Contributor

olonho commented Oct 8, 2018

Versioning I mentioned is for the compiler only. Libraries has their own versioning story and dependencies, which shall be documented in their docs. If this is missing - please report an issue.

@olonho olonho closed this as completed Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants