Skip to content

Conversation

@glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented May 26, 2020

Motivation:

We currently generate conformance to GRPCProtobufPayload based on the
input and output types of rpcs defined in .proto files passed to the
plugin. This works in some situations, including when the .proto file
for the message in question is not present (such as those provided by
the SwiftProtobuf library; Google_Protobuf_*). However this is
problematic if the plugin is invoked on a file-by-file basis where each
file contains the message since the conformance would be erroneously
generated mulutple times.

Modifications:

  • Provide conformance to all Google_Protobuf_* messages currently
    vendored by SwiftProtobuf
  • Generaate conformance only based on the messages defined in each
    .proto file
  • Add a few generation tests

Result:

Multiple conformance generation is avoided in the scenario set out
above.

Motivation:

We currently generate conformance to `GRPCProtobufPayload` based on the
input and output types of `rpc`s defined in .proto files passed to the
plugin. This works in some situations, including when the .proto file
for the message in question is not present (such as those provided by
the SwiftProtobuf library; `Google_Protobuf_*`). However this is
problematic if the plugin is invoked on a file-by-file basis where each
file contains the message since the conformance would be erroneously
generated mulutple times.

Modifications:

- Provide conformance to all `Google_Protobuf_*` messages currently
  vendored by `SwiftProtobuf`
- Generaate conformance only based on the `message`s defined in each
  .proto file
- Add a few generation tests

Result:

Multiple conformance generation is avoided in the scenario set out
above.
@glbrntt glbrntt added nio 🔨 semver/patch No public API change. labels May 26, 2020
@glbrntt
Copy link
Collaborator Author

glbrntt commented May 26, 2020

Resolves #801

@glbrntt glbrntt requested a review from Lukasa May 26, 2020 10:53
@glbrntt glbrntt merged commit 3109a71 into grpc:master May 26, 2020
@glbrntt glbrntt deleted the gb-protobuf-conformance branch June 8, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants