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

Deprecate runtime_deps rule attribute from objc_library #17643

Closed
stravinskii opened this issue Mar 1, 2023 · 2 comments
Closed

Deprecate runtime_deps rule attribute from objc_library #17643

stravinskii opened this issue Mar 1, 2023 · 2 comments
Labels

Comments

@stravinskii
Copy link

stravinskii commented Mar 1, 2023

Description of the feature request:

Currently, the Objective-C library rule provides the runtime_deps rule attribute as means to propagate Apple frameworks (eg. ios_dynamic_framework) up the dependency graph, and include those framework bundles on top-level Apple rules (e.g. ios_application), but does not link against that framework (ie. framework will be loaded at runtime using NSBundle).

To move forward with a more agnostic Objective-C rule, the runtime_deps attribute will be deprecated from the objc_library rule, and usages of runtime_deps should migrate to use data instead to propagate Apple frameworks (support was added at f711be0 on the upstream branch).

@sgowroji sgowroji added type: feature request untriaged team-Rules-ObjC Issues for Objective-C maintainers labels Mar 2, 2023
@googlewalt
Copy link
Contributor

@keith FYI.

@keith
Copy link
Member

keith commented Mar 21, 2023

Question for you @stravinskii on bazelbuild/rules_apple@7d0ec13#diff-87d742fc0a4603b04747f3070c6070f4cf641ee55b6e1ab46761306e38c719d8

Shouldn't this commit have added data to the _FRAMEWORK_PROVIDERS_ASPECT_ATTRS? As if you have a dep tree like objc_library.data (previously runtime_deps) -> ios_framework.frameworks -> ios_framework you will no longer collect the second ios_framework target, where previously you would? This might not affect you, but in the open source case we added support for watchos_frameworks which is bundled with watchos_extension targets, and in that case we need to pull those frameworks into the extension.

fweikert pushed a commit to fweikert/bazel that referenced this issue May 25, 2023
This change removes objc_library `runtime_deps` rule attribute.

Previously, `runtime_deps` propagated Apple frameworks built with
rules_apple framework rules (eg. `ios_framework`) to be bundled at
top-level bundle rules (e.g. `ios_application`) but avoid linking the
framework to allow deferred loading using `NSBundle` APIs.

Apple BUILD rules now support propagating Apple frameworks through the
`data` rule attribute from `objc_library` and `swift_library` rules to
replace this functionality.

Fixes bazelbuild#17643

PiperOrigin-RevId: 516909309
Change-Id: I19d20745b23b1ec62cb512ee7a084f38cdb2ea21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants