Skip to content

Commit 04b3f11

Browse files
Use an aspect hint instead of the swift_module tag (#3149)
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 bazelbuild/bazel-central-registry#4879. Signed-off-by: Brentley Jones <[email protected]>
1 parent 6673b05 commit 04b3f11

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,25 +378,25 @@ cc_library(
378378
name = "_InstructionCounter",
379379
srcs = glob(["Sources/_InstructionCounter/src/*.c"]),
380380
hdrs = glob(["Sources/_InstructionCounter/include/*.h"]),
381+
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
381382
includes = ["Sources/_InstructionCounter/include"],
382-
tags = ["swift_module=_InstructionCounter"],
383383
visibility = ["//visibility:private"],
384384
)
385385

386386
cc_library(
387387
name = "_SwiftLibraryPluginProviderCShims",
388388
hdrs = glob(["Sources/_SwiftLibraryPluginProviderCShims/include/*.h"]),
389+
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
389390
includes = ["Sources/_SwiftLibraryPluginProviderCShims/include"],
390-
tags = ["swift_module=_SwiftLibraryPluginProviderCShims"],
391391
visibility = ["//visibility:private"],
392392
)
393393

394394
cc_library(
395395
name = "_SwiftSyntaxCShims",
396396
srcs = glob(["Sources/_SwiftSyntaxCShims/*.c"]),
397397
hdrs = glob(["Sources/_SwiftSyntaxCShims/include/*.h"]),
398+
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
398399
includes = ["Sources/_SwiftSyntaxCShims/include"],
399-
tags = ["swift_module=_SwiftSyntaxCShims"],
400400
visibility = ["//visibility:private"],
401401
)
402402

MODULE.bazel

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@ module(
1717
)
1818

1919
bazel_dep(name = "apple_support", version = "1.13.0", repo_name = "build_bazel_apple_support")
20-
bazel_dep(name = "rules_apple", version = "3.3.0", repo_name = "build_bazel_rules_apple")
21-
bazel_dep(name = "rules_swift", version = "1.18.0", max_compatibility_level = 2, repo_name = "build_bazel_rules_swift")
20+
bazel_dep(name = "rules_apple", version = "4.0.1", repo_name = "build_bazel_rules_apple")
21+
bazel_dep(
22+
name = "rules_swift",
23+
version = "2.9.0",
24+
max_compatibility_level = 3,
25+
repo_name = "build_bazel_rules_swift",
26+
)

0 commit comments

Comments
 (0)