From 2b8011fb054c15a21a7ef8b5dfe575cebaa77ac7 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 9 Sep 2025 12:20:36 -0500 Subject: [PATCH] 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. Also includes some of the version bumps from https://github.com/bazelbuild/bazel-central-registry/pull/4879. Signed-off-by: Brentley Jones --- BUILD.bazel | 6 +++--- MODULE.bazel | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 86301f4eec6..1f548b9bb3b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -378,16 +378,16 @@ cc_library( name = "_InstructionCounter", srcs = glob(["Sources/_InstructionCounter/src/*.c"]), hdrs = glob(["Sources/_InstructionCounter/include/*.h"]), + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], includes = ["Sources/_InstructionCounter/include"], - tags = ["swift_module=_InstructionCounter"], visibility = ["//visibility:private"], ) cc_library( name = "_SwiftLibraryPluginProviderCShims", hdrs = glob(["Sources/_SwiftLibraryPluginProviderCShims/include/*.h"]), + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], includes = ["Sources/_SwiftLibraryPluginProviderCShims/include"], - tags = ["swift_module=_SwiftLibraryPluginProviderCShims"], visibility = ["//visibility:private"], ) @@ -395,8 +395,8 @@ cc_library( name = "_SwiftSyntaxCShims", srcs = glob(["Sources/_SwiftSyntaxCShims/*.c"]), hdrs = glob(["Sources/_SwiftSyntaxCShims/include/*.h"]), + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], includes = ["Sources/_SwiftSyntaxCShims/include"], - tags = ["swift_module=_SwiftSyntaxCShims"], visibility = ["//visibility:private"], ) diff --git a/MODULE.bazel b/MODULE.bazel index 957b5b67d67..2557653456d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,5 +17,10 @@ module( ) bazel_dep(name = "apple_support", version = "1.13.0", repo_name = "build_bazel_apple_support") -bazel_dep(name = "rules_apple", version = "3.3.0", repo_name = "build_bazel_rules_apple") -bazel_dep(name = "rules_swift", version = "1.18.0", max_compatibility_level = 2, repo_name = "build_bazel_rules_swift") +bazel_dep(name = "rules_apple", version = "4.0.1", repo_name = "build_bazel_rules_apple") +bazel_dep( + name = "rules_swift", + version = "2.9.0", + max_compatibility_level = 3, + repo_name = "build_bazel_rules_swift", +)