In the past I switched the implementation of the zoom page transition because the performance of the old transition was terrible, but I'm hopeful that with Impeller we'll be able to identify and fix the issues that made it so slow. In order to evaluate this though, we need to be able to opt into the old transition for benchmarks on CI.
https://github.com/flutter/flutter/issues/129742https://github.com/flutter/flutter/issues/121325
Xcode uses the CONFIGURATION_BUILD_DIR build setting to determine the location of the bundle to build and install. When launching an app via Xcode with the Xcode debug workflow (for iOS 17 physical devices), temporarily set the CONFIGURATION_BUILD_DIR to the location of the bundle so Xcode can find it.
Also, added a Xcode Debug version of the `microbenchmarks_ios` integration test since it uses `flutter run --profile` without using `--use-application-binary`.
Fixes https://github.com/flutter/flutter/issues/134186.
Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code.
For more info see:
* https://github.com/flutter/flutter/issues/129757
### Implementation details for MacOS and iOS.
Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file).
The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target.
The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets.
### Example vs template
The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209.
### Tests
This PR adds new tests to cover the various use cases.
* dev/devicelab/bin/tasks/native_assets_ios.dart
* Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode.
* dev/devicelab/bin/tasks/native_assets_ios_simulator.dart
* Runs an example app with native assets, doing hot reload and hot restart.
* packages/flutter_tools/test/integration.shard/native_assets_test.dart
* Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester.
* packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart
* Unit tests the new Target in the backend.
* packages/flutter_tools/test/general.shard/ios/native_assets_test.dart
* packages/flutter_tools/test/general.shard/macos/native_assets_test.dart
* Unit tests the native assets being packaged on a iOS/MacOS build.
It also extends various existing tests:
* dev/devicelab/bin/tasks/module_test_ios.dart
* Exercises the add2app scenario.
* packages/flutter_tools/test/general.shard/features_test.dart
* Unit test the new feature flag.
Enable Impeller benchmarks for drawAtlas/drawVertices on iOS/Metal, Android/GLES, and Android/Vulkan.
Enable impeller tessellation benchmarks on iOS/Metal and Android/Vulkan - not GLES as this is measuring backend agnostic performance.
This PR includes the following changes. These changes only apply to iOS 17 physical devices.
| Command | Change Description | Changes to User Experience |
| ------------- | ------------- | ------------- |
| `flutter run --release` | Uses `devicectl` to install and launch application in release mode. | No change. |
| `flutter run` | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
| `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
| `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app. | No change. |
| `flutter screenshot` | Will return error. | Will return error. |
Other changes include:
* Using `devicectl` to get information about the device
* Using `idevicesyslog` and Dart VM logging for device logs
Note:
Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.
Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
Update a few of the tasks that are mislabeled as this will cause failures if that change is merged first.
This PR is needed before: https://github.com/flutter/cocoon/pull/2898
*List which issues are fixed by this PR. You must list at least one issue.*
Part of https://github.com/flutter/flutter/issues/125328
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This enables benchmarks for the Skwasm renderer, compiled with
dart2wasm.
Platform views aren't supported in Skwasm yet, so we are skipping those
benchmarks for now.
Move more test ownership from zanderso to the tools team. This file is used by the flaky issue bot to comment weekly on test shards that flake > 2%. The owner of the shard will be @'d on the issue. It is their responsibility to investigate and triage (potentially re-prioritizing, the bot will initially assign it p1).
Changing to make @gmackall the owner of these tests.
@reidbaker or @camsim99 let me know if either of you would prefer to take over, but I see both of you are already owners of some of these tests and I'm happy to take these ones on (I've already spent a little time looking into how they work for the ongoing debug signing key flake).
Temporarily remove myself from `TESTOWNER` and reassign to others. Please let me know if you'd rather not "own" these and I'll find someone else ð. I intend to take these back later.
Plugins -> @stuartmorgan
iOS-specific tooling -> @vashworth
Benchmark and app extension test -> @cyanglaz
iOS artifact checking -> @christopherfujino
Adds a macOS implementation of the platform_channel example,
demonstrating method channels and event channels with a battery power
plugin.
Adds platform_channel_sample_test_macos macOS host test to verify the
sample works.
Issue: https://github.com/flutter/flutter/issues/79204
* Add Linux unit tests to plugin template
Adds an example native unit test to the plugin template for Linux,
matching the structure we use for our 1P plugin unit tests. Once these
have been added for all platforms+languages, they will be documented on
a new plugin development page to explain their use.
While ideally we would adjust the engine APIs first to allow for testing
the method call handler directly, it's unclear when we will have time
for that work, and for a complex plugin most of the testing wouldn't be
at that layer anyway, so having the structure in place with the
limitations documented is still a significant improvement over having
nothing in the template.
Part of https://github.com/flutter/flutter/issues/82458
* Add creation test
* Add integration tests
* Missing newlines
* test owner
* Typo
* Added integration test for wide gamut support.
* cleaned up
* deleted files that can be generated
* switched back to standard flutter in the shell script
* added devicelab task
* removed analysis options
* analyzer
* Fixed task
* made local_run.sh not executable
* analyzer
* removed the logo asset
* added task to ci
* updated pubspec
* analysis errors fixed
* updated pubspec
* Add Windows unit tests to plugin template
Adds an example native unit test to the plugin template for Windows,
matching the format we use for our 1P plugin example app unit tests.
Once these have been added for all platforms+languages, they will be
documented on a new plugin development page to explain their use.
Since we don't appear to be running our current plugin e2e tests for
Windows, this adds a new configuration to run them. I haven't
`led`-tested this, so it may not work, but this will give a starting
point for getting them running.
Part of https://github.com/flutter/flutter/issues/82458
* Minor fix
* Add test owner
* Fix typo
* Fix test feature flag
* Add new macos target configured for flavors
* Rename Free App copy-Info.plist to Free App Info.plist
* Remove bogus entitlements
* Remove Generated.xcconfig
* Audit project.pbxproj
* Remove unused configs
* share one info.plist
* Modify scheme so that paid app works
* Codesign automatic
* Pipe flavor as scheme into xcodebuild
* Ignore incoming flavor string
* pipe flavor for flutter run to work
* Add devicelab tests
* Error if host and target device are same for flutter install desktop
* Avoid bang (!) by promoting a local.
Co-authored-by: Jenn Magder <magder@google.com>
* Add supportsInstall property
* Override in test classes
* Add install test on macOS
* Refactor application_package and add tests for package directory
Co-authored-by: a-wallen <stephenwallen@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
* Add new task runner for impeller enabled complex layout test
* Add new target in .ci.yaml
* Claim ownership of complex_layout_scroll_perf_impeller_macos__timeline_summary
* Task runner for non-impeller enabled scroll test
* Add test target for non impeller complex layout scroll
* claim ownership of the last target
* mark as bringup
Co-authored-by: a-wallen <stephenwallen@google.com>
* Add new task runner for animated_complex_opacity_perf_impeller e2e_summary on macos
* Register new target for macos e2e_summary task
* Claim ownership in TESTOWNERS
* Add task runner for animated complex opacity without impeller
* Register new target in .ci.yaml for non-impeller test
* Claim ownership of non-impeller task
Co-authored-by: a-wallen <stephenwallen@google.com>
* Add fix and test
* Add test owner
* Print error for testing
* Make sure locale is the problem
* Test capitalization fix
* Take out Android specific test
* Verify eng fix
* Test fix
* Empty-Commit
* Test all tests
* Up string size for testing
* Remove test
* Undo ci.yaml testing changes
* Test android variant:
* Change to testwidgets
* Add widget tester
* Remove android only attempt
* Revert ci.yaml changes