Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publicize prost service generator #612

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

nick-mobilecoin
Copy link
Contributor

@nick-mobilecoin nick-mobilecoin commented Feb 17, 2023

Make the prost service generator available to clients. This allows
clients to customize how the underlying prost build is invoked.

Signed-off-by: Nick Santana nick@mobilecoin.com


name: Publicize Prost Service Generator
about: Makes the prost generator a public struct


Description of feature:
The prost service generator is now public, allowing clients finer grain control on the prost build behavior.

Implementation:
The initial desire for this was to allow us to build just the services, while re-using the messages. The current grpcio_compiler::prost_codegen::compile_protos() function would either fail to build when local protos were excluded from the include path, or generate the local proto messages to the generated services.
Making the Generator public seemed like the best way to meet this current need and also allow future customers to customize the prost build behavior while still generating the grpcio services.

Expanding the availability of the Generator looks to be limited to making the ServiceGenerator trait methods also available. It doesn't seem to be exposing anything else from the internals.

Checklist:

The CI will check all of these, but you'll need to have done them:

  • cargo fmt -- --check passes.
  • cargo +nightly clippy has no warnings.
  • cargo test passes.

Make the prost service generator available to clients. This allows
clients to customize how the underlying prost build is invoked.

Signed-off-by: Nick Santana <nick@mobilecoin.com>
@BusyJay BusyJay merged commit 4b76b86 into tikv:master Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants