From 7efe4a42b6351cbc4b639303a57db06e532ed9fd Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 9 Oct 2024 07:49:44 -0700 Subject: [PATCH] Revert "Revert "feat: start testing on Bazel 8 (#401)" (#404)" This reverts commit 87347430e604b153318a0cd0ad613f3746028f7a. --- .github/workflows/ci.yaml | 9 +-------- MODULE.bazel | 1 + docs/BUILD.bazel | 3 +++ docs/format.md | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 760396b8..1887c35f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,18 +18,11 @@ concurrency: jobs: bazel-test: - uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6 + uses: bazel-contrib/.github/.github/workflows/bazel.yaml@bazel8 with: folders: '[".", "example"]' # Don't try for Windows support yet. exclude_windows: true - # Root module is bzlmod-only and uses newer stardoc that requires Bazel 7. - # Example uses incompatible_enable_proto_toolchain_resolution - exclude: | - [ - {"bzlmodEnabled": false, "folder": "."}, - {"bazelversion": "6.4.0"} - ] integration-test: runs-on: ubuntu-latest diff --git a/MODULE.bazel b/MODULE.bazel index ed6f3f66..235dc03f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,6 +12,7 @@ bazel_dep(name = "aspect_bazel_lib", version = "2.7.7") # Minimum version needs 'chore: bump bazel-lib to 2.0 by @alexeagle in #1311' # to allow users on bazel-lib 2.0 bazel_dep(name = "aspect_rules_js", version = "1.40.0") +bazel_dep(name = "bazel_features", version = "1.18.0") bazel_dep(name = "bazel_skylib", version = "1.4.2") bazel_dep(name = "platforms", version = "0.0.7") bazel_dep(name = "rules_multirun", version = "0.9.0") diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 0f7cc148..64084375 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -1,6 +1,7 @@ # This load statement must be in the docs/ package rather than anything users depend on # so that the dependency on stardoc doesn't leak to them. load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs") +load("@bazel_features//private:util.bzl", "lt") stardoc_with_diff_test( name = "lint_test", @@ -35,6 +36,8 @@ stardoc_with_diff_test( stardoc_with_diff_test( name = "format", bzl_library_target = "//format:defs", + # See https://github.com/bazel-contrib/bazel_features/pull/75 + target_compatible_with = ["@platforms//:incompatible"] if lt("8.0.0-pre.20240911.1") else [], ) stardoc_with_diff_test( diff --git a/docs/format.md b/docs/format.md index 15ba0e02..3795a4c7 100644 --- a/docs/format.md +++ b/docs/format.md @@ -101,7 +101,7 @@ Some languages have dialects:
 load("@aspect_rules_lint//format:defs.bzl", "format_multirun")
 
-format_multirun(name, jobs, print_command, disable_git_attribute_checks, kwargs)
+format_multirun(name, jobs, print_command, disable_git_attribute_checks, **kwargs)
 
Create a [multirun] binary for the given languages. @@ -135,7 +135,7 @@ To check formatting with `bazel test`, use [format_test](#format_test) instead.
 load("@aspect_rules_lint//format:defs.bzl", "format_test")
 
-format_test(name, srcs, workspace, no_sandbox, disable_git_attribute_checks, tags, kwargs)
+format_test(name, srcs, workspace, no_sandbox, disable_git_attribute_checks, tags, **kwargs)
 
Create test for the given formatters.