The name is very misleading at this point, since it does substantially
more than build flutter_assets. Name it more generically as a wrapper
for 'assemble' for macOS builds.
An optimization to the coverage collection speed was added in #30811. This commit further expands on it to parameterize the CoverageCollector with a custom predicate, allowing internal use cases to filter the RPC calls to the Dart VM based on scripts of interest to coverage collection.
This is done via `flutter build bundle`. As a consequence, this PR introduces a new way to disable analytics via the `FLUTTER_SUPPRESS_ANALYTICS` env flag.
Rather than macos/Flutter containing a mixture of files that should and
shouldn't be checked in, create clear locations for:
- Files that are "owned" by Flutter, but should be checked in
(Flutter/). This will contain files like the top-level Flutter
xcconfigs, generated plugin registrants, etc.
- Files that are generated by Flutter on the fly, and should not be
checked in (Flutter/ephemeral/). This will contain Flutter SDK caches,
the generated xcconfig, etc.
Also adds Flutter-owned Debug and Release xcconfig variants, in
preparation for PodSpec tooling.
Invoking msbuild with runInShell makes handling path escaping more
error-prone, and substantially increases the chances of running into
maximum path limits. This replaces the direct call with a .bat wrapper
that calls vsvars64.bat then msbuild, and uses relative paths within the
script to keep command lengths short.
Fixes https://github.com/flutter/flutter/issues/32792
Allows Windows builds to use the same structure and script as Linux
builds now use, calling into tool_backend to manage copying resources to
the project directory and building the bundle.
Also switches from expecting name_update.bat to expecting flutter\exe_filename
to be written during the build, as with the recent changes to the macOS build, to
reduce the amount of boilerplate needed in a windows\ project directory.
- Removes SYMROOT from the Generated.xcconfig. Having it causes current
versions of Xcode to switch the project's build output to "Legacy",
which causes anything not overridden to use a project-relative build
directory instead of a shared directory in DerivedData, breaking
anything with subprojects that it depends on.
This means that `flutter run` and builds from Xcode will use
completely different build directories, but that each should be
internally consistent.
- Moves the FlutterMacOS.framework to $SRCROOT/Flutter. This is
consistent with the approach we're moving to for all desktop
platforms, and avoids issues finding it now that SYMROOT doesn't match
for the two different build modes.
Fixes#32494
This change permits
(1) a relative --flutter-shell
(2) relative (source, dill) entries within the test JSON file
and enables portability in the invocation scripts produced by fuchsia's
dart test GN template.
* add trailing commas on list/map/parameters
* add trailing commas on Invocation with nb of arg>1
* add commas for widget containing widgets
* add trailing commas if instantiation contains trailing comma
* revert bad change
* Refactor for iOS.
* For android_xxx_unopt_arm64&ios_xxx_unopt_arm, remove the _arm64/_arm suffix.
dart generated in host_xxx_unopt/host_xxx has an arch of x86_64 which supports arm64/arm.
* Remove suffixes for various archs.
* move flutter_assets to App.framework
* Roll engine to 05fee4eeee0ff6b219b1fcc394371e5f6963cc46
05fee4eee Update default flutter_assets path for iOS embedding (flutter/engine#7518)
02205db01 Roll src/third_party/skia 5d052dac3ac1..02738a86e5fd (4 commits) (flutter/engine#7541)
af907c074 Roll src/third_party/skia 5c7a3ac0e214..5d052dac3ac1 (7 commits) (flutter/engine#7540)
dde286673 IWYU to get SkFontMetrics (flutter/engine#7539)
* Use Xcode build configurations to drive Flutter build mode
* Proper check wrt local_engine, print error if profile mode misisng
* Remove unused code, update tests, fix template problem, update warning
* fix up warning
* add explanatory dev comment
* fix whitespace
* missing words, change lambda arrow to function body
* error indentation
* Test early exits for xcode_backend.sh
* only on macOS, use right test
* Update error messages
* case insensitive compare for build config
* Update gallery podfile
* update projects to add profile configuration
* make compatible with flavors
* add missing plist files
* add FLUTTER_FRAMEWORK_DIR back, set swift version for profile, tell Podfile about profile
* Use Xcode build configurations to drive Flutter build mode
* Proper check wrt local_engine, print error if profile mode misisng
* Remove unused code, update tests, fix template problem, update warning
* fix up warning
* add explanatory dev comment
* fix whitespace
* missing words, change lambda arrow to function body
* error indentation
* Test early exits for xcode_backend.sh
* only on macOS, use right test
* Update error messages
* case insensitive compare for build config
* Update gallery podfile
* update projects to add profile configuration
* make compatible with flavors
* add missing plist files
* Fix xcode_backend.sh script to support add2app
* Fix ios deployment target. Too old for new Xcode.
* Fix ios host app
* Register plugins with Flutter view
A dSYM file is created for the stripped `App.framework` and placed at `build/aot/App.dSYM`.
Reduces `App.framework` for Flutter Gallery by 6MB uncompressed, minus 23%.
Reduces `App.framework` for Hello World by 1.6MB uncompressed, minus 22%.
Fixes#4287.
Fixes#18693.
Helps with #21813.
See also #12012.
This change depends on https://dart-review.googlesource.com/c/sdk/+/76306.
* Prototype
* Fix paths to Flutter library resources
* Invoke pod install as necessary for materialized modules
* Add devicelab test for module use on iOS
* Remove debug output
* Rebase, reame materialize editable
* Add devicelab test editable iOS host app
* Removed add2app test section
This tickled a bug in KernelCompiler.compile() where the fingerprinter
doesn't include the outputFilePath in its list of dependencies. As such,
if the output .dill file is missing or corrupted, the fingerprint still
matches and re-compile is skipped, even though it shouldn't be. I'll fix
that in a followup, then look at how this triggered that issue. My
hypothesis is that that it's due to the aot kernel compile and bundle
kernel compile have separate output directories for the .dill files
(build/ vs build/aot) but the same output directory for the associated
depfiles (due to this patch).
This reverts commit 43a106e95a.
The --snapshot argument was only necessary in Dart 1. The --depfile
argument was only used in Dart 2 mode to pass to the kernel compiler,
but was inconsistent with the 'build aot' command, where the depfile was
always set to build/kernel_compile.d.
This patch updates 'build bundle' to emit the depfile to a location
consistent with the 'build aot' command; since it's not intended to be
user-configurable and flutter.gradle hardcodes the location to
build/kernel_compile.d either way, this patch also eliminates the
ability to configure the filename altogether.
This patch eliminates the --preview-dart-2/--no-preview-dart-2 flag,
hardcoding all uses to true. It also defaults all previewDart2 method
parameters to true, where they hadn't yet been.
A series of subsequent patches will eliminate all previewDart2
parameters and the associated code from within the codebase.
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.
I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.
While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.
Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
This reverts commit e22f99743b.
Adding the exit(exitCode) fixes the hang.
Tested by running `fx run-host-tests` with a topaz checkout.
Verified the hang before, no hang after.
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.
Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.
This also reverts migration to Dart 2 typedef syntax.
This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
* It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
* Fix indentation, remove no longer necessary .toList()
* Only push udpated kernel if >0 invalidated srcs
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
This change adds support for armv7, arm64, and universal iOS apps.
This change eliminates iOS target architecture hardcoding (previously
arm64 only) and uses the target architecture(s) specified in Xcode's
ARCHS setting ('Architectures' in Xcode Build Settings).
For universal binaries, set ARCHS to its default value, $(ARCHS_STANDARD).
Note that after changing the architecture in Xcode, developers should
run 'pod install' from the ios subdirectory of their project. A separate
change (that will land before this one) will add support for
automatically detecting project file and Podfile changes and re-running
pod install if necessary.
This change also adds an --ios-arch option to flutter build aot. In iOS
AOT builds (in profile and release mode), this dictates which
architectures are built into App.framework. This flag should generally
be unnecessary to set manually since flutter build aot is typically only
invoked internally by flutter itself.
In debug mode iOS builds, we build a stub App.framework with no
functionality, since the engine itself loads the code from the included
bundle and subsequently via hot reload. This is simply done for
consistency with profile/release AOT app structure.
To satisfy the linker, ensure that we're building this code for all
build architectures, not just CURRENT_ARCH.
This is pre-work for supporting arbitrary iOS architectures (armv7,
arm64, universal) in Flutter.
This re-lands feb16d8, which was reverted due to a flaky test.
In debug mode iOS builds, we build a stub App.framework with no
functionality, since the engine itself loads the code from the included
bundle and subsequently via hot reload. This is simply done for
consistency with profile/release AOT app structure.
To satisfy the linker, ensure that we're building this code for all
build architectures, not just CURRENT_ARCH.
This is pre-work for supporting arbitrary iOS architectures (armv7,
arm64, universal) in Flutter.
Correctly split ARCHS into a Bash array in xcode_backend.sh.
Previously, when ARCHS contained multiple values (e.g., ARCHS="armv7 arm64"),
we treated that as a single architecture, and lipo invocation would
fail.
iOS debug builds always run in interpreted mode whether on device or on
simulator. In both cases, we can skip snapshotting and link against an
empty App.framework. Previously, we did this for iOS simulator builds.
This does the same for device builds.
Previously, debug iOS builds used gen_snapshot to generate a core
snapshot, then used 'xxd' to generate C files containing the snapshot
data in buffers named kDartVmSnapshotData and kDartIsolateSnapshotData,
which are then compiled/linked into App.framework. This is unnecessary
since the VM compiled into Flutter.framework already contains this data.
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
This re-lands 8c4f0c0d21 with a fix to
xcode_backend.sh to eliminate the use of --interpreter.
* Created plumbing but has stream problem
* testing with makePipe
* Trying pipe but not really getting anywhere
* works by repeatedly reading line
* Minor cleanup
* works
* Clean up pipe after use.
* Move the last status forward
* Make sure failed script commands bubble up
Pull code out of flx.dart:assemble() to make flx.dart:buildAssets
which creates the AssetBundle. This will allow us to create just
this instead of an entire FLX.
* Revert "Revert "Reduce xcodebuild noise #2" (#14641)"
This reverts commit 2d47481f1e.
* Stop scrapping xcodebuild output, get the right build settings
* clone the command params first
* Reduce noise in xcodebuild stdout
* Reduce output from cleaning, from non failing xcode outputs and from script
* Check xcodebuild clean's exit code
* Revert "Reduce noise in xcodebuild stdout"
This reverts commit 222a26f55f.
* Revert "Include a directory with Flutter assets (#12944)"
This reverts commit 3af6b9cbf5.
* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"
This reverts commit 08128cb29b.
* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"
This reverts commit 35f1a04195.
* mark complex_layout_ios__start_up as flaky