Is there an easy way to include well-known types in a protoc compilation?
sigurdm opened this issue · 4 comments
In the Dart protoc plugin we have been requested to include the well-known types with the plugin.
I tend to push back on duplicating the proto files into the plugin, because the protoc compiler itself comes with them (at least when downloaded as a zip-file).
But depending on how protoc is installed it might be hard to know where the protos for the well-known types are located - forcing the user to duplicate the well-known types to their own repo.
Is there (or should there be) a command-line argument to add the well known types to the include path of a protoc invocation, without knowing where protoc is installed, or even include their path by default?
It seems #289 would cover this. But I'm not sure how it works exactly
I know that the go plugin ships with the well-known types . And it might make life easier for users.
Is there an update on this, it would be really useful to have this functionality! 😊
I think combine with docker image to support well-know type :)
@sigurdm Even the python plugin ships with well-known types.
Their setup.py seems to have some code to automatically build the well known types. Specifically, see the run() function.
Maybe dart-lang/protobuf can include this mainline repo as a submodule, and automatically build well-known types, before every pub release?
For questions or troubleshooting, please see the protobuf mailing list: https://groups.google.com/forum/#!forum/protobuf or Stack Overflow https://stackoverflow.com/questions/tagged/protocol-buffers
We don't formally monitor stack overflow, but there are a lot of experienced developers there who also use protobuf.