Hey Folks :wave: Who would like to participate in ...
# multiplatform
s
Hey Folks 👋 Who would like to participate in the next multiplatform online meetup? 🧵 Feel free to propose topics you would like us to talk about! 🧵 Feel free to propose a virtual talk, if you have something you would like to present! Other than that, just join and ask questions ☺️ virtual meeting Multiplatform Community Meeting 🕔 Monday, June 20 · 5:00 – 6:00pm CET/Munich Google Meet joining info Video call link: https://meet.google.com/avu-ijaj-joi Or dial: ‪(DE) +49 40 8081619507‬ PIN: ‪418 485 148‬# More phone numbers: https://tel.meet/avu-ijaj-joi?pin=8370633129540
❤️ 8
plus1 23
h
Do you have a topic (Kotlin MPP only) or is this a free talk eg Kotlin MPP IntelliJ integration and painful imports too? 😄
s
Sorry, I did not understand the question: Are you asking about which kind of presentations would be welcome?
h
Nope, about the topic of questions
s
Oh: Everything related to multiplatform, so integration into IJ is a perfectly valid topic! 👍
2
If you post the rough topic beforehand, I could prepare the answer 🙃 👍
h
Kotlin MPP IntelliJ integration and painful imports 😄
s
Got it. There is not much to prepare for me here! Will be able to talk about this for quite some time 😁
o
believe it's related: I would like to ask about popular use cases for first-party kotlin multiplatform libraries I mean, we have for now several official kotlinx.libraries: coroutines, serialization, datetime, atomicfu, benchmarks, collection.immutable and so on + ktor (not kotlinx, but still official JB product) But the whole kotlin ecosystem requires a lot more different libraries. You can say, that someone can create those libraries on it's own and publish it - and yes, it's possible, and no it's not convenient for final user, and more for library developer. Let's look at the most popular use cases: • logging - there is a huge amount of different logging libraries written in kotlin, and all of them provides different APIs, different targets, different platform specific integrations - when you want to add logging into your library (f.e. my use case is rsocket-kotlin to log some specific internal state changes of log frames to debug if something is working bad, as it's network protocol end users can don't know all specifics, and without logs, developers have less chance to help). In such case you can select one of existing libraries, and force end users to use it while it can have already other logging library in final product. Or you can create small logging micro-library inside you own library, and once more time force user to use configure another logging library.... This is super hard, to evolve • IO - JB recommends using okio for IO, at the same time JB have ktor with it's own ktor-io which is different from okio, and we have also other different libraries in opensource for IO, and here we come to the same issue as with logging, but much bigger, as IO is much more complicated topic, and you should just stick with something that can be not so compatible with other IO implementation. Also, f.e. kotlinx.serialization will have soon integration with okio, which continues ecosystem split • UUID - there were already a lot of discussion happened here in slack about need for common UUID library - even if the most popular library is the only once, it would be better to somehow officially represent it • Big number - BigInt and BigDecimal - those requested a lot also, and we have several implementation, one of them depends on platform specific implementation, others implement everything from scratch I will stop here, as those are my main pain points, but I think, that other users can point more libraries, which exists in multiple implementations I'm not asking JB to implement all of it on their own, NO. But I want to ask, if we, community with help of JB, can somehow cooperate on creating uniform kotlin multiplatform libraries ecosystem. For example by creating something like
kotlinx.community
organization library on github where developers can communicate and develop FIRST PARTY libraries for kotlin multiplatform with guidance and help of JB library team, but less involving them, as we all understand, that there is no resources to work on everything. Those libraries of course can be created by different people, organizations, but we need to somehow show, that those are FIRST PARTY libraries, as such libraries are essential part of kotlin libraries ecosystem. May be Im too ambitious or naive, but I believe something like this can help kotlin multiplatform libraries to grow! (sorry for such a long message 🙂)
4
💯 11
s
Wow!!! Thanks a lot for the long message! Let’s talk about this on our meetup! Just a minor note: I am just an engineer working in the Kotlin Multiplatform Core team. The best to answer here would be the kotlin libraries team. I’ll ask relevant people about their opinion, or if them even would like to join the meetup ☺️ Anyways: We already have quite some things to talk about ☺️ 👍
o
Yeah, I understand, that you are not the right person to ask, but for me it's the main pain point, when someone asked, what's up with kotlin MPP 🙂 I have also some questions about K/JS libraries with nodejs/browser specifics and Kotln/Native libraries with cinterop distribution, I can write it here also, but I think, it's more target specific questions, that overall about MPP
m
Topics: • is the problem that Android Studio lags behind Intellij Idea on multiplatform support on the roadmap - I have rough idea about the origin of this, but wanted to hear the updates if there are any • where is swift interoperability on the roadmap
e
I saw that there were a few KMP items bumped off the roadmap due to a lack of resources. Is there any way for the community to contribute in those areas?
2
k
I’d like to chat about the library ecosystem too. I’ll be there if available.
👍 1
o
Decided to write here about library development a little. 3 topics per targets 'problems': 1. JVM - sometimes it's needed to create single artifact but with expect actual per JDK version, f.e. I want to create a wrapper over C library and overall I can do it via JNI or JNA, but also want to use in future jextract and panama, only available on higher jdks - of course I can create separate artfiacts, but it will be much more easier to do just expect/actual in one module for that 2. JS: now every library artifact is available to both nodejs and browser, but sometimes I want have expect/actual per node/browser, or even have an artifact which will be available only for nodejs - like tcp client/server which uses nodejs apis and cannot be executed in browser - I know there is an issue for that in youtrack, but also Im interested in what is the current issue with this and when it will be possible, or even if community can help speed up it 3. Native: the main question is for cinterop - now it's hard to decide on how to distribute linked libraries - dynamic is hard from both developer and consumer perspective, but static can increase size of an artifact a lot, and if f.e. 2 libraries will link statically same libraries (more specifically dependencies) how K/N will work in this way? F.e. I wanted to create tdlib K/N wrapper which uses openssl, I need to link both tdlib and openssl (and it dependencies) statically, and then I can include another library f.e. ktor tcp tls implementation for native (I have a prototype) - in rsult I will have openssl included twice... This is no g libraries amount will grow, and binary artifact will also singificatlntly grow in size. Those a most speculation and I haven't tested if it even will work in this way (with native static dependencies provided from different libraries), but as we I are here I wanted to mention this
m
I already had some discussion about the common logging problem with @kpgalligan some days ago in this thread https://kotlinlang.slack.com/archives/C3PQML5NU/p1654279949019139 I am looking forward to this meeting.
👆 1
And is there some official processing to make iOS debug more easily except
xcode-kotlin
provided by touchlab?
k
I gave a talk about the framework questions you have there, although I’m not sure they published the video yet. On “except
xcode-kotlin
provided by touchlab?“, well, out of curiosity, is there anything you’d like improved?
Not that it’s perfect. There’s plenty to improve 🙂
On frameworks, I prefer static, and I don’t think there’s any major build time benefit to either. Static generally can make smaller final binaries, and (possibly) better load time. However, if everything from your kotlin library is used in the final app, the binary size will be pretty much the same.
x
Thanks for your reply. On iOS debug, Xcode-Kotlin plugin is very helpful. And Android studio kmm plugin is not more helpful in really production project. So, we want to debug kotlin/native in really production Xcode project like similar to debugging objective-c, eg. print everything in lldb console, is it possible? If the debug kotlin experience of Xcode-kotlin is similar to debugging objective-c, that will be perfect.🚀🚀🚀
Can you share what's the next roadmaps of Xcode-kotlin plugin?
k
Well, xcode-kotlin uses the same llbd script as the KMM plugin and Kotlin/native’s “official” repo. We do have tasks to research improving Kotlin/Native debug, but that’ll almost certainly require conversations with the KN team
x
Yes, I have dived into a little official lldb script.
k
We don’t really have a public “timeline”, but issues are public, and we’re internally getting much better about open source issue attention (https://github.com/touchlab/xcode-kotlin/issues). Xcode has a lot of constraints, so a lot of the improvements will either be in coordination with the native team, or only possible with proprietary tools (Intellij, Android Studio, etc)
👀 1
Xcode extensions have no documentation, and there’s very little that can be added outside of standard lldb integrations, although we are working on it 🔨
Having said all that, add your wish list to the issues 🙂
👍 1
x
Looking forward for KN team will help the Xcode-kotlin more perfect cooperatively if there is no additional official plugin.
Another question, is there any plans to support iOS about compose-jb?🤣
e
It's already supported
x
Can you share more details about that? Thanks.
e