Skip to content

[flutter_tools] implement build aot in terms of assemble for iOS#49224

Merged
fluttergithubbot merged 3 commits intoflutter:masterfrom
jonahwilliams:ios_assemble_123213
Jan 24, 2020
Merged

[flutter_tools] implement build aot in terms of assemble for iOS#49224
fluttergithubbot merged 3 commits intoflutter:masterfrom
jonahwilliams:ios_assemble_123213

Conversation

@jonahwilliams
Copy link
Copy Markdown
Contributor

Description

Refactors the iOS profile/release script to delegate to assemble. This allows us to incrementally move xcode_backend.sh from bash to dart.

#32925

@fluttergithubbot
Copy link
Copy Markdown
Contributor

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.

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

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 21, 2020
@jonahwilliams
Copy link
Copy Markdown
Contributor Author

tested via existing iOS devicelab tests and previously written unit tests for targets/ios.dart

@jonahwilliams jonahwilliams requested a review from jmagman January 21, 2020 17:52
@jmagman
Copy link
Copy Markdown
Member

jmagman commented Jan 21, 2020

This caused some errant status output for build ios-framework.

Building App.framework for arm64...                                     
Building App.framework for armv7...          

Before:

Building framework for com.m.flutterapp in debug mode...
 ├─Populating Flutter.framework...                                  0.1s
 ├─Creating Flutter.xcframework...                               1,075ms
 ├─Adding placeholder App.framework for debug...                   150ms
 ├─Assembling Flutter resources for App.framework...                6.1s
 ├─Creating App.xcframework...                                     619ms
Running pod install...                                              1.1s
 ├─Building plugins...                                              5.8s
 └─Moving to ../../MyApp/Flutter/Debug                              0.0s
Building framework for com.m.flutterapp in profile mode...
 ├─Populating Flutter.framework...                                  0.1s
 ├─Creating Flutter.xcframework...                                 538ms
 ├─Building Dart AOT for App.framework...                          18.6s
 ├─Assembling Flutter resources for App.framework...                0.1s
 ├─Creating App.xcframework...                                     547ms
 ├─Building plugins...                                              3.9s
 └─Moving to ../../MyApp/Flutter/Profile                            0.0s
Building framework for com.m.flutterapp in release mode...
 ├─Populating Flutter.framework...                                  0.8s
 ├─Creating Flutter.xcframework...                               1,167ms
 ├─Building Dart AOT for App.framework...                          80.9s
 ├─Assembling Flutter resources for App.framework...                0.1s
 ├─Creating App.xcframework...                                     575ms
 ├─Building plugins...                                              4.0s
 └─Moving to ../../MyApp/Flutter/Release                            0.0s

After:

Building frameworks for com.m.flutterapp in debug mode...
 ├─Populating Flutter.framework...                                  0.1s
 ├─Creating Flutter.xcframework...                                  1.0s
 ├─Adding placeholder App.framework for debug...                   144ms
 ├─Assembling Flutter resources for App.framework...                6.0s
 ├─Creating App.xcframework...                                      0.6s
Running pod install...                                              1.1s
 ├─Building plugins...                                              8.8s
 └─Moving to ../../MyApp/Flutter/Debug                              0.0s
Building frameworks for com.m.flutterapp in profile mode...
 ├─Populating Flutter.framework...                                  0.2s
 ├─Creating Flutter.xcframework...                                  0.6s
Building App.framework for arm64...                                     
Building App.framework for armv7...                                     
 ├─Building Dart AOT for App.framework...                          20.3s
 ├─Assembling Flutter resources for App.framework...                0.1s
 ├─Creating App.xcframework...                                      0.6s
 ├─Building plugins...                                              5.6s
 └─Moving to ../../MyApp/Flutter/Profile                            0.0s
Building frameworks for com.m.flutterapp in release mode...
 ├─Populating Flutter.framework...                                  0.9s
 ├─Creating Flutter.xcframework...                                  1.3s
Building App.framework for arm64...                                     
Building App.framework for armv7...                                     
 ├─Building Dart AOT for App.framework...                          83.0s
 ├─Assembling Flutter resources for App.framework...                0.1s
 ├─Creating App.xcframework...                                      0.9s
 ├─Building plugins...                                              6.0s
 └─Moving to ../../MyApp/Flutter/Release                            0.0s

It's passing in quiet = true

  await aotBuilder.build(
    platform: TargetPlatform.ios,
    outputPath: iPhoneBuildOutput.path,
    buildMode: mode,
    // Relative paths show noise in the compiler https://github.com/dart-lang/sdk/issues/37978.
    mainDartFile: globals.fs.path.absolute(targetFile),
    quiet: true,
    bitcode: true,
    reportTimings: false,
    iosBuildArchs: <DarwinArch>[DarwinArch.armv7, DarwinArch.arm64],
    dartDefines: dartDefines,
  );

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

Good catch, will take a look and fix it.

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

The snapshotter calls now correctly pass quiet.

Copy link
Copy Markdown
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 7faf2d7 into flutter:master Jan 24, 2020
@jonahwilliams jonahwilliams deleted the ios_assemble_123213 branch January 27, 2020 19:11
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants