Skip to content
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

Support using precompiled protoc binaries #2902

Closed
rmohr opened this issue Jun 30, 2021 · 5 comments
Closed

Support using precompiled protoc binaries #2902

rmohr opened this issue Jun 30, 2021 · 5 comments

Comments

@rmohr
Copy link
Contributor

rmohr commented Jun 30, 2021

What version of rules_go are you using?

v0.27

What version of gazelle are you using?

v0.23

What version of Bazel are you using?

3.7.2

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Any other potentially useful information about your toolchain?

What did you do?

When switching locally branches in a project which rules_go we spend quite some time recompiling protoc over and over.

What did you expect to see?

It would be great if rules_go could work with precompiled protoc versions, like described in bazelbuild/rules_proto#36 and for example implemented at bazelbuild/rules_scala#1142 for the scala rules.

What did you see instead?

protoc gets compiled every time we switch a branch.

@achew22
Copy link
Member

achew22 commented Jun 30, 2021

I think improving rules_go like this would be a great first contribution to the project! How can I help you get into a position where you can effectuate this change?

As a side note, since WORKSPACE files are not imported from projects, only .bzl files that you explicitly load, I don't believe there is any action her to unblock consumers. Is that correct?

@rmohr
Copy link
Contributor Author

rmohr commented Jun 30, 2021

Thanks for your response. I can try to have a look. My fist guess would be that if we are lucky wrapping some dependencies in a bzl file with a maybe could already solve the issue. I tried to modify the workspace file of our Project to use the precompiled versions but it looked like rules_go is somehow pulling in the dependencies still. Would be great if you have a few pointers in mind.

@achew22
Copy link
Member

achew22 commented Jun 30, 2021

I can tell you that my project already uses the precompiled protoc and we don't patch rules_go at all. Maybe you could describe what you've tried already?

@rmohr
Copy link
Contributor Author

rmohr commented Jun 30, 2021

I can tell you that my project already uses the precompiled protoc and we don't patch rules_go at all.

That sounds great. How exactly did you set it up?

I did a similar thing like described here: bazelbuild/rules_proto#36 (comment).

I can share my exact changes tomorrow.

@rmohr
Copy link
Contributor Author

rmohr commented Jul 1, 2021

@achew22 thanks for your responses. I tried it again. I don't know what I did wrong before, but now it is working: kubevirt/kubevirt#5959

@rmohr rmohr closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants