You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw this in XProcessing's XTypeTest.wildcardWithMissingType and this could be more of a feature request.
In XProcessing we run a pseudo last run when SymbolProcessor::finish is called here and may still try to access types and annotations in finish. But we're hitting PSI has changed since creation. Could it be that things are cleaned up here?
If it is since there're no new files generated and the caches are still valid is it possible to delay the clean up in the last round so that we won't hit this error in onError or finish? For example, if there're two rounds, instead of:
round 1
clean up
round 2 (final round)
clean up
onError or finish
we do:
round 1
clean up
round 2 (final round)
onError or finish
clean up
In KAPT many processors does some finishing checks/summaries/codegens when round.isProcessingOver=true(for example creating a class that contain 1 method for each @MyAnnotation in source file, this can only be done when knowing no more source files will have generated by this or other annotation processors) (acknowledging the fact that these "summary codegen" won't be annotation-processed)
In KSP1 we can sorta simulate that by doing those in finish()
But in KSP2 they all cause problems like #1854. Specifically, i can't even do things like comparing a type with resolver.builtIns.intType, etc.
Right now if we wanna do any final checks/summaries/codegens, we can no longer use "finish()", so would kinda have to "force" a last round of "process()" by a dummy codegen or what. This doesn't feels like a sustainable approach, but we have no choice if we ever wanna migrate to ksp2...
I thin kuanyingchou's suggested solution would really help
I saw this in XProcessing's
XTypeTest.wildcardWithMissingType
and this could be more of a feature request.In XProcessing we run a pseudo last run when
SymbolProcessor::finish
is called here and may still try to access types and annotations infinish
. But we're hittingPSI has changed since creation
. Could it be that things are cleaned up here?If it is since there're no new files generated and the caches are still valid is it possible to delay the clean up in the last round so that we won't hit this error in
onError
orfinish
? For example, if there're two rounds, instead of:we do:
This one looks similar to #1854.
The text was updated successfully, but these errors were encountered: