From 3fdba5ae3697d3999fb65cb17aeadbfbf49468c8 Mon Sep 17 00:00:00 2001 From: Chris Sauer Date: Tue, 2 Jan 2024 08:07:40 -0800 Subject: [PATCH] Collect data from objc_import (#2346) @Keith, tossing up a quick PR per your suggestion in https://github.com/bazelbuild/bazel/issues/17018#issuecomment-1868117970 to lay the groundwork --- apple/internal/aspects/resource_aspect.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apple/internal/aspects/resource_aspect.bzl b/apple/internal/aspects/resource_aspect.bzl index 93c9e9f85a..37b51e6923 100644 --- a/apple/internal/aspects/resource_aspect.bzl +++ b/apple/internal/aspects/resource_aspect.bzl @@ -139,6 +139,9 @@ def _apple_resource_aspect_impl(target, ctx): if ctx.rule.attr.srcs or ctx.rule.attr.non_arc_srcs or ctx.rule.attr.deps: owner = str(ctx.label) + elif ctx.rule.kind == "objc_import": + collect_args["res_attrs"] = ["data"] + elif ctx.rule.kind == "swift_library": 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