Skip to content

Commit

Permalink
[7.2.0] Improve unavailable Xcode message for Bzlmod (#21990)
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 #21938.

PiperOrigin-RevId: 623421163
Change-Id: I450b1b1e3b3c0544b391e571911f62f0709aa62c (cherry picked from
commit c8fcfd4)
  • Loading branch information
brentleyjones authored Apr 15, 2024
1 parent 280ba8c commit 81fc95f
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ private static Map.Entry<XcodeVersionRuleData, Availability> resolveXcodeFromLoc
String.format(
"--xcode_version=%1$s specified, but it is not available locally. Your build will"
+ " fail if any actions require a local Xcode. If you believe you have '%1$s'"
+ " installed, try running \"blaze sync --configure\", and then re-run your"
+ " command. localy available versions: [%2$s]. remotely available versions:"
+ " [%3$s]",
+ " installed, try running 'bazel fetch --configure' (Bzlmod) or 'bazel sync"
+ " --configure' (WORKSPACE), and then re-run your command. localy available"
+ " versions: [%2$s]. remotely available versions: [%3$s]",
versionOverrideFlag,
printableXcodeVersions(localVersions.getAvailableVersions()),
printableXcodeVersions(remoteVersions.getAvailableVersions())));
Expand All @@ -407,9 +407,10 @@ private static Map.Entry<XcodeVersionRuleData, Availability> resolveXcodeFromLoc
ruleContext.throwWithRuleError(
String.format(
"--xcode_version=%1$s specified, but '%1$s' is not an available Xcode version."
+ " localy available versions: [%2$s]. remotely available versions:"
+ " [%3$s]. If you believe you have '%1$s' installed, try running \"blaze"
+ " sync --configure\", and then re-run your command.",
+ " localy available versions: [%2$s]. remotely available versions: [%3$s]. If"
+ " you believe you have '%1$s' installed, try running 'bazel fetch"
+ " --configure' (Bzlmod) or 'bazel sync --configure' (WORKSPACE), and then"
+ " re-run your command.",
versionOverrideFlag,
printableXcodeVersions(localVersions.getAvailableVersions()),
printableXcodeVersions(remoteVersions.getAvailableVersions())));
Expand Down

0 comments on commit 81fc95f

Please sign in to comment.