eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
34 stars 25 forks source link

Enable generic service generation in C++ #235

Closed gregmedd closed 1 month ago

gregmedd commented 2 months ago

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

This is necessary for implementing L3 clients

gregmedd commented 2 months ago

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

stevenhartley commented 2 months ago

@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.

gregmedd commented 2 months ago

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.