up-spec icon indicating copy to clipboard operation
up-spec copied to clipboard

Enable generic service generation in C++

Open gregmedd opened this issue 1 year ago • 3 comments

See https://protobuf.dev/reference/cpp/cpp-generated/#service

This is necessary for implementing L3 clients

gregmedd avatar Aug 17 '24 00:08 gregmedd

@stevenhartley - should this target main, or do you want me to create a release / bugfix branch off of the alpha.3 tag?

gregmedd avatar Aug 17 '24 00:08 gregmedd

@stevenhartley - should this target main, or do you want me to create a release / bugfix branch off of the alpha.3 tag?

Not sure what you mean by this issue, all we need is in the generated protoc code.

stevenhartley avatar Aug 17 '24 13:08 stevenhartley

Not sure what you mean by this issue, all we need is in the generated protoc code.

The generated C++ code from protoc does not include any of the service information by default. It must be enabled by adding the cc_generic_services = true setting to .proto files containing service descriptions.

The only alternative offered for C++ service code generation in the protobuf documentation is to implement a custom code generator plugin.

Since a change to the .proto files is required, and the uProtocol libraries are using 1.6.0-alpha3 right now, I wanted to know if we should branch off of the alpha3 tag to make this a small bug fix (maybe tagged 1.6.0-alpha3.1) or if this should be merged to main.

If this is merged to main, up-cpp would have to consume up-spec main until the next tagged release.

gregmedd avatar Aug 17 '24 15:08 gregmedd