Create @GrpcClass annotation processor hook for generated source files.
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 37
Beschreibung
To write an annotation processor that further augments the generated source from the grpc protoc plugin is a little difficult.
Currently, I process `@Generated` annotations and search for `value ~= /gRpc/`.
As an external example, looking at the new grpc-dagger in 2.11 (google/dagger#647), the additional dagger code generation is triggered off of an annotation applied to the implementing class. It would be nice to have all the code generation based off of the gprc classes. Right now it feels like a two step process. Add the proto, generate the grpc stub, implement the stub, add the processor annotation, compile again for the additional code.
WDYT?
Beitragsleitfaden
Rechercherichtung
The issue names no files, tests, or entry points; start by tracing how the grpc protoc plugin emits generated Java sources and how annotation processors currently detect @Generated. Define the desired @GrpcClass trigger and its effect on generated-source processing before implementation, then validate the complete proto-to-processor workflow.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- grpc, java
- Bereich
- backend-api-design, build-system
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 20/100