From ec79396acf84424f054d7c61c19fcf6c27bf9318 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Mon, 5 Feb 2024 08:45:26 -0500 Subject: [PATCH] Fix Bazel compatibility (#804) * Add `.bazelversion` to pin the version of bazel used in CI * Configure Apple CC toolchain --- .bazelversion | 1 + .gitignore | 1 + MODULE.bazel | 10 +++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .bazelversion diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..66ce77b7 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.0.0 diff --git a/.gitignore b/.gitignore index eccc4ce0..cbe7fcda 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ SourceKittenFramework.framework.zip # Bazel bazel-* +/MODULE.bazel.lock # vim .*.sw? diff --git a/MODULE.bazel b/MODULE.bazel index dbb2eccb..50f32416 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,8 +4,12 @@ module( compatibility_level = 1, ) -bazel_dep(name = "platforms", version = "0.0.6", dev_dependency = True) -bazel_dep(name = "rules_swift", version = "1.8.0", repo_name = "build_bazel_rules_swift") +bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True) +bazel_dep(name = "apple_support", version = "1.11.1", repo_name = "build_bazel_apple_support") +bazel_dep(name = "rules_swift", version = "1.15.1", repo_name = "build_bazel_rules_swift") bazel_dep(name = "swift_argument_parser", version = "1.2.1", repo_name = "sourcekitten_com_github_apple_swift_argument_parser") bazel_dep(name = "swxmlhash", version = "7.0.2", repo_name = "sourcekitten_com_github_drmohundro_SWXMLHash") -bazel_dep(name = "yams", version = "5.0.5", repo_name = "sourcekitten_com_github_jpsim_yams") +bazel_dep(name = "yams", version = "5.0.6", repo_name = "sourcekitten_com_github_jpsim_yams") + +apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension") +use_repo(apple_cc_configure, "local_config_apple_cc")