Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unknown Xcode version error message and provide an environment variable to force re-evaluation #19512

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,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 shutdown\", 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 sync --configure\", 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 @@ -403,7 +403,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"
+ " shutdown\", and then re-run your command.",
+ " sync --configure\", and then re-run your command.",
versionOverrideFlag,
printableXcodeVersions(localVersions.getAvailableVersions()),
printableXcodeVersions(remoteVersions.getAvailableVersions())));
Expand Down Expand Up @@ -457,10 +457,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
4 changes: 4 additions & 0 deletions tools/osx/xcode_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ def _impl(repository_ctx):
repository_ctx.file("BUILD", build_contents)

xcode_autoconf = repository_rule(
environ = [
"DEVELOPER_DIR",
"XCODE_VERSION",
brentleyjones marked this conversation as resolved.
Show resolved Hide resolved
],
implementation = _impl,
configure = True,
attrs = {
Expand Down
Loading