Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coil 3] Any future idea to migrate to kotlinx-io? #1944

Closed
revonateB0T opened this issue Dec 9, 2023 · 7 comments
Closed

[Coil 3] Any future idea to migrate to kotlinx-io? #1944

revonateB0T opened this issue Dec 9, 2023 · 7 comments

Comments

@revonateB0T
Copy link
Contributor

Ktor is going to take kotlinx-io as their fundamental IO library.
https://youtrack.jetbrains.com/issue/KTOR-6030
And kotlinx-io will provide off-heap IO primitive support
Kotlin/kotlinx-io#239

Since platform image decoder is not written with Java/Kotlin (i.e. we will not parse image data within art/jvm heap), transfer them natively will be a good idea

Due to kotlinx-io is under development, I'm not expecting this to be implemented in few weeks(or months?)

@colinrtwhite
Copy link
Member

No plans at the moment. Coil needs Okio's FileSystem class to read/write files to disk and I don't believe kotlinx-io has plans to add similar functionality soon.

@colinrtwhite
Copy link
Member

Actually it looks like kotlinx-io has filesystems now! Going to look into this and chat with other folks to see what they think. My main concern is kotlinx-io is still under development so this might have to wait for Coil 4.x.

@revonateB0T
Copy link
Contributor Author

Actually it looks like kotlinx-io has filesystems now! Going to look into this and chat with other folks to see what they think. My main concern is kotlinx-io is still under development so this might have to wait for Coil 4.x.

Yeah, land it in Coil 4.0 should be a fair choice

@colinrtwhite
Copy link
Member

Looks like this'll be a Ktor 4.0 thing as well since it's not currently used in the 3.0 beta release. Coil will also migrate to kotlinx-io (likely in 4.0) once they give the go ahead for libraries to migrate to it.

@revonateB0T
Copy link
Contributor Author

ktorio/ktor@40042dc

ktor migrated to kotlinx-io in 3.0-beta2, What's our plan? @colinrtwhite

@revonateB0T
Copy link
Contributor Author

We failed upgrade ktor without a new coil release.
https://github.com/FooIbar/EhViewer/actions/runs/9950836261/job/27489338373

@revonateB0T
Copy link
Contributor Author

Some ByteReadChannel extensions moved to io.ktor.utils.io package, see
FooIbar/EhViewer@b793223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants