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

Fix broken builds with Bazel < 6.4.0 #2386

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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
5 changes: 4 additions & 1 deletion apple/internal/partials/app_assets_validation.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ load(
"partial",
)

_supports_visionos = hasattr(apple_common.platform_type, "visionos")

def _app_assets_validation_partial_impl(
*,
app_icons,
Expand Down Expand Up @@ -72,7 +74,8 @@ def _app_assets_validation_partial_impl(
extension = "brandassets",
files = app_icons,
)
elif platform_prerequisites.platform_type == apple_common.platform_type.visionos:
elif (_supports_visionos and
platform_prerequisites.platform_type == apple_common.platform_type.visionos):
message = ("visionOS apps must use visionOS app icon layers grouped in " +
".solidimagestack bundles, not traditional App Icon Sets")
bundling_support.ensure_single_xcassets_type(
Expand Down
5 changes: 4 additions & 1 deletion apple/internal/resource_actions/actool.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ load(
"paths",
)

_supports_visionos = hasattr(apple_common.platform_type, "visionos")

def _actool_args_for_special_file_types(
*,
asset_files,
Expand Down Expand Up @@ -107,7 +109,8 @@ def _actool_args_for_special_file_types(
elif platform_prerequisites.platform_type == apple_common.platform_type.tvos:
appicon_extension = "brandassets"
icon_files = [f for f in asset_files if ".brandassets/" in f.path]
elif platform_prerequisites.platform_type == apple_common.platform_type.visionos:
elif (_supports_visionos and
platform_prerequisites.platform_type == apple_common.platform_type.visionos):
appicon_extension = "solidimagestack"
icon_files = [f for f in asset_files if ".solidimagestack/" in f.path]
else:
Expand Down