Does anyone use this project for testing? <https:/...
# ksp
n
Does anyone use this project for testing? https://github.com/tschuchortdev/kotlin-compile-testing I tried to use this library but my pet example class is not recognized by the processor. (When I use "real" ksp processing it works as expected.) Example test file: https://github.com/kotlinw/kotlinw/blob/main/kotlinw-immutator-processor/src/test/kotlin/kotlinw/immutator/processor/TestKsp.kt Thanks.
m
Yes - maybe this helps.
πŸ™ 1
n
To give some more insights: if I debug into the processing, my annotation type is not resolvable at the following line when calling `annotationType.resolveToUnderlying()`:
m
I can recall I had some problems without given the tests a custom buildDir
n
I can recall I had some problems without given the tests a custom buildDir
This did not solve it unfortunatelly 😞 But thanks for the tip, and the kmock project seems very interesting πŸ‘πŸ»
m
Thx - however is the symbol picked up during the test?
(symbol == KSAnnotated)
n
Hm, the annotation itself (
@Immutate
in my case) seems to be inaccessible by the KSP process. Maybe the annotation and its processor should be in the same project? I give it a try...
"Maybe the annotation and its processor should be in the same project" - nope... :\
m
It looks like it does not know about the Annotation
πŸ‘πŸ» 1
perhaps setting
inheritClassPath
to
true
does the trick
βœ… 1
n
That was it!!! Thank you very much πŸ™πŸ» πŸ™‚
m
Always a pleasure!
πŸ™ 1