Skip to content
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 symbol processing not working (or working poorly) #4549

Open
mar3kk opened this issue Dec 20, 2024 · 2 comments
Open

[KSP] Incremental symbol processing not working (or working poorly) #4549

mar3kk opened this issue Dec 20, 2024 · 2 comments

Comments

@mar3kk
Copy link

mar3kk commented Dec 20, 2024

Does dagger/hilt KSP actually support incremental symbol processing? It seems changing any java or kotlin file in our project, even one that seemingly shouldn't contribute to the output, causes the ksp to re-run completely.
Analyzing the KSP log files kspDirtySet.log and kspSourceToOutputs.log turns out most of the times the files considered dirty are only used to produce some proguard rules. There are a lot of entries ending _HiltModules_KeyModule_LazyClassKeys.pro. Feels like something that could be skipped when minification is disabled.

@mar3kk mar3kk changed the title [KSP] Incremental symbol processing not working (or working badly) [KSP] Incremental symbol processing not working (or working poorly) Dec 20, 2024
@bcorso
Copy link

bcorso commented Dec 26, 2024

Does dagger/hilt KSP actually support incremental symbol processing?

Hmm, yes, it should support incremental processing.

In KSP the incremantal processing is determined by the mode of each output (isolating/aggregating). For the LazyClassKey proguard files, this is setup here.

If you're seeing an issue specifically with the .pro files it could be a bug related specifically to resource file outputs (since most of Dagger's outputs are source files, it could explain why we didn't hit this before now). However, that would be something we'd need to get fixed in KSP rather than Dagger.

We're a little back logged right now, so if you could provide a minimal repro example that could help get this rolling.

@bcorso
Copy link

bcorso commented Dec 27, 2024

Actually, nm. @Chang-Eric pointed out that we were forgetting the originating element for the resource file (https://github.com/google/dagger/blob/master/java/dagger/internal/codegen/processingstep/LazyClassKeyProcessingStep.java#L114).

I'll send out a fix for that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants