square / kotlinpoet

A Kotlin API for generating .kt source files.
https://square.github.io/kotlinpoet/
Apache License 2.0
3.9k stars 288 forks source link

Kapt: KotlinPoetMetadata can't parse with Kotlin 1.8 #1636

Open zskingking opened 1 year ago

zskingking commented 1 year ago

Caused by: java.lang.IllegalStateException: Could not parse metadata! This should only happen if you're using Kotlin <1.1. at com.squareup.kotlinpoet.metadata.KotlinPoetMetadata.readKotlinClassMetadata(KotlinPoetMetadata.kt:89) at com.squareup.kotlinpoet.metadata.KotlinPoetMetadata.toImmutableKmClass(KotlinPoetMetadata.kt:118) at com.immomo.android.mm.kobalt.processor.ApiCacheGenerator.generate(ApiCacheGenerator.kt:32) at com.immomo.android.mm.kobalt.processor.ApiCacheGenerator.generate(ApiCacheGenerator.kt:141) at com.immomo.android.mm.kobalt.processor.KobaltProcessor.process(KobaltProcessor.kt:50) at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90) at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:197) at

Egorand commented 1 year ago

Do you have a reproducible sample that we can run? It'll be hard to triage this based on just the stacktrace.