From fef5111c7332f9755345583bf5edfedf5deecf9d Mon Sep 17 00:00:00 2001 From: Luis Padron Date: Wed, 10 Jul 2024 10:19:48 -0400 Subject: [PATCH] Use aspect hint for CYaml in Bazel rules_swift 2.0 requires using the `aspect_hints` attribute to specify interop between `cc_library` and `swift_library`. This change adds the `aspect_hints` attribute to the `cc_library` rule for CYaml. It increases the minimum supported rules_swift version to 2.0 --- BUILD | 2 +- MODULE.bazel | 4 ++-- 2 files changed, 3 insertions(+), 3 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 cf7ab293..b7c3e41a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,7 +5,7 @@ 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 = 2) +bazel_dep(name = "rules_swift", version = "2.0.0", repo_name = "build_bazel_rules_swift") 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 = "3.6.0", dev_dependency = True)