Skip to content

Migrate remaining native rules for Bazel 9 - #174

Draft
dzbarsky wants to merge 1 commit into
google:masterfrom
dzbarsky:codex/bazel9-compatibility
Draft

Migrate remaining native rules for Bazel 9#174
dzbarsky wants to merge 1 commit into
google:masterfrom
dzbarsky:codex/bazel9-compatibility

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Aug 23, 2026

Copy link
Copy Markdown

Adapt cloud-spanner-emulator#374 to GoogleSQL: explicitly load the remaining C++, Java, proto, and shell rules in GoogleSQL-owned BUILD files, BUILD overlays, and execute_query_test; declare the required module dependencies; and add the temporary autoload fallback for unchanged third-party BUILD files. Include the separate Bazel example and keep the pinned Bazel 7.6.1 version. GoogleSQL uses Textmapper, so the emulator's JavaCC changes are not included.

Validation: package-loading queries pass for GoogleSQL and its example under Bazel 7.6.1, and for a separate Bazel 9.0.0 consumer with a test-only rules_swift 3.1.2 override. Ordinary Bazel 9 resolution is blocked by the existing gRPC/Bazel rules_swift compatibility-level mismatch; the override is not included in this PR. Compilation and runtime tests were not run.

Tracking issue: #177.

GoogleSQL's contribution guide asks for issues rather than external code contributions. This draft provides the proposed implementation for maintainers to incorporate internally. Consuming root modules do not inherit GoogleSQL's .bazelrc and may still need the third-party autoload flag.

-zbarskybot

Load C++, Java, proto, and shell rules explicitly in the remaining
GoogleSQL BUILD files and BUILD overlays. Declare rules_shell in the root
module and rules_cc in the example module, and replace native.sh_test in
execute_query_test. Add the temporary C++/proto autoload fallback for
unchanged third-party BUILD files in both Bazel configurations.

Adapt GoogleCloudPlatform/cloud-spanner-emulator#374 to GoogleSQL.
Keep the pinned Bazel 7.6.1 version; GoogleSQL has no JavaCC changes.

Validation: package-loading queries pass for GoogleSQL and its example
under Bazel 7.6.1. A separate Bazel 9.0.0 consumer passes with a test-only
rules_swift 3.1.2 override. Ordinary Bazel 9 module resolution remains
blocked by the existing gRPC/Bazel rules_swift compatibility mismatch;
the override is not part of this change. No compilation or runtime tests
were run.
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