hi all, we have had an intermittent issue to do wi...
# ksp
s
hi all, we have had an intermittent issue to do with multiple round processing and I'm looking for tips to debug. We use Hilt, and we sometimes inject classes which are generated from an internal ksp processor. every so often, Hilt fails to find the generated class, and I don't know whether it's a bug in Hilt with not correctly deferring the type, a bug in ksp where it's incorrectly reaching the terminal condition, or our processor where it may sometimes fail to run. any suggestions?
y
I'm guessing hilt should be fine, I remember it has some abstraction to defer invalid classes. @danysantiago might be able to help
d
Do you only generate
@Inject
classes or are you generating `@Module`s? If it is the latter, you need to help Hilt 'know' that you will be generating things it has to aggregate. See: https://dagger.dev/hilt/creating-extensions.html Specifically the APIs that triggers your code generation needs to be annotated with
@GeneratesRootInput
so Hilt knowns processors for that annotation need to generate their code before it can do its aggregation.
👍 1
s
just @Inject classes
we are behind in versions of both Hilt and ksp so it's totally possible upgrading one or both will just fix the issue, but I wanted to see if there was somewhere obvious we could look