Switch to "protobuf" module when generating proto_library rules#2284
Switch to "protobuf" module when generating proto_library rules#2284jayconrod merged 15 commits intobazel-contrib:masterfrom
Conversation
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
|
+1 for doing this, even if we may have to migrate again at some point in the future if protobuf is split up. |
jayconrod
left a comment
There was a problem hiding this comment.
Thanks for doing this. One small comment about the module name, but it will affect lots of files.
Please update Let's drop the |
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
buildtools/labels/BUILD.bazel already contains Bazel files, so the dependency is set directly on the go_library(name = "labels") instead of its "go_default_library" alias. Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Co-authored-by: Jay Conrod <jayconrod@gmail.com>
Done 👍 |
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
jayconrod
left a comment
There was a problem hiding this comment.
Looks good. One more minor comment.
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
What does this PR do? Advances the gazelle git_override from Feb 13 to Feb 26, 2026 (6b2aeccd → a3e63b06). Motivation bazel-contrib/bazel-gazelle#2284 (Feb 20, 2026) switches the proto language extension from the deprecated rules_proto module to the protobuf module when generating proto_library load statements. Without this, generated BUILD.bazel files carry a dependency on rules_proto that should no longer be required.
### What does this PR do? Advance `git_override` for `gazelle` from Feb 13 to Feb 26, 2026. ### Motivation This eliminates a source of discrepancy when generating `BUILD.bazel` files dealing with code generation. bazel-contrib/bazel-gazelle#2284 indeed switches the proto language extension from the _deprecated_ `rules_proto` module to the `protobuf` module when generating `load` statements for `proto_library`. Without this, generated `BUILD.bazel` files carry a dependency on `rules_proto` that should no longer be required. Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
### What does this PR do? Bump `gazelle` from 0.47.0 to 0.48.0 and drop the `git_override` that pinned to an unreleased commit on their `master`. ### Motivation v0.48.0 ships both fixes the override was waiting for: - bazel-contrib/bazel-gazelle#2274 - bazel-contrib/bazel-gazelle#2284 ### Describe how you validated your changes `bazel run //:gazelle` produces no change.
### What does this PR do? Bump `gazelle` from 0.47.0 to 0.48.0 and drop the `git_override` that pinned to an unreleased commit on their `master`. ### Motivation v0.48.0 ships both fixes the override was waiting for: - bazel-contrib/bazel-gazelle#2274 - bazel-contrib/bazel-gazelle#2284 ### Describe how you validated your changes `bazel run //:gazelle` produces no change. Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
What type of PR is this?
What package or component does this PR mostly affect?
What does this PR do? Why is it needed?
Because
"rules_proto"is a deprecated module,proto_libraryrule should be fetched from the"protobuf"module. This change updatesApparentLoads()method forprotoextension and updates the test scenarios accordingly. Moreover,rules_protois not mentioned inREADME.mdanymore; now it refers toprotobuf.Which issues(s) does this PR fix?
Fixes #2283
Other notes for review
I wasn't sure if
"rules_proto"should also be removed fromMODULE.bazel. It looks likebazel test //...passes after removing both"rules_proto"and"protobuf"fromMODULE.bazel. But I see those may be required by the submodules:tests/bcr/go_modandtests/bcr/go_work.