Retrofit+Arrow to Ktor Client+Arrow migration
- Dominant language
- Kotlin
- Stars
- 6.6k
- Forks
- 472
- Avg merge
- 3d 49m
- Merged PRs (30d)
- 4
Description
As of today I'm using Retroft in combination with Moshi for Serialization and Arrow's Either API for return type specifications, for instance suspended network calls return something like `Either` where `CallError` is an Arrow API.
I'm slowly migrating my app to be multiplatform capable, so I'm replacing APIs like java.time.* with kotlinx.datetime.* and so on. My problem is, there's a Retrofit integration with Arrow but not an equivalent for Ktor as far as I know.
**So my question is**: what would be the best pattern or strategy to replace Retrofit with Ktor client so that my client code doesn't break? This is kind of tricky since `CallError` is located in `arrow.retrofit.adapter.either.networkhandling`, so it's part of Retrofit's integration API...
**For clarification**: I'm also migrating from Moshi to kotlinx.serialization, maybe this helps somehow.
Contributor guide
Research direction
Review the Retrofit integration around arrow.retrofit.adapter.either.networkhandling.CallError, then examine the Ktor client and kotlinx.serialization migration described in the issue. Done means establishing a documented migration strategy that preserves the client's Either-based return types without depending on Retrofit-specific APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100