-
Notifications
You must be signed in to change notification settings - Fork 29k
Skip linking against Flutter for CocoaPods transitive dependencies #78592
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
Skip linking against Flutter for CocoaPods transitive dependencies #78592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (I'm assuming "links on" means the same thing as "links against"? I've not encountered that terminology.)
Yeah it was late. 😄 |
In that case: link on, and be excellent to your libraries 😁 |
* Skip linking on Flutter for CocoaPods transitive dependencies (#78592) * Apply Engine cherrypicks for release 2.0.4 Co-authored-by: Jenn Magder <magder@google.com>
Background
Flutter plugins need to link against
Flutter.framework
orFlutterMacOS.framework
. That work is done in the app's Podfile like:flutter_additional_ios_build_settings
andflutter_additional_macos_build_settings
sets up the search paths to point to thebin/cache
version ofFlutter.framework
orFlutterMacOS.framework
, and for iOS additionally links againstFlutter
.flutter/packages/flutter_tools/bin/podhelper.rb
Line 63 in efbde44
ALL pods, even non-Flutter plugins transitive dependencies, were therefore linking against Flutter.
For example, Flutter plugin
firebase_admob
needs to link against Flutter. That plugin has a transitive dependency onGoogle-Mobile-Ads-SDK
which being incorrectly also linked toFlutter.framework
.The problem
#72151 causes an issue where, if a transitive dependency contained bitcode, it fails when linking against the debug version of Flutter (which isn't necessary since the transitive dependencies don't need to know anything about Flutter) because debug Flutter only contains a bitcode marker, not full bitcode.
The fix
Change the
podhelper
logic to only set up all the Flutter build settings ONLY for Flutter plugins and not their transitive dependencies.Add a a plugin with a transitive dependency to
build_ios_framework_module_test
and test that the dependency doesn't link against Flutter.https://ci.chromium.org/p/flutter/builders/try/Mac%20build_ios_framework_module_test/4725
On master this test fails:
Fixes #78589