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

Add proper support for rules_swift mixed_language_library #2580

Merged
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
10 changes: 7 additions & 3 deletions apple/internal/aspects/resource_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ def _apple_resource_aspect_impl(target, ctx):
collect_args["res_attrs"] = ["data"]
owner = str(ctx.label)

elif ctx.rule.kind == "mixed_language_library":
default_action = apple_resource_hint_action.resources
module_names = [x.name for x in target[SwiftInfo].direct_modules if x.swift]
bucketize_args["swift_module"] = module_names[0] if module_names else None
collect_args["res_attrs"] = ["data"]
owner = str(ctx.label)

elif ctx.rule.kind in ["apple_static_framework_import", "apple_static_xcframework_import"]:
default_action = apple_resource_hint_action.resources
if AppleFrameworkImportBundleInfo in target:
Expand Down Expand Up @@ -430,9 +437,6 @@ apple_resource_aspect = aspect(
"private_deps",
"structured_resources",
"resources",
# rules_swift `mixed_language_target`
"clang_target",
"swift_target",
],
attrs = dicts.add(
apple_support.action_required_attrs(),
Expand Down