Udi Cohen

09/13/2021, 5:33 AM
Hi, after upgrading from beta08 to the stable version my processor got broken due to a change in KSTypeImpl, and I'm no sure why is that. In 1.0.0 stable, there's an additional check when resolving a KSType, where the constractor's declaration is compared to NotFoundClasses.MockClassDescriptor (See commit One of my annotations is found to be this way, which means its KSType is resolved to "<Error>". I'm not sure why is that and I was hoping for some clarification on this check, and what does it mean if the constractor is of type NotFoundClasses.MockClassDescriptor. For reference, my annotation is a meta-annotation, in Java, that's declared something like this: @Retention(RetentionPolicy.CLASS) @Target(ElementType.ANNOTATION_TYPE) public @interface UdinicMetaAnnotation { String GENERATOR = "generator"; String generator() default ""; Target[] targets(); Class<?>[] nestedAnnotations() default {}; // .... } BTW in beta08, before this change, I didn't notice any issues related to this annotation's problematic constractor type.
ok I found the problem to be a classpath issue - I thought it's enough for that annotation to be in the processor's classpath, but apparently it needs to be in the classpath of the compiled module. I'm not sure if that's the same behavior as in Java APs, but worth noting.


09/13/2021, 6:06 PM
The change is to ensure we are not missing some of the cases where is should be error type but was not caught by our check. If you are seeing this breaking it is most likely due to compiler not able to resolve the type correctly, this
is a marker used in compiler to denote types failed to resolve.
👍 1