Closed tarasmorskyi-mediamonks closed 2 years ago
We foresee quite some challenges in ensuring that the two libraries will be able to coexist even if we resolve the JVM package naming, but thanks for the input. We will have it in mind.
Any updates on this?
In Realm Kotlin we are relying on the same native implementation of the core database and there is no options for two different version coexist in the same process address space, so this will not be possible unless addressed natively. There is not any plan of doing that right now.
Yes, I understand about native implementation but issue lays on the ∆ava/Kotlin layer as you use the same package name for both Realm-Android and Realm-Kotlin. It you will have something like io.realm.kotlin for Realm-Kotlin and io.realm for Realm-Android it will solve this issue. Of course it may require some alignments in versions to use the same or compatible NDK package.
The problem is that the native parts are not exactly the same, so we cannot just reuse the so-file in both SDKs. And as said, aligning them or finding a way where the two different versions can coexist is not on our current roadmap.
The obvious thing to do would be to migrate old libraries to Realm Kotlin when the required feature set is supported. Then it would just be a matter of aligning the versions in the dependencies.
Oh, makes sense now. I was expecting usage of the same native parts and KMM being only a middleware for single codebase.
When some library (like Lokalise) is using realm-jvm under the hood it becomes impossible to use due to conflict between library and kmm modules which use realm-kotlin. Sample error log:
Possible solution: have different package name for realm-kotlin like io.realm.kotlin