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

How do you use protoc with 0.48.0? #3948

Closed
johanbrandhorst opened this issue May 23, 2024 · 4 comments
Closed

How do you use protoc with 0.48.0? #3948

johanbrandhorst opened this issue May 23, 2024 · 4 comments

Comments

@johanbrandhorst
Copy link
Contributor

johanbrandhorst commented May 23, 2024

My repository attempted to auto-upgrade to 0.48.0 and apparently you now need to "supply protoc as a toolchain"? What does this mean? I've tried various permutations for upgrading my WORKSPACE but can't get it to work. The error I'm seeing is:

ERROR: Skipping '//:gazelle': error loading package '': at /github/home/.cache/bazel/_bazel_root/13dc60d22ee138725abf21b91435297b/external/io_bazel_rules_go/proto/compiler.bzl:20:5: cannot load '@@rules_proto//proto:proto_common.bzl': no such file
ERROR: error loading package '': at /github/home/.cache/bazel/_bazel_root/13dc60d22ee138725abf21b91435297b/external/io_bazel_rules_go/proto/compiler.bzl:20:5: cannot load '@@rules_proto//proto:proto_common.bzl': no such file

Log here: https://github.com/grpc-ecosystem/grpc-gateway/actions/runs/9203675557/job/25315659356?pr=4356.

The PR changes are here: grpc-ecosystem/grpc-gateway#4356. Any advice would be appreciated.

@johanbrandhorst
Copy link
Contributor Author

Perhaps related: bazelbuild/rules_proto#212? If there's some magic change I need to upgrade both of these together, that would also be fine.

@fmeum
Copy link
Collaborator

fmeum commented May 23, 2024

I just added rules_proto 6.0.0 or later as a new requirement to the release notes. Could you test whether that fixes the problem for you?

As long as you don't flip --incompatible_enable_proto_toolchain_resolution, you don't need to register any proto toolchains yourself.

I would highly recommend switching to MODULE.bazel with its proper version resolution for transitive dependencies.

@johanbrandhorst
Copy link
Contributor Author

Thanks for the quick reply, updating rules_go and rules_proto simultaneously seems to work!

@johanbrandhorst
Copy link
Contributor Author

Seeing a different error in rules_proto now actually but not sure it has anything to do with rules_go, just posting it here in case anyone else sees it too: bazelbuild/rules_proto#212.

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