Anyone know if there have been any intentionally b...
# kotlin-native
a
Anyone know if there have been any intentionally breaking changes in "Kotlin Native Cocoapods" or objc cinterop integration lately? Am trying to upgrade from kotlin 1.3.50 to 1.3.61, and it's failing on a pod that was previously working.
Copy code
-kotlin_version=1.3.50
-kotlin_coroutines_version=1.3.0
-kotlin_serialization_version=0.12.0
+kotlin_version=1.3.61
+kotlin_coroutines_version=1.3.3
+kotlin_serialization_version=0.14.0
I'm getting this error:
Copy code
> Task :Common:generateDefFlutter UP-TO-DATE
> Task :Common:cinteropFlutterIOS
> Task :Common:generateDefReactiveObjC
> Task :Common:cinteropReactiveObjCIOS FAILED
Exception in thread "Thread-3" java.lang.AssertionError: Assertion failed
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.convertFunctionType(Indexer.kt:654)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.convertBlockPointerType(Indexer.kt:691)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.convertType(Indexer.kt:610)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.convertType$default(Indexer.kt:507)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.getTypedef(Indexer.kt:420)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexImpl.indexDeclaration(Indexer.kt:772)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt$indexDeclarations$$inlined$withIndex$lambda$1.indexDeclaration(Indexer.kt:985)
	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt$indexTranslationUnit$1$indexerCallbacks$1$4.invoke(Utils.kt:428)
	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt$indexTranslationUnit$1$indexerCallbacks$1$4.invoke(Utils.kt)
	at kotlinx.cinterop.JvmCallbacksKt$createStaticCFunctionImpl$$inlined$ffiClosureImpl$3.invoke(JvmCallbacks.kt:489)
	at kotlinx.cinterop.JvmCallbacksKt$createStaticCFunctionImpl$$inlined$ffiClosureImpl$3.invoke(JvmCallbacks.kt)
	at kotlinx.cinterop.JvmCallbacksKt.ffiFunImpl(JvmCallbacks.kt:448)
	at kotlinx.cinterop.JvmCallbacksKt.ffiFunImpl0(JvmCallbacks.kt:435)

FAILURE: Build failed with an exception.
I'm using two Pods defined in my
cocoapods
-block:
Copy code
cocoapods {
            pod('Flutter', library_version)
            pod('ReactiveObjC', "~> $reactive_objc_version")
        }
(reactive_objc_version is 3.1)
a
Seems like a bug IMO, can you try to reproduce it on a small project?
a
Not right at this moment, may have to revisit it later.
a
We managed to find the root cause here. Until this will be fixed, I’m afraid that you won’t be able to use this framework.
a
Seems you found the issue right as I had managed to reproduce the issue in a small project: :P https://github.com/AndreasMattsson/kotlin-native/commits/test-reactiveobjc
@Artyom Degtyarev [JB] Anyway, thank you. Although that is unfortunate.
@Artyom Degtyarev [JB] Do you know if those two lines of typedefs you found are the only instances of empty parameter list blocks in ReactiveObjC? I'm wondering if I can potentially patch the framework or something until this is fixed?
actually, since I only use a small subset of what that framework perhaps I can see if I can create my own intermediate interfaces for the classes I use and delegate them from the ios side to the actual implementations in ReactiveObjC. Hmm...
a
As you can see in the YT issue, there is a problem with some exact construction. I spent not too much time with ReactiveObjC to say something concrete, but with my quick search I was unable to find other problematic lines.
a
Thanks!