Migrate PolylinesSerializer to kotlinx-io #5307
Merged
+40
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One small step in getting rid of Java dependencies, as noted in #1892 (comment) :)
Just a few things I'd like to get feedback on before finishing this PR:
kotlinx-io
is still in alpha, but since the new code is using only a few basic library APIs, any breaking changes are unlikely to affect it? Alternatively,Okio
is a more stable option with a nearly identical API.java.io.Object{Input,Output}Stream
classes, this introduces a breaking change to how polylines are stored in the database. How would you prefer to handle it?A) Add custom logic for upgrading geometry tables by deserializing existing
java.io
-backed polylines and then serializing them usingkotlinx-io
. In the future this would have to be wrapped to be a no-op on non-JVM platforms.B) Recreate (
DROP
+CREATE
) geometry tables like it's been done withosm_element_edits
.cc @westnordost