-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Add a proto_library rule for well-known types and update the proto_lang_toolchain rules #2763
Comments
@xfxyjwf do you know if you'll get to this in the near term? |
bazelbuild/bazel#2265 is a blocker. |
@cgrushko ah, I kept running into that error and didn't realize it was a bug in bazel. |
bazelbuild/bazel#2265 has been fixed and should be part of the next bazel release. |
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
So is this issue fixed? If so, can I build bazel from HEAD and depend on well-known protos in my proto_library rules? |
hey @thaidn bazelbuild/bazel#2265 has been fixed and reverted again, because it caused trouble inside of google's programming environment. See the bug for details. It's really embarrassing and I apologize for the trouble's this causes. Inside bazel we also need well known types and thus made a simple hack that copies the well known types from |
@buchgr Is a proper fix of this issue depending on b/37798101 (making both internal and external protoc accepts the same file path)? |
Yes, it does. Adding proto_library requires compiling generated files
(because the request to move the well known types one level up the tree was
rejected).
In order to compile generated files we need to pass bazel-bin/ paths, which
require b/37798101.
We can workaround this in a number of ways, not all of which are easy.
…On Fri, May 5, 2017 at 2:10 PM Feng Xiao ***@***.***> wrote:
@buchgr <https://github.com/buchgr> Is a proper fix of this issue
depending on b/37798101 (making both internal and external protoc accepts
the same file path)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2763 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5_YVPtz5J4hQryMjsUQwg9valaZFyiks5r22X9gaJpZM4MMPuw>
.
|
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
Is there any workaround to import well-known protos for now? |
@junghoahnsc |
@buchgr you mean using a patch https://bazel-review.googlesource.com/c/10690 ? Would it be a workaround to have all well-known protos in local repo with BUILD? |
@junghoahnsc yes to both :-). |
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] bazelbuild#2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
In order to use the build event service protobufs we need to support protobufs well known types inside bazel. Unfortunately, due to a bug in bazel's proto_library [1], protobuf can't provide such a proto_library yet [2]. We expect this patch to be committed to protobuf upstream once [1] is resolved. Bazel's proto_library bug [1] is also the reason why this change has to duplicate the well known protos under google/protobuf. [1] #2265 [2] protocolbuffers/protobuf#2763 Change-Id: I5e16d437f2f581f11553049be0b4bcc564f4ad96
I have an example repo defining an extra |
@kamalmarhubi smart to use strip-prefix :-). Anyways, the fix is in bazel upstream again and will be part of the 0.5.4 release. |
So, once 0.5.4 is available, what should we do to make use of this? Will it start to just work automatically? |
Someone needs to add proto_library rules to protobuf's BUILD file :-). I can do that next week. |
Now that bazel 0.5.4 is released, can someone please fix this 😄 |
I am working on a change. |
bazel: Add proto_library rules for well known types. Fixes #2763
Thanks @xfxyjwf ! |
Bazel now has built-in rules for building Java and C++ protos (
proto_libarry
,java_proto_library
,java_lite_proto_library
andcc_proto_library
).For users to import well-known types (e.g.,
descriptor.proto
) from their.proto
files, they must depend on aproto_library
thatsrcs
the former.This FR is about adding such a
proto_library
.#2598 is a blocker.
The text was updated successfully, but these errors were encountered: