-
Notifications
You must be signed in to change notification settings - Fork 3.9k
bazel,grpclb: add a bazel build definition #3939
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
Conversation
+1. That's what I was hoping to do.
Yeah. That's going to be a pain. Just before the holidays @carl-mastrangelo and I were figuring out how we wanted to handle that, because we have that problem internally as well. I think the plan was to generally rely on https://github.com/grpc/grpc-proto for any protos shared between repositories. Those protos could have the proper imports and we'd have copies in the repo for only gradle to use. We'd still have to figure out something for testing and java-specific protos, since they wouldn't live in grpc-proto. We could maybe just use genrule()+sed to rewrite them. |
grpclb/BUILD.bazel
Outdated
|
|
||
| java_proto_library( | ||
| name = "load_balancer_java_proto", | ||
| deps = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit for in the future: I've been preferring to put the srcs and deps for *_{grpc,proto}_library on one line, since they will normally only have one element and there can be a ton of those rules, for the various languages.
This formatting is still acceptable, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it, please wait for the merging 🙇
5e5d07b to
2d73955
Compare
|
fixed, PTAL.
It is very interesting for me :) I have tried to add |
|
@zhangkun83, could you also review this? |
add a bazel build definition to grpclb.
I think
src/generatedwas created for resolving this issue #357 then I did not add generated files. I just usejava_grpc_library.But Bazel requires a full path from WORKSPACE in a proto file (https://github.com/cgrushko/proto_library/blob/04369f0d2ade8c8566727e0b6f3a53f1ba8925c0/src/person.proto#L5) for importing other proto files.
In this PR, it does not relate, but services will require a full path (master...jyane:add-services-bazel#diff-afc0c0ce1aad649c36404301917e883cR21)
"Do not add generated files" or "Use generated files in Bazel" which is better for now?