auto-service-ksp icon indicating copy to clipboard operation
auto-service-ksp copied to clipboard

Support merging existing resources

Open ZacSweers opened this issue 4 years ago • 1 comments

Requires https://github.com/google/ksp/issues/431

ZacSweers avatar Jun 26 '21 20:06 ZacSweers

I think the auto-service-ksp processor code currently does not even merge its own resources, i.e. multiple rounds would overwrite each other or it would throw. It looks like there is an intention to gather everything for a later write, like SymbolProcessor.finish(), but then, actually, writes are not being deferred. Or does CodeGenerator.createNewFile() actually append? Maybe I missed something or it's left incomplete because of this issue. Just thought I'd share my findings from studying the code.

https://github.com/ZacSweers/auto-service-ksp/blob/main/processor/src/main/kotlin/dev/zacsweers/autoservice/ksp/AutoServiceSymbolProcessor.kt

bubenheimer avatar Feb 24 '23 12:02 bubenheimer