Anyone facing: ```e: [ksp] java.lang.NullPointerEx...
# ksp
g
Anyone facing:
Copy code
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
With
ksp.useKSP2=true
? https://github.com/google/ksp/issues/1941
j
do you have a rough idea on what code snippet might be triggering this issue? Generally I won’t expect anything jvm specific to work with KMP, in your stacktrace it looks like to be the case, as a workaround I can make KSP not to crash but won’t return information either.
g
I have no idea, it just fails when I turn on and works when off. The project is this: https://github.com/GuilhE/WhosNext
e
I believe that's the issue where annotation default values are null (don't have the link at the moment).
g
e
Yes, as well as others. There's also a YouTrack issue tracking the upstream Kotlin issue
👍 1
g
I’ve noticed this issue was added to milestone 2.1 https://github.com/google/ksp/milestone/26
j
Copy code
* What went wrong:
Execution failed for task ':shared:kspCommonMainKotlinMetadata'.
> 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
I have the same NPE but for commonMain
332 Views