Skip to content

fix: restore Bazel proto_library rules broken by Bzlmod migration#11

Closed
fcostaoliveira wants to merge 4 commits into
masterfrom
fix/bazel-proto-bzlmod
Closed

fix: restore Bazel proto_library rules broken by Bzlmod migration#11
fcostaoliveira wants to merge 4 commits into
masterfrom
fix/bazel-proto-bzlmod

Conversation

@fcostaoliveira

Copy link
Copy Markdown

Summary

After a dormant period, CI began failing on both build-and-test and test-deb-build jobs with:

ERROR: name 'proto_library' is not defined
ERROR: name 'cc_proto_library' is not defined
ERROR: package contains errors: src/quipper

Root cause: Under Bzlmod, proto_library and cc_proto_library are no longer globally available as native rules. They must be explicitly loaded from the @protobuf module (protobuf 21+/Bzlmod requirement). Both src/quipper/BUILD and src/BUILD were using these rules without the required load(...) statements.

Changes

Added the following two load statements at the top of both src/quipper/BUILD and src/BUILD:

load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")

The MODULE.bazel already correctly declares protobuf as a bazel_dep (version 31.1) — no changes needed there. Only the BUILD file load statements were missing.

Test plan

  • build-and-test CI job passes (bazel build + test on //src:all //src/quipper:all)
  • test-deb-build CI job passes (the deb build script calls bazel under the hood)

@fcostaoliveira

Copy link
Copy Markdown
Author

Superseded by #13 which includes the complete fix: rules_proto, rules_cc, and .bazelversion pinned to Bazel 8.0.0.

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

Successfully merging this pull request may close these issues.

1 participant