Hi! I’m looking at the weird issue right now. I ha...
# ksp
v
Hi! I’m looking at the weird issue right now. I have a module with mixed kotlin\java code and in this module I have two java classes in two different packages. They both have the same annotation and they both passing a nested class to annotation’s
Class<?>
argument. And for some reason for one class KSP resolves class type passed to the argument successfully and for another class KSP returns ERROR TYPE. It looks super weird since both annotated classes very similar, both have the same visibility and implement same interfaces. The only difference is the package. Class passed to a
Class<?>
argument in both cases is being nested inside annotated class itself. I’m confused and not sure how to even approach debugging here =\
Using FQCN for problematic class solves the issue. Doesn’t explain what is happening to me tho…
t
My gut reaction is that there might be some difference in the source directory. Kotlin compiler and KSP are picky about the directory and package correspondence of Java sources. Can you share a test case so that we can investigate?