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

Validate extension safety only on dynamic frameworks #632

Conversation

mattrobmattrob
Copy link
Collaborator

@mattrobmattrob mattrobmattrob commented Dec 22, 2022

Summary

Only validate the dynamic frameworks (those with apple_common.AppleDynamicFramework) when calling the partials.extension_safe_validation_partial partial. This mimics the rules_apple approach more correctly:

https://github.com/bazelbuild/rules_apple/blob/eb5c03a606b103e9f8b72de954103eb00cf127f7/apple/internal/ios_rules.bzl#L1049-L1053

Discovered this issue when playing around with rules_apple_linker and our app extensions since it's provided as a deps entry but not a classic example of what would be there.

# Summary
Only validate the dynamic frameworks (those with `apple_common.AppleDynamicFramework`) when calling the `partials.extension_safe_validation_partial` partial. This mimics the `rules_apple` approach more correctly:

https://github.com/bazelbuild/rules_apple/blob/eb5c03a606b103e9f8b72de954103eb00cf127f7/apple/internal/ios_rules.bzl#L1049-L1053
@mattrobmattrob mattrobmattrob marked this pull request as ready for review December 22, 2022 20:46
mattrobmattrob added a commit that referenced this pull request Jan 10, 2023
Update `rules_apple` to https://github.com/bazelbuild/rules_apple/releases/tag/2.0.0:

- Handle bazelbuild/rules_apple@c23720d by adding `cc_info` param to `framework_provider_partial` call.
- Handle bazelbuild/rules_apple@51d6273 by removing `bin_root_path`/`rule_label` param to `debug_symbols_partial` call.
- Handle bazelbuild/rules_apple@a4de222 by removing the `apple_xcframework.framework_type` param.
- Handle bazelbuild/rules_apple@02838e5 by self-identifying the `.modulemap` files in static/dynamic frameworks.
- Work around bazelbuild/rules_apple#1797 by renaming a `NestedHeaders/` directory to `Nested/` for now.

These parameter changes are likely breaking for folks with a different `rules_apple` so we'll want to take that into account before merging this PR. This is currently blocked by #632.
@mattrobmattrob mattrobmattrob enabled auto-merge (squash) January 24, 2023 20:08
@mattrobmattrob
Copy link
Collaborator Author

Somewhat stupidly, this was already merged as part of 9a705f8. 🤦

auto-merge was automatically disabled January 24, 2023 20:12

Pull request was closed

@mattrobmattrob mattrobmattrob deleted the mr/apply.extension.safety.validation.to.dynamic.fwks branch January 24, 2023 20:15
nataliejameson pushed a commit to discord/rules_ios that referenced this pull request Aug 13, 2024
Update `rules_apple` to https://github.com/bazelbuild/rules_apple/releases/tag/2.0.0:

- Handle bazelbuild/rules_apple@c23720d by adding `cc_info` param to `framework_provider_partial` call.
- Handle bazelbuild/rules_apple@51d6273 by removing `bin_root_path`/`rule_label` param to `debug_symbols_partial` call.
- Handle bazelbuild/rules_apple@a4de222 by removing the `apple_xcframework.framework_type` param.
- Handle bazelbuild/rules_apple@02838e5 by self-identifying the `.modulemap` files in static/dynamic frameworks.
- Work around bazelbuild/rules_apple#1797 by renaming a `NestedHeaders/` directory to `Nested/` for now.

These parameter changes are likely breaking for folks with a different `rules_apple` so we'll want to take that into account before merging this PR. This is currently blocked by bazel-ios/rules_ios#632.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant