Skip to content

Commit

Permalink
Append the Xcode build version to the appintentsmetadataprocessor for…
Browse files Browse the repository at this point in the history
… Xcode 15.3 builds, based on the version string reported from the XcodeVersionConfig provider.

PiperOrigin-RevId: 601786735
  • Loading branch information
nglevin authored and swiple-rules-gardener committed Jan 26, 2024
1 parent f03ec36 commit ea240b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apple/internal/resource_actions/app_intents.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ Could not find a module name for app_intents. One is required for App Intents me
)
transitive_inputs.append(depset(constvalues_files))
args.add("--compile-time-extraction")
if xcode_version_config.xcode_version() >= apple_common.dotted_version("15.3"):
# Read the build version from the fourth component of the Xcode version.
xcode_version_split = str(xcode_version_config.xcode_version()).split(".")
if len(xcode_version_split) < 4:
fail("""\
Internal Error: Expected xcode_config to report the Xcode version with the build version as the \
fourth component of the full version string, but instead found {xcode_version_string}. Please file \
an issue with the Apple BUILD rules with repro steps.
""".format(
xcode_version_string = str(xcode_version_config.xcode_version()),
))
args.add("--xcode-version", xcode_version_split[3])

apple_support.run(
actions = actions,
Expand Down

1 comment on commit ea240b8

@keith
Copy link
Member

@keith keith commented on ea240b8 Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.