Skip to content

Commit

Permalink
Improve unavailable Xcode message for Bzlmod
Browse files Browse the repository at this point in the history
Context: https://bazelbuild.slack.com/archives/C014RARENH0/p1709547684815279?thread_ts=1709324251.252319&cid=C014RARENH0

Closes #21937.

PiperOrigin-RevId: 623421163
Change-Id: I450b1b1e3b3c0544b391e571911f62f0709aa62c
  • Loading branch information
brentleyjones authored and Copybara-Service committed Apr 10, 2024
1 parent a7744f4 commit c8fcfd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/xcode/semantics.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Semantics for Blaze Xcode rules"""

unavailable_xcode_message = "sudo xcode-select -s <FULL_PATH_TO_XCODE_YOU_WANT>"
unavailable_xcode_message = "'sudo xcode-select -s <FULL_PATH_TO_XCODE_YOU_WANT>'"
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Semantics for Bazel Xcode rules"""

unavailable_xcode_message = "bazel sync --configure"
unavailable_xcode_message = "'bazel fetch --configure' (Bzlmod) or 'bazel sync --configure' (WORKSPACE)"
4 changes: 2 additions & 2 deletions src/main/starlark/builtins_bzl/common/xcode/xcode_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _resolve_xcode_from_local_and_remote(
elif remote_version_from_flag:
print(("--xcode_version={version} specified, but it is not available locally. " +
"Your build will fail if any actions require a local Xcode. " +
"If you believe you have '{version}' installed, try running '{command}'," +
"If you believe you have '{version}' installed, try running {command}," +
"and then re-run your command. Locally available versions: {local_versions}. ")
.format(
version = xcode_version_flag,
Expand All @@ -267,7 +267,7 @@ def _resolve_xcode_from_local_and_remote(
fail(
("--xcode_version={0} specified, but '{0}' is not an available Xcode version." +
" Locally available versions: [{2}]. Remotely available versions: [{3}]. If" +
" you believe you have '{0}' installed, try running '{1}', and then" +
" you believe you have '{0}' installed, try running {1}, and then" +
" re-run your command.").format(
xcode_version_flag,
unavailable_xcode_message,
Expand Down

0 comments on commit c8fcfd4

Please sign in to comment.