Skip to content

Commit

Permalink
[6.4.0] Revert "Switch xcode_autoconf to use 'configure = True' (#19174
Browse files Browse the repository at this point in the history
…)" (#19550)

This reverts commit 1b2732f and part of
d17f5e9.

Bzlmod doesn’t support `bazel sync --configure`, making using
`xcode_autoconf` with `configure = True` hard to work with. Until Bzlmod
supports that, we shouldn’t make this change in an LTS release.

Signed-off-by: Brentley Jones <github@brentleyjones.com>
  • Loading branch information
brentleyjones authored Sep 18, 2023
1 parent e36ca59 commit 7b72c02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ private static Map.Entry<XcodeVersionRuleData, Availability> resolveXcodeFromLoc
} else if (specifiedVersionFromRemote != null) {
ruleContext.ruleWarning(
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]",
"--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 shutdown\", 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 @@ -418,7 +418,7 @@ private static Map.Entry<XcodeVersionRuleData, Availability> resolveXcodeFromLoc
"--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.",
+ " shutdown\", and then re-run your command.",
versionOverrideFlag,
printableXcodeVersions(localVersions.getAvailableVersions()),
printableXcodeVersions(remoteVersions.getAvailableVersions())));
Expand Down Expand Up @@ -472,10 +472,10 @@ private static Map.Entry<XcodeVersionRuleData, Availability> resolveXcodeFromLoc
checkState(defaultVersion != null);
return Maps.immutableEntry(defaultVersion, Availability.BOTH);
} else { // Use the local default.
ruleContext.ruleWarning(
"You passed --experimental_prefer_mutual_xcode=false, which prevents Bazel from"
+ " selecting an Xcode version that optimizes your performance. Please consider"
+ " using --experimental_prefer_mutual_xcode=true.");
ruleContext.ruleWarning(
"You passed --experimental_prefer_mutual_xcode=false, which prevents Bazel from"
+ " selecting an Xcode version that optimizes your performance. Please consider"
+ " using --experimental_prefer_mutual_xcode=true.");
return Maps.immutableEntry(localVersions.getDefaultVersion(), Availability.LOCAL);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/osx/xcode_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ xcode_autoconf = repository_rule(
"XCODE_VERSION",
],
implementation = _impl,
configure = True,
local = True,
attrs = {
"xcode_locator": attr.string(),
"remote_xcode": attr.string(),
Expand Down

0 comments on commit 7b72c02

Please sign in to comment.