Repository navigation
bazel: Add proto_library rules for well known types. Fixes #2763 - #3594
Conversation
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
1 similar comment
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
There was a problem hiding this comment.
Is this prefix needed to avoid conflict? If not it seems better to just use the simpler name.
There was a problem hiding this comment.
We can also just use the simpler name. SGTM.
There was a problem hiding this comment.
Let's use the simpler version then. Can you update this pull request?
097e331 to
4ba1e0d
Compare
|
Updated. Please take another look @xfxyjwf |
There was a problem hiding this comment.
Can you add a comment to explain how to use these protos? An example should be good enough.
…ffers#2763 Adds a proto_library rule for each well known type proto: $ bazel query "filter(\".*_proto$\", \"...\")" //:wrappers_proto //:timestamp_proto //:struct_proto //:field_mask_proto //:empty_proto //:duration_proto //:compiler_plugin_proto //:descriptor_proto //:api_proto //:type_proto //:source_context_proto //:any_proto Bazel users can reference these proto_library rules for their own language specific rules i.e. java_proto_library( name = "any_java_proto", deps = ["@com_google_protobuf//:any_proto"], ) Also set the workspace name to "com_google_protobuf", as proto_library rules reference protobuf that way.
4ba1e0d to
699c0eb
Compare
|
Thanks! |
The example utilizes native bazel rules (proto_library, cc_proto_library, java_proto_library, java_lite_proto_library) to show how easy it is to build protobuf with bazel's native support. It also makes use of well known types which was not possible until the latest bazel 0.5.4 release and protocolbuffers#3594 .
We want this fix: protocolbuffers/protobuf#3594
Adds a proto_library rule for each well known type proto:
Bazel users can reference these proto_library rules for their own
language specific rules i.e.
Also set the workspace name to
"com_google_protobuf", as proto_libraryrules reference protobuf that way.