-
Notifications
You must be signed in to change notification settings - Fork 261
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
Switch static xcframework rule to produce framework #1488
Merged
keith
merged 1 commit into
master
from
ks/switch-static-xcframework-rule-to-produce-framework
Jun 7, 2022
Merged
Switch static xcframework rule to produce framework #1488
keith
merged 1 commit into
master
from
ks/switch-static-xcframework-rule-to-produce-framework
Jun 7, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously the apple_static_xcframework rule produced a xcframework that wrapped a static library. This change makes it produce a static framework instead. A static framework has the benefit that headers are easier to deal with in 2 ways (at least when including with bazel): 1. You don't need to set any `includes` on the import, reducing `-I` flags up the tree (since they're covered by the `-F` instead 2. Module style imports `#import <foo/foo.h>` are supported without any other infra, with libraries only quoted imports work without headermaps or another solution The reason this wasn't done originally is that Xcode doesn't support copying resources in static xcframeworks. While this is the same with libraries and frameworks, the difference is users might expect resources nested in framework bundles to be copied, but they will not be, and users may expect that in the static library case, since libraries don't ever manage resource inclusion. It sounds like CocoaPods handles this transparently, but Xcode does not FB10026748.
not sure if we should do this or not, at Lyft some of our libraries require this or another solution to imports which we've never had to do before since we don't have much objc, maybe other folks wouldn't be phased by that. |
Lyft integration job started: https://buildkite.com/lyft/rules-apple/builds/632 (must be Lyft employee to view) |
brentleyjones
approved these changes
May 29, 2022
jpsim
added a commit
to envoyproxy/envoy-mobile
that referenced
this pull request
Jun 8, 2022
To pull in bazelbuild/rules_apple#1488, which should fix our CocoaPods integration and allow us to re-add it. Signed-off-by: JP Simard <jp@jpsim.com>
jpsim
added a commit
to envoyproxy/envoy-mobile
that referenced
this pull request
Jun 8, 2022
To pull in bazelbuild/rules_apple#1488, which should fix our CocoaPods integration and allow us to re-add it. Risk Level: Medium for iOS users who use the xcframework, low for everyone else Testing: There's a recent CI job that validates SwiftPM integration that acts as a good integration test for this Docs Changes: None for now, this isn't really a user-facing change, as Xcode/SwiftPM handles both the old and new xcframework format/layout transparently Release Notes: None for now, this isn't really a user-facing change Signed-off-by: JP Simard <jp@jpsim.com>
Augustyniak
pushed a commit
to envoyproxy/envoy-mobile
that referenced
this pull request
Jun 28, 2022
To pull in bazelbuild/rules_apple#1488, which should fix our CocoaPods integration and allow us to re-add it. Risk Level: Medium for iOS users who use the xcframework, low for everyone else Testing: There's a recent CI job that validates SwiftPM integration that acts as a good integration test for this Docs Changes: None for now, this isn't really a user-facing change, as Xcode/SwiftPM handles both the old and new xcframework format/layout transparently Release Notes: None for now, this isn't really a user-facing change Signed-off-by: JP Simard <jp@jpsim.com> Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
jpsim
added a commit
to envoyproxy/envoy
that referenced
this pull request
Nov 29, 2022
To pull in bazelbuild/rules_apple#1488, which should fix our CocoaPods integration and allow us to re-add it. Risk Level: Medium for iOS users who use the xcframework, low for everyone else Testing: There's a recent CI job that validates SwiftPM integration that acts as a good integration test for this Docs Changes: None for now, this isn't really a user-facing change, as Xcode/SwiftPM handles both the old and new xcframework format/layout transparently Release Notes: None for now, this isn't really a user-facing change Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the apple_static_xcframework rule produced a xcframework that
wrapped a static library. This change makes it produce a static
framework instead. A static framework has the benefit that headers are
easier to deal with in 2 ways (at least when including with bazel):
includes
on the import, reducing-I
flags up the tree (since they're covered by the
-F
instead#import <foo/foo.h>
are supported without anyother infra, with libraries only quoted imports work without
headermaps or another solution
The reason this wasn't done originally is that Xcode doesn't support
copying resources in static xcframeworks. While this is the same with
libraries and frameworks, the difference is users might expect resources
nested in framework bundles to be copied, but they will not be, and
users may expect that in the static library case, since libraries don't
ever manage resource inclusion. It sounds like CocoaPods handles this
transparently, but Xcode does not FB10026748.