Skip to content

Feature request: Provide a way to make sure that their code does not break when services add new rpcs. #2318

@hsaliak

Description

@hsaliak

When a gRPC service is defined in a proto a corresponding interface is generated. A user is expected to implement this interface.
When the proto is updated to add a new API method, the interface generated changes.
Any struct that implements that interface is no longer in conformance. Therefore, the code breaks.

I would expect the structs to be forward compatible.

This can potentially be solved by the code generating a dummy struct that implements the interface. Users can then embed that struct and only implement the methods they care about, effectively overriding the default methods.

Metadata

Metadata

Assignees

Labels

P2Type: FeatureNew features or improvements in behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions