Skip to content

chore: use bazel 9 by default#3662

Merged
rickeylev merged 5 commits intobazel-contrib:mainfrom
rickeylev:chore.use.bazel.9
Mar 13, 2026
Merged

chore: use bazel 9 by default#3662
rickeylev merged 5 commits intobazel-contrib:mainfrom
rickeylev:chore.use.bazel.9

Conversation

@rickeylev
Copy link
Collaborator

@rickeylev rickeylev commented Mar 12, 2026

Updates the project bazel version and bzlmod examples to use Bazel 9

Along the way, upgrade rules_go to 0.60.0; this is a dev-only dependency. This is needed
because Bazel 9 removed CcInfo, and earlier rules_go versions refer to the builtin symbol.

Also remove the test to check the bazel version. It doesn't do much useful.

@rickeylev rickeylev requested a review from aignas as a code owner March 12, 2026 03:56
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request upgrades the project's Bazel dependency to version 9.x across the main configuration and its bzlmod examples. This update ensures that the project leverages the latest features, performance improvements, and bug fixes provided by Bazel 9, enhancing the build system's efficiency and reliability.

Highlights

  • Default Bazel Version Update: The project's default Bazel version has been updated from 8.x to 9.x, aligning the main development environment with the latest stable release.
  • Bzlmod Example Version Update: The Bazel version used within the bzlmod examples has been updated from 7.x to 9.x, ensuring consistency and compatibility with the new default.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .bazelversion
    • Updated the default Bazel version from 8.x to 9.x.
  • examples/bzlmod/.bazelversion
    • Updated the Bazel version for bzlmod examples from 7.x to 9.x.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the default Bazel version to 9.x. However, a related constant BAZEL_VERSION in version.bzl was not updated, which will cause an inconsistency in the repository. I've added a specific comment about this necessary change.

@@ -1 +1 @@
8.x
9.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change is incomplete. The BAZEL_VERSION constant in version.bzl should also be updated to "9.x" to match this file. The comment at line 19 of version.bzl explicitly states that it should be kept in sync with .bazelversion.

@rickeylev
Copy link
Collaborator Author

I've gone and remove the assert_bazelversion test. I don't see the value in test that validates the .bazelversion file against the currently running bazel. We have a bunch of cases where they wouldn't be the same (I.e. two thirds of our CI jobs)

@rickeylev rickeylev added this pull request to the merge queue Mar 13, 2026
Merged via the queue into bazel-contrib:main with commit 2c50daf Mar 13, 2026
4 checks passed
@rickeylev rickeylev deleted the chore.use.bazel.9 branch March 13, 2026 03:16
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.

2 participants