-
Notifications
You must be signed in to change notification settings - Fork 285
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
KSP Incremental Processing: Clean source files should have generated output cache accessible via Resolver. #1555
Comments
(Note: @ting-yuan and I have discussed this offline, but putting it here for completeness.) Short-term fix:There is a short-term fix that we can implement within Dagger to avoid generating However, I think this can be fixed on the KSP side to make things easier (and more efficient) for developers. Long-term fix:I think a better, long-term fix is to change how KSP handles its output cache. In particular, if |
This change should be temporary until we can get a more robust fix in KSP (google/ksp#1555). Fixes #4063 Fixes #4054 RELNOTES=N/A PiperOrigin-RevId: 568629041
This change should be temporary until we can get a more robust fix in KSP (google/ksp#1555). Fixes #4063 Fixes #4054 RELNOTES=N/A PiperOrigin-RevId: 568629041
This change should be temporary until we can get a more robust fix in KSP (google/ksp#1555). Fixes #4063 Fixes #4054 RELNOTES=N/A PiperOrigin-RevId: 568629041
This change should be temporary until we can get a more robust fix in KSP (google/ksp#1555). Fixes #4063 Fixes #4054 RELNOTES=N/A PiperOrigin-RevId: 569608460
Dagger recently had two incremental processing issues related to KSP:
google/dagger#4063
google/dagger#4054
Repro Example
As an example, take the following source files:
Suppose that after a clean build we get an output map like this:
Now, suppose that
B
changes and becomes "dirty". The issue is that Dagger ends up generatingA_MembersInjector.java
when it inspects the superclass ofB
because it thinks thatA_MembersInjector.java
has not been generated yet since it is not found via theResolver
. However, generatingA_MembersInjector.java
overwrites the output map's cache forA
, which is then missing generated sources from other annotations originating fromA
, e.g.A_SomeOtherThing.java
:The text was updated successfully, but these errors were encountered: