Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Nov 4, 2020

Description

#69731 and the next "Remove lipoing from debug stub framework step" PR were too big to review together.

Refactoring part of build_ios_framework to keep the reviews for #69334 small.

  1. Rename _produceXCFramework to _produceXCFrameworkFromUniversal. This existing method took a universal (fat) framework, split it into iphoneos and iphonesimulator frameworks, then turned them into an xcframework.
  2. Pull logic to create an xcframework from non-fat frameworks out of _producePlugins, combine with logic from _produceNonDebugXCFramework, and call the new method _produceXCFramework. This method will be used in the next PR.
  3. Pull logic to lipo together non-fat frameworks into a universal framework out of _producePlugins and call it _produceUniversalFramework . This method will also be used in the next PR.

Related Issues

Fixes #63508, will supersede #66541

Tests

build_ios_framework_module_test thoroughly tests the output bundles. My test suggestion in #66541 (review) wasn't a great one and it didn't work. build_ios_framework_module_test will confirm it doesn't regress the more normal case that the module and framework are named the same thing.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 4, 2020
@google-cla google-cla bot added the cla: yes label Nov 4, 2020
@jmagman jmagman force-pushed the refactor-build-ios branch from 0dafdeb to a3ac81f Compare November 4, 2020 02:47
podProduct as Directory,
if (mode == BuildMode.debug)
simulatorBuildConfiguration
.childDirectory(builtProduct.basename)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1amageek This is the line that is similar to your suggestion in #66541, though I used an existing local instead of making a new one.

@jmagman jmagman marked this pull request as draft November 4, 2020 02:48
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jmagman jmagman marked this pull request as ready for review November 4, 2020 18:55
@jmagman jmagman added a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically labels Nov 4, 2020
continue;
}
final String binaryName = globals.fs.path.basenameWithoutExtension(podFrameworkName);
if (boolArg('universal')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is now in _produceUniversalFramework.

}
}

if (boolArg('xcframework')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is now in _produceXCFramework

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically platform-target-arm Targeting an ARM-based platform tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter build ios-framework Some plugin debug framework creation failing

3 participants