Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

No substitutions for well-known types #133

Open
ysimonson opened this issue Mar 8, 2019 · 2 comments
Open

No substitutions for well-known types #133

ysimonson opened this issue Mar 8, 2019 · 2 comments
Labels

Comments

@ysimonson
Copy link

Prost substitutes protobuf well-known types, but because tower-grpc-build's Config::generate doesn't use prost's built-in Config::generate, those substitutions never occur. As a result, protobufs that use well-known types will fail to compile with tower-grpc-build, producing errors like this:

error[E0433]: failed to resolve: maybe a missing `extern crate google;`?
   --> /Users/yusuf/work/pachyderm/target/debug/build/pachyderm-20082e160c80a681/out/pfs_1_7.rs:930:123
    |
930 |         pub fn get_tag<R>(&mut self, request: grpc::Request<Tag>) -> grpc::server_streaming::ResponseFuture<super::super::google::protobuf::BytesValue, T::Future>
    |                                                                                                                           ^^^^^^ maybe a missing `extern crate google;`?

As a workaround, I'm replacing references to super::super::google::protobuf::... with their equivalents in our build.rs.

@seanmonstar
Copy link
Contributor

I think this may be the same #81? It seems like a good idea to allow configuring the usage of well known types.

@ysimonson
Copy link
Author

@seanmonstar I'm not sure. It seems that in #81 the substitution is kinda-sorta happening for a well-known type, which suggests that my assumption about substitutions not working is wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants