Skip to content

Commit a7dcd56

Browse files
authored
MODULE.bazel: update apple_support/local_config_* comments per review
1 parent 720f41a commit a7dcd56

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

‎MODULE.bazel‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
3333
bazel_dep(name = "rules_rust", version = "0.69.0")
3434
bazel_dep(name = "rules_swift", version = "4.0.0-rc4")
3535
bazel_dep(name = "swift-syntax", version = "602.0.0.bcr.2")
36+
3637
# Direct dep on `apple_support` (transitively pulled in by `rules_swift`) so we
3738
# can `use_repo` `local_config_xcode` and `local_config_apple_cc_toolchains`
38-
# below, needed by the `swift_macos` bazelrc config that makes
39-
# `xcode_swift_toolchain` work on macOS. See `.bazelrc`.
39+
# below. These repos are referenced by the per-target Xcode-config transition
40+
# in `unified/swift-syntax-rs/xcode_transition.bzl` (primary mechanism) and by
41+
# the opt-in `swift_macos` bazelrc config (manual escape hatch). See
42+
# `.bazelrc`.
4043
bazel_dep(name = "apple_support", version = "2.6.1")
41-
4244
bazel_dep(name = "zstd", version = "1.5.7.bcr.1")
4345

4446
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
@@ -248,18 +250,20 @@ register_toolchains(
248250
"@swift_toolchain//:swift_toolchain_exec_ubuntu24.04",
249251
)
250252

251-
# `apple_support`'s xcode_config, selected via `--xcode_version_config` in
252-
# the `swift_macos` bazelrc config (see `.bazelrc`). Needed because
253-
# rules_swift's `system_sdk` selects use Xcode version strings from
254-
# `apple_support`'s `xcode_locator.m`, which Bazel's built-in `host_xcodes`
255-
# does not match.
253+
# `apple_support`'s xcode_config, selected via `--xcode_version_config` by
254+
# the per-target Xcode-config transition in
255+
# `unified/swift-syntax-rs/xcode_transition.bzl` (and by the opt-in
256+
# `swift_macos` bazelrc config; see `.bazelrc`). Needed because rules_swift's
257+
# `system_sdk` selects use Xcode version strings from `apple_support`'s
258+
# `xcode_locator.m`, which Bazel's built-in `host_xcodes` does not match.
256259
xcode_configure = use_extension("@apple_support//xcode:xcode_configure.bzl", "xcode_configure_extension")
257260
use_repo(xcode_configure, "local_config_xcode")
258261

259262
# `apple_support`'s CC toolchains, forced ahead of Bazel's built-in
260-
# `local_config_cc` via `--extra_toolchains` in the `swift_macos` bazelrc
261-
# config (see `.bazelrc`). Must be visible from the root module for the flag
262-
# to resolve.
263+
# `local_config_cc` via `--extra_toolchains` by the per-target Xcode-config
264+
# transition in `unified/swift-syntax-rs/xcode_transition.bzl` (and by the
265+
# opt-in `swift_macos` bazelrc config; see `.bazelrc`). Must be visible from
266+
# the root module for those references to resolve.
263267
apple_cc_configure = use_extension("@apple_support//crosstool:setup.bzl", "apple_cc_configure_extension")
264268
use_repo(apple_cc_configure, "local_config_apple_cc_toolchains")
265269

0 commit comments

Comments
 (0)