v2.9.0: Excess code generated in adapters (Kapt)
daviddenton opened this issue ยท 4 comments
daviddenton commented
This extra code causes compiler warnings. Was fine in 2.8.0 ๐
@OptIn(InternalKotshiApi::class)
internal object KotshiGitHubJsonAdapterFactory : GitHubJsonAdapterFactory {
public override fun create(
type: Type,
annotations: Set<Annotation>,
moshi: Moshi,
): JsonAdapter<*>? {
val rawType = Types.getRawType(type)
when {
}
if (annotations.isNotEmpty()) return null
return when (Types.getRawType(type)) {
Account::class.java ->
KotshiAccountJsonAdapter(
moshi = moshi
)
...
ansman commented
Yeah I saw that and it was fixed in 2.10.0-alpha01
but I'll backport it to a patch release.
daviddenton commented
Amazing! TYSM :)
ansman commented
Just released 2.9.1 which fixes this. It might take a few hours for it to be available on Maven Central though.
daviddenton commented
Thanks!
Yes - I've had the pleasure of maven central when releasing http4k today.
We use a curl purge script to clear out the maven repo caches - which can help to speed things up.