:wave: If in `Dependencies` I set `aggregating=tru...
# ksp
w
👋 If in
Dependencies
I set
aggregating=true
, then “the output should be invalidated by a new source file or a change in any of the existing files”. If so, is there a point of setting
originatingFiles
in such case, or
originatingFiles
only makes sense if
aggregating=false
?
d
IIRC in the case of
aggregating = true
there is still an optimization available to you if you are careful about originating files. The optimization is for the case where files that are not registered inputs are deleted
Screenshot_20240221-071118.png
In the diagram above, the black lines from A, B, C to
Fascinating.kt
represent registration of inputs using originating files for an aggregating output
w
Thanks David! I’m just watching

your video

😄.
The optimization is for the case where files that are not registered inputs are deleted
Gotcha. So still, even with
listOf(A,B,C)
as originating files, in case of editing D, the reprocessing should happen, is that correct?
d
Editing
D.kt
could introduce a change that would affect the aggregating output
Fascinating.kt
that would cause reprocessing. For instance, by adding the annotation of interest.
Also, apologies for the poor quality of some of the video content
w
Not needed, thank you for providing it, it clarified some other things for me. Thank you.
Editing
D.kt
could introduce a change that would affect the aggregating output
Fascinating.kt
that would cause reprocessing.
So it’s not any change, but some certain type of change, like adding annotations of interest, do I read it right? E.g. adding other changes, like adding a constructor with
println
there might not cause reprocessing?
d
I think that from KSP's perspective, any change to D that is not a deletion would invalidate the aggregating output.
Invalidation here is about whether changes to the input could potentially harm the correctness of the output. I don't think it's about what the actual changes are (adding
println
and so on)
w
Ok, gotcha, it makes sense. Thank you!
👍 1
d
Other readers of the thread can moderate and point it out if I got it wrong 🤠
😄 1