New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kapt exception 'Unsupported type' using Auto Factory and dagger 2.40.1+ #3075
Comments
@shashachu is there any more to that stacktrace? I was expecting to see a line from either the |
Hello, I'm @shashachu 's colleague, here is the full stack trace
|
Thanks, I was able to get a repro of this. Looks like this issue is from processing an While this has been the case for some time, it appears the breakage happens now that we're migrating to XProcessing (for KSP support) which now fails if the parameter type has not been generated yet. We should be able to fix this by delaying processing of the I'll work on getting a fix out soon. |
@bcorso awesome. thanks so much! |
This CL refactors the InjectValidator to have a single entry point: `InjectValidator#validate(XTypeElement)` rather than allowing validation on the constructor and members injection types separately. The main purpose of this refactor is to make it easier to fix #3075 by only needing to add validation at a single entry point. However, having a single entry point on the TypeElement also allows us to organize the report better (e.g. we now check that there's only 1 @Inject constructor on the type rather than on each individual constructor), and cache on the TypeElement rather than each individual ConstructorElement. RELNOTES=N/A PiperOrigin-RevId: 413451893
This is a regression in 2.40.1 - 2.40 builds fine. We don't have a sample project yet but I figured I'd file the bug in case it's obvious what the problem is.
The basic setup is that we have an Android library module in a large app that has a class annotated with
@AutoFactory
that is failing to build in 2.40.1+. At the bottom of the stack is (class name changed):We worked around it by dropping this particular usage of
@AutoFactory
and using@AssistedInject
instead. There are many other usages of@AutoFactory
in our app that are working.The text was updated successfully, but these errors were encountered: