-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature: Generate protos using a user defined prost_build::Config #317
Comments
Hmm it used to? |
@SkamDart everything seems to compile fine if I include prost-types as a dependency? Is there a specific reason that doesn't work for you? I do think we can include a way for users to manually use the prost config, I'll open a PR for that. |
Ok Pr has been merged to support custom prost configs #318 |
@LucioFranco Incredible. Thank you very much! I was going to happily do the dev work myself but you beat me to it. |
As for why it doesn't compile without that? It's likely that, I'm not including prost-types. |
@SkamDart yup, if you look at the error it shoudl say its looking for prost-types but its not included in the cargo.toml. |
Feature Request
Add the ability to compile protos using a user defined prost_build::Config.
Crates
tonic-build
Motivation
#314 beat me to opening a similar issue. I have a repro here for failing to compile google protobuf types.
prost provides the ability to compile_well_known_types to generate their well known types from the corresponding
.proto
files. However, the tonic-build crate uses the default constructorProposal
Add an additional function,
compile_with_builder
similar to tonic_build::compile that includes a parameter for a user definedprost_build::Config
.Alternatives
If we want to solve a subset of the problem, we could call the
compile_well_known_types
for all builds.FWIW - I'm probably missing or some reason why you didn't do this originally.
The text was updated successfully, but these errors were encountered: