icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.03k stars 95 forks source link

Kotlin 1.5 compatibility #133

Closed jorgezim closed 3 years ago

jorgezim commented 3 years ago

Are there any timeframes of when the library will be compatible with kotlin 1.5?

Alex009 commented 3 years ago

hi! as i know kotlin 1.5 compatible with libraries compiled by 1.4. have you run into problems with the library using Kotlin 1.5?

update all moko to 1.5 planned at june

jorgezim commented 3 years ago

no issues so far on the android side, will be implementing IOS side and I'll let you know.

sud007 commented 3 years ago

Thanks much appreciated. I believe this is about time for a support update to Kotlin 1.5

jorgezim commented 3 years ago

Hello, I have the following error using kotlin 1.5.10:

e: Module is a module[ModuleDescriptorImpl@7b1e6886] has reference public kotlinx.coroutines/cancel|-8901161077954086727[0], unfortunately neither itself nor its dependencies CancelError.zip

I have attached a full project with the error. If you try to build the shared module it breaks for IOS

jorgezim commented 3 years ago

Now I am using version 0.11.0 and I am getting this error:

w: skipping /Users/zimi/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/mvvm-iosx64/0.11.0/67ed011c7f872ed79137d6e795b597d4f8d4e89f/mvvm.klib. Incompatible abi version. The current default is '1.4.2', found '1.5.0'. The library produced by 1.5.20 compiler e: Could not find "/Users/zimi/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/mvvm-iosx64/0.11.0/67ed011c7f872ed79137d6e795b597d4f8d4e89f/mvvm.klib" in [/Users/zimi/Documents/projects/Zimi-App/ZimiShared, /Users/zimi/.konan/klib, /Users/zimi/.konan/kotlin-native-prebuilt-macos-1.5/klib/common, /Users/zimi/.konan/kotlin-native-prebuilt-macos-1.5/klib/platform/ios_x64]

I invalidated the cache, rebuilt my project and still the error pops up.

Alex009 commented 3 years ago

@jorgezim moko-mvvm 0.11.0 first version which support kotlin 1.5 and to use it you should use kotlin 1.5.20, as described in your error log :) https://github.com/Alex009/moko-mvvm-bug-sample/commit/214a33cf13377555543ac5684dc43539533bc924 here commit where all compiled file in your project sample (i test it on ./gradlew build)

jorgezim commented 3 years ago

@Alex009 thanks for your reply. Did you see my last message. I tested with 0.11.0 and I got the error described in my previous comment. Basically all works fine if you run it with gradlew but if you specifically run the build taks under the Shared library it throws an error for IOS only w: skipping /Users/zimi/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/mvvm-iosx64/0.11.0/67ed011c7f872ed79137d6e795b597d4f8d4e89f/mvvm.klib. Incompatible abi version. The current default is '1.4.2', found '1.5.0'. The library produced by 1.5.20 compiler e: Could not find "/Users/zimi/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/mvvm-iosx64/0.11.0/67ed011c7f872ed79137d6e795b597d4f8d4e89f/mvvm.klib" in [/Users/zimi/Documents/projects/Zimi-App/ZimiShared, /Users/zimi/.konan/klib, /Users/zimi/.konan/kotlin-native-prebuilt-macos-1.5/klib/common, /Users/zimi/.konan/kotlin-native-prebuilt-macos-1.5/klib/platform/ios_x64]

Alex009 commented 3 years ago

@jorgezim gradle build task run all assemble and tests tasks in all projects. so its build shared too and all ok.

./gradlew :shared:build successful too.

what exactly you doing? log tell you that you try to compile project not by 1.5.20 kotlin compiler.

jorgezim commented 3 years ago

@Alex009 I was compiling with kotlin 1.5.0, my bad, I changed to 1.5.20 and all working fine. Thanks!