From 24c4b348b4b8ec6cff54a3b5f0f49d63851b16fb Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 9 Sep 2025 12:07:36 -0500 Subject: [PATCH 1/4] Use an aspect hint instead of the `swift_module` tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed when using rules_swift 2.x+, otherwise inputs aren’t properly tracked and RBE doesn’t work. Signed-off-by: Brentley Jones --- BUILD | 2 +- MODULE.bazel | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BUILD b/BUILD index c13d7260..8a05a013 100644 --- a/BUILD +++ b/BUILD @@ -7,11 +7,11 @@ cc_library( "Sources/CYaml/src/*.h", ]), hdrs = ["Sources/CYaml/include/yaml.h"], + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], # Requires because of https://github.com/bazelbuild/bazel/pull/10143 otherwise host transition builds fail copts = ["-fPIC"], includes = ["Sources/CYaml/include"], linkstatic = True, - tags = ["swift_module"], visibility = ["//Tests:__subpackages__"], ) diff --git a/MODULE.bazel b/MODULE.bazel index c520e9f7..c5f35d1f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,7 +5,12 @@ module( ) bazel_dep(name = "apple_support", version = "1.15.1") -bazel_dep(name = "rules_swift", version = "1.18.0", repo_name = "build_bazel_rules_swift", max_compatibility_level = 3) +bazel_dep( + name = "rules_swift", + version = "2.9.0", + repo_name = "build_bazel_rules_swift", + max_compatibility_level = 3, +) bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True) bazel_dep(name = "rules_apple", version = "3.5.1", dev_dependency = True) From dd83472d6c1f829afc40b0b1997c6f2b4f9f7cd3 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 9 Sep 2025 12:22:17 -0500 Subject: [PATCH 2/4] Bump rules_apple as well Signed-off-by: Brentley Jones --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index c5f35d1f..d8780594 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,4 +13,4 @@ bazel_dep( ) bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True) -bazel_dep(name = "rules_apple", version = "3.5.1", dev_dependency = True) +bazel_dep(name = "rules_apple", version = "4.1.2", dev_dependency = True) From acec44a519b8e2839df5d01ddb03e6268e483e1b Mon Sep 17 00:00:00 2001 From: JP Simard Date: Tue, 23 Sep 2025 20:16:38 -0400 Subject: [PATCH 3/4] Only test Swift 6.x for Bazel on CI --- .github/workflows/bazel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 8bc4d7d1..5f89abdd 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -41,7 +41,7 @@ jobs: Linux: strategy: matrix: - tag: ['5.7', '5.8', '5.9', '5.10'] + tag: ['6.0', '6.1', '6.2'] runs-on: ubuntu-latest container: image: swift:${{ matrix.tag }}-focal From 22f93480ddd8009d55ff3d0a383383420a7e1c27 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Tue, 23 Sep 2025 20:17:54 -0400 Subject: [PATCH 4/4] Update bazel.yml --- .github/workflows/bazel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 5f89abdd..a2369a10 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -41,7 +41,7 @@ jobs: Linux: strategy: matrix: - tag: ['6.0', '6.1', '6.2'] + tag: ['6.0', '6.1'] runs-on: ubuntu-latest container: image: swift:${{ matrix.tag }}-focal