Robert Jaros
02/26/2025, 6:52 PM2.1.20-RC-1.0.30
.Robert Jaros
02/26/2025, 6:54 PM@Target(AnnotationTarget.CLASS)
public annotation class SimpleHtmlComponent(val tagName: String, val withText: Boolean = false)
Robert Jaros
02/26/2025, 6:55 PMval simpleHtmlComponent = classDeclaration.getAnnotationsByType(SimpleHtmlComponent::class).first()
val tagName = simpleHtmlComponent.tagName
val withText = simpleHtmlComponent.withText
The last line throws the exception:
java.util.NoSuchElementException: Collection contains no element matching the predicate.
at com.google.devtools.ksp.UtilsKt.createInvocationHandler$lambda$8(utils.kt:587)
at jdk.proxy44/jdk.proxy44.$Proxy315.withText(Unknown Source)
at dev.kilua.ksp.KiluaProcessor.process(KiluaProcessor.kt:62)
at com.google.devtools.ksp.impl.KotlinSymbolProcessing$execute$1$1.invoke(KotlinSymbolProcessing.kt:581)
at com.google.devtools.ksp.impl.KotlinSymbolProcessing$execute$1$1.invoke(KotlinSymbolProcessing.kt:579)
at ksp.com.google.devtools.ksp.common.IncrementalContextBase.closeFilesOnException(IncrementalContextBase.kt:404)
at com.google.devtools.ksp.impl.KotlinSymbolProcessing.execute(KotlinSymbolProcessing.kt:579)
at com.google.devtools.ksp.impl.KSPLoader$Companion.loadAndRunKSP(KSPLoader.kt:37)
at com.google.devtools.ksp.impl.KSPLoader.loadAndRunKSP(KSPLoader.kt)
Robert Jaros
02/26/2025, 6:56 PMTing-Yuan Huang
02/28/2025, 7:06 PM.withText
in the proxy. That probably has something to do with the default argument assuming that it is fine with .tagName
one line above. I can't really tell what exactly happened without diving into a concrete example though.Robert Jaros
02/28/2025, 9:43 PM