Closed takahirom closed 1 month ago
Did you have any library in mind for this? I see these io
libraries are available for KMP.
Which do you think will be more appropriate for Roborazzi? If we agree on one, I don't mind picking this issue to work on. Let me know.
@eyedol Thank you for suggesting options. Perhaps Okio and Kotlinx-io are good choices because of their user base. Many people use Okio for their network requests, and we don't want to disrupt their builds. Thus, I think Kotlinx-io is a good choice.
@RyuNen344 I apologize for the sudden contact, but you seem knowledgeable about Roborazzi and Okio. Could you share any opinions on this matter?
@takahirom thanks for your quick response. Yeah I think so too, kotlinx-io
is a good choice to go with as it's an official library by Jetbrains. My only issue it's an experimental library and its APIs may change.
Note that the library is experimental, and the API is subject to change.
If it's not a concern, I guess we can run away with using it. And yes let's see what RyuNen344 says...
@takahirom thanks for contacts me 😉
Since kotlinx-io is built upon Okio's implementation, both libraries should function with Roborazzi. Here's a breakdown of their key features to help you decide:
Roborazzi likely doesn't necessitate stream or encryption stream handling, so kotlinx-io might suffice for basic file I/O needs. If you foresee complex file operations or stream processing in the future, Okio offers a richer feature set.
Ultimately, the choice depends on your project's requirements. Both libraries are well-maintained by reputable organizations.
@takahirom I believe per @RyuNen344 comprehensive response, it's safe to say that we can use kotlinx.io
as it has all that's needed for Roborazzi. Well, except for the fact that it's currently experimental and the API's might change. I guess we will cross that bridge when that happens.
We're using java.io.File which is not compatible with Kotlin Multiplatform (KMP). We need to replace it with a KMP-friendly alternative to achieve cross-platform compatibility like iOS