Skip to content

Support Bazel 8 and 9#6780

Open
SimplyDanny wants to merge 2 commits into
mainfrom
bazel-8
Open

Support Bazel 8 and 9#6780
SimplyDanny wants to merge 2 commits into
mainfrom
bazel-8

Conversation

@SimplyDanny

@SimplyDanny SimplyDanny commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Resolves #6630.

@SimplyDanny SimplyDanny added this to the 0.65.0 milestone Jun 20, 2026
@SwiftLintBot

SwiftLintBot commented Jun 20, 2026

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in the same binary size as when built on main.
📖 Linting Aerial with this PR took 0.68 s vs 0.65 s on main (4% slower).
📖 Linting Alamofire with this PR took 0.91 s vs 0.94 s on main (3% faster).
📖 Linting Brave with this PR took 6.05 s vs 6.02 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 25.8 s vs 25.74 s on main (0% slower).
📖 Linting Firefox with this PR took 10.37 s vs 10.34 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.56 s vs 7.48 s on main (1% slower).
📖 Linting Moya with this PR took 0.37 s vs 0.36 s on main (2% slower).
📖 Linting NetNewsWire with this PR took 2.35 s vs 2.34 s on main (0% slower).
📖 Linting Nimble with this PR took 0.59 s vs 0.54 s on main (9% slower).
📖 Linting PocketCasts with this PR took 6.97 s vs 6.91 s on main (0% slower).
📖 Linting Quick with this PR took 0.35 s vs 0.35 s on main (0% slower).
📖 Linting Realm with this PR took 2.45 s vs 2.46 s on main (0% faster).
📖 Linting Sourcery with this PR took 1.5 s vs 1.56 s on main (3% faster).
📖 Linting Swift with this PR took 4.31 s vs 4.32 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.1 s vs 1.12 s on main (1% faster).
📖 Linting Wire with this PR took 15.17 s vs 15.21 s on main (0% faster).
📖 Linting WordPress with this PR took 9.9 s vs 9.91 s on main (0% faster).

Generated by 🚫 Danger

@SimplyDanny SimplyDanny force-pushed the bazel-8 branch 2 times, most recently from 1359045 to 5136aa5 Compare June 24, 2026 20:17
@SimplyDanny SimplyDanny marked this pull request as ready for review June 24, 2026 20:36
@SimplyDanny SimplyDanny changed the title Require Bazel 8 to build Support Bazel 8 Jun 24, 2026
@SimplyDanny SimplyDanny changed the title Support Bazel 8 Support Bazel 8 and 9 Jun 24, 2026
@SimplyDanny SimplyDanny requested a review from Copilot June 24, 2026 20:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates SwiftLint’s Bazel/Bzlmod configuration and CI to validate/build against Bazel 8 and 9 (in addition to 7), aligning repository defaults and presubmit coverage with the newer Bazel majors.

Changes:

  • Add Bazel version matrices to GitHub Actions CI and BCR presubmit to run builds on Bazel 7/8/9.
  • Update Bzlmod metadata/deps and default Bazel selection (MODULE.bazel, .bazelversion).
  • Adjust Bazel-related tooling paths/flags (Makefile docs target, .bazelrc compression flag).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
MODULE.bazel Updates module metadata for Bazel compatibility and adjusts rules_swift dependency constraints.
Makefile Updates the Bazel-built SourceKitten invocation used for Linux docs generation.
.github/workflows/build.yml Runs Bazel CI on a 7/8/9 matrix.
.bcr/presubmit.yml Expands BCR presubmit to a Bazel 7/8/9 matrix and updates the Linux platform/Swift toolchain download.
.bazelversion Bumps the default Bazelisk-selected Bazel version to 9.x.
.bazelrc Updates remote cache compression flag usage.

Comment thread MODULE.bazel
Comment on lines 1 to 6
module(
name = "swiftlint",
version = "0.64.1",
compatibility_level = 1,
bazel_compatibility = [">=7.0.0"],
repo_name = "SwiftLint",
)
Comment thread MODULE.bazel
bazel_dep(name = "rules_cc", version = "0.2.19")
bazel_dep(name = "rules_shell", version = "0.8.0", repo_name = "build_bazel_rules_shell")
bazel_dep(name = "rules_swift", version = "3.6.1", max_compatibility_level = 3, repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_swift", version = "3.6.1", repo_name = "build_bazel_rules_swift")
Comment thread Makefile
Comment thread .bazelversion
@SimplyDanny

Copy link
Copy Markdown
Collaborator Author

Could you take a look, @keith? Is it especially okay to remove max_compatibility_level and compatibility_level if Bazel 7 is still supported?

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.

Update to bazel 9 ?

3 participants