fs2-grpc icon indicating copy to clipboard operation
fs2-grpc copied to clipboard

Add service descriptor to code generator

Open Gorzen opened this issue 2 years ago • 1 comments

This PR adds service descriptor in the code generator for gRPC services.

The service descriptor is useful to get general information about the service. For instance, in our case, we use the name to load the service's configuration.

Gorzen avatar Apr 06 '23 12:04 Gorzen

Hi @ahjohannessen ,

Would you have time to have a look at this PR? It exposes the service descriptor to the generated gRPC service companion objects.

There could be alternative implementation or naming, but the core idea of linking the GeneratedCompanion to its corresponding descriptor (Java or ScalaPB one) would be very useful to build generic tooling around.

lomigmegard avatar Jul 18 '23 15:07 lomigmegard

please fix mima by adding ProblemFilters.exclude[ReversedMissingMethodProblem]("fs2.grpc.GeneratedCompanion.serviceDescriptor") to build.sbt

ahjohannessen avatar Sep 02 '24 15:09 ahjohannessen

Thank you! @ahjohannessen

Gorzen avatar Sep 02 '24 15:09 Gorzen

@Gorzen np - I have made a new release

ahjohannessen avatar Sep 02 '24 15:09 ahjohannessen