-
-
Notifications
You must be signed in to change notification settings - Fork 287
Use released protoc binaries #1142
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
Avoid compiling protoc during bazel build. Based on change in rules_proto bazelbuild/rules_proto#36 rules_proto_dependencies() declares a @com_google_protobuf//:protoc which points to released protoc binary. The tricks is to load that before scala_repositories() which has conditional load for @com_google_protobuf
ittaiz
left a comment
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.
Thanks!
2 questions:
- If existing clients don't have this will they break?
- Update the readme?
Clients won't break.
Ok I'll remove current recommendation for |
I think it's more important to explain in the REDAME what's going on. I would say that this change in the first place is intended for |
|
Why? Maybe I'm missing the point here. Is this really only meant for rules_scala development or do you just want to keep it internal until the repository.bzl refactor? |
|
At the moment |
|
Then why do we need to load them twice? |
|
It's loaded twice because I didn't want to change existing macro and break users. Well technically it isn't loaded twice because definition in macro is guarded by the if. I had to define rules_proto before scala_repositories macro because it contains definition for com_google_protobuf and I want to use definition of com_google_protobuf from rules_proto. Guys can we agree that I'll revert readme change. And will treat this PR as an optimization for rules_scala build. And I'll look at repository.bzl refactoring to align setup of rules_scala and what user have to setup. |
|
Or feel free to close this PR if you think it should be done as a "proper refactoring of repositories.bzl" |
|
Let's revert the PR and merge. |
This reverts commit b9a3606.
* Use released protoc binaries Avoid compiling protoc during bazel build. Based on change in rules_proto bazelbuild/rules_proto#36 rules_proto_dependencies() declares a @com_google_protobuf//:protoc which points to released protoc binary. The tricks is to load that before scala_repositories() which has conditional load for @com_google_protobuf * lint fix * Align rules_proto versions * Update readme * Revert "Update readme" This reverts commit b9a3606.
* Use released protoc binaries Avoid compiling protoc during bazel build. Based on change in rules_proto bazelbuild/rules_proto#36 rules_proto_dependencies() declares a @com_google_protobuf//:protoc which points to released protoc binary. The tricks is to load that before scala_repositories() which has conditional load for @com_google_protobuf * lint fix * Align rules_proto versions * Update readme * Revert "Update readme" This reverts commit b9a3606.
Description
Based on change in rules_proto
bazelbuild/rules_proto#36
rules_proto_dependencies()declares a@com_google_protobuf//:protocwhich points to released
protocbinary.The tricks is to load that before
scala_repositories()which hasconditional load for
@com_google_protobufMotivation
Avoid compiling
protocduringbazel build.