Could not find the enum entry for
jiqimaogou opened this issue · 2 comments
jiqimaogou commented
Caused by: java.lang.IllegalStateException: Could not find the enum entry for: Status
at com.squareup.moshi.kotlinpoet.metadata.classinspectors.ElementsClassInspector.enumEntry(ElementsClassInspector.kt:214)
at com.squareup.moshi.kotlinpoet.metadata.specs.KotlinPoetMetadataSpecs.toTypeSpec(KotlinPoetMetadataSpecs.kt:296)
at com.squareup.moshi.kotlinpoet.metadata.specs.KotlinPoetMetadataSpecs.toTypeSpec(KotlinPoetMetadataSpecs.kt:476)
at com.squareup.moshi.kotlinpoet.metadata.specs.KotlinPoetMetadataSpecs.toTypeSpec(KotlinPoetMetadataSpecs.kt:182)
at com.squareup.moshi.kotlinpoet.metadata.specs.KotlinPoetMetadataSpecs.toTypeSpec$default(KotlinPoetMetadataSpecs.kt:178)
at com.squareup.moshi.kotlin.codegen.apt.MoshiCachedClassInspector.toTypeSpec(MoshiCachedClassInspector.kt:47)
at com.squareup.moshi.kotlin.codegen.apt.MetadataKt.targetType(metadata.kt:205)
at com.squareup.moshi.kotlin.codegen.apt.JsonClassCodegenProcessor.adapterGenerator(JsonClassCodegenProcessor.kt:141)
enum class Status(val value: String) {
no_one("no_one"),
new_create("new_create"),
new_created("new_created"),
unassigned("unassigned"),
be_processed_again("be_processed_again"),
doing("doing"),
long("long"),
invalid("invalid"),
done("done"),
}
jiqimaogou commented
ksp is ok, but kapt failed.
ZacSweers commented
Please file this on github.com/square/KotlinPoet