Closed kuanyingchou closed 2 months ago
@kuanyingchou This is probably fixed and I cannot reproduce it with 1.0.24. Would you mind checking if this is happening for you?
Still fails with:
e: [ksp] java.lang.NullPointerException: null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
* What went wrong:
Execution failed for task 'shared:kspKotlinIosSimulatorArm64'.
> A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
> null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
using:
kotlin = "2.0.20"
ksp = "2.0.20-1.0.24"
ksp.useKSP2=true
Hi, @ting-yuan , sorry for the delay. I just tried to reproduce this but haven't found a way to access name
and ordinal
in KSP2 anymore. When traversing an enum class directly the only property I can find is entries
and when getting an enum entry from an annotation the returned KSClassDeclarationEnumEntryImpl
has no properties at all. Is there a way to find all enum entries and their properties in KSP2?
By the way it's been a while since I filed this and now I can't find any XProcessing tests that's blocked by this. So this is probably less important for XProcessing now.
Calling
hasBackingField
on propertyname
andordinal
of an Enum declaration leads to NullPointerException in KSP2:Tested with
2.0.0-Beta3-1.0.18-20240219.110134-28
and https://github.com/google/ksp/commit/a0cd7774a7f65cec45a50ecc8960ef5e4d47fc21.