This reverts commit adc9dde3ba.
- Fixed issue where `FallbackDiscovery` would hold on to a `VmService` when launching on iOS devices, causing DDS to fail to start
- Fixed `flutter drive` case where DDS is already running in another flutter_tools instance
The embedder requires that the isolate is unpaused, because the runInView method requires interaction with dart engine APIs that are not thread-safe. These APIs must be run on the same thread that would be blocked by the pause. Simply unpausing is not sufficient, because this does not prevent the isolate from immediately hitting a breakpoint, for example if the breakpoint was placed in a loop or in a frequently called method. Instead, all breakpoints are first disabled and then the isolate resumed.
To support #61407 , the tool needs to check if a single widget reload is feasible, and then conditionally perform a fast reassemble.
To accomplish this, the FlutterDevice class will have a WidgetCache injected. This will eventually contain the logic for parsing the invalidated dart script. Concurrent with the devFS update, the widget cache will be updated/checked if a single widget reload is feasible. If so, an expression evaluation with the target type is performed and the success is communicated through the devFS result. An integration test which demonstrates that this works is already present in https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/integration.shard/hot_reload_test.dart#L86
Finally, when actually performing the reassemble the tool simply checks if this flag has been set and calls the alternative reassemble method.
Cleanups:
Remove modules, as this is unused now.
Add feature flags for android, ios, and fuchsia (on by default). After updating the g3 rollers, the fuchsia feature will be turned off by default. Creates a simpler base type of feature flags for g3 to extend.
Updates android, ios, fuchsia workflows to use feature flags check.
Removes concept of stable artifacts and checks on flutter version.
Fixes#58999#52859#12768
The Xcode build almost always takes longer than 2 seconds. With the
operation classified as a "fast operation", the Flutter tool will
warn the user that the build is "taking an unexpectedly long time".
This updates the operation to be a "slow operation", which will only
warn the user if it takes 2+ minutes.
Allow configuring the flutter_manifest to support a synthetic package, this is done through flutter: generate: true.
When running pub get, insert a flutter_gen entry into the packages if it does not already exist. This points to .dart_tool/flutter_gen, which can be updated to contain the generated intl sources (But doesn't currently)
Adds an integration test that verifies this code can be run and imported when enabled.
Part of #60914
Enable null safety asserts for web debug mode. This induces runtime asserts at the boundaries between null safe and non-null safe libraries. Adds integration test that validates assertion error is thrown.
#61042
Skip unnecessary parsing of chrome URI. Ensure stack traces are initialized in web server. Disclaimer on web server that it does not support debugging and remove help message. Fix generated entrypoint to check for main(List<String> args)
- Fixes#59643
- Fixes#55084
- Fixes#60417
Made flutter tools serve metadata produced by the frontend server:
pass --experimental-emit-metadata flag to flutter engine
store and serve metadata from web asset server
store and serve merged metadata from web asset server
add tests to verify that metadata is served from memory
update dwds version so it can read metadata
configure dwds to read metadata from file
Prerequisite changes (landed):
sdk: https://dart-review.googlesource.com/c/sdk/+/150181
flutter engine: flutter/engine#19168
webdev:dart-lang/webdev#1064
We have too many loggers, and the logger construction rules are too complicated to be untested. Capture these in a LoggerFactory and test that construction is correct.
Fixes#45075Fixes#57210
If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants".
The solution is to include project ephemeral directories, in addition to the build directory.
update flutter precache --force to delete all stamp files. In the event that a user is hitting a cache issue, this should be easier than re-downloading all artifacts or manually blowing away the cache.
This is probably how it should have worked in the first place
Remove globals from flutter_tester device and cleanup test case. Not completely gone since the Kernel Builder will still use them, but a good incremental improvement.
* First pass at CMake files; untested
* First pass of adding CMake generation logic on Windows
* Misc fixes
* Get bundling working, start incoprorating CMake build into tool
* Fix debug, exe name.
* Add resources
* Move cmake.dart
* Rip out all the vcxproj/solution plumbing
* Fix plugin cmake generation
* Build with cmake rather than calling VS directly
* Adjust Windows plugin template to match standard header directory structure
* Pass config selection when building
* Partially fix multi-config handling
* Rev template version
* Share the CMake generation instead of splitting it out
* VS build/run cycle works, with slightly awkward requirement to always build all
* Update manifest
* Plugin template fixes
* Minor adjustments
* Build install as part of build command, instead of separately
* Test cleanup
* Update Linux test for adjusted generated CMake approach
* Plugin test typo fix
* Add missing stub file for project test
* Add a constant for VS generator
initialize from dill does not handle changing null-safety flags and will incorrectly use the nullability mode of the last compile. Add all extra frontend options to the unique name prefix for the flutter run dill cache to avoid this situation.
In web debug mode, infer sound null safety by default. When sound null safety is enabled, provide a separate dill and precompiled Dart SDK. Release builds do not need this setting since we run dart2js from source.
Fixes#59873
The flutter daemon unconditionally waits for the appFinished signal, even if startup failed. Ensure this future is correctly completed if there is a failure in ResidentRunner.run and not just ResidentRunner.attach. Adds regression tests for run release, debug, debug web, and release web. Adds missing try catch in cold runner startup.
Manually tested with release/debug on Android and release/debug on web.
Fixes#60613
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info.
It needs to stick around for the fuchsia deps we do not control.
Filled #60232 for remaining work.
First pass at fixing #57985 and implementing #59602
This doesn't have enough metadata to be useful for IDEs yet, but it prevents the issue from getting worse while we iterate on it.
WebAssetServer could fail if some of the global statics it depended on were initialized in a different order. Fix this by removing globals.
Delete dwds startup test that needs to spawn a real server.
Remove the version checking and associated warnings. The Linux template
and build process will now be subject to more typical Flutter breaking
change policy, and should no longer require regularly deleting and
recreating the platform directory.
This rolls the engine from:
965fbbed1776545ee681cb57f3fb1d0c2000bbcb to
b5f5e6332cb4987e9e38ffaa267733ec0a8705ba. A Dart SDK roll in this range
changed the format of the compileExpression RPC VMService endpoint,
necessitating a tool patch.
In google3, the Linux device is always available, and it has confused
people who run the Flutter doctor and see
"• Linux • Linux • linux-x64 • Linux" listed.
Rename the Linux device name to "Linux desktop" and the device ID to
be "linux". Make similar changes to the Windows and macOS
devices for consistency. This is also consistent with the web
devices.
The device ID change shouldn't be break -d usage since that does a
case-insensitive prefix match.
On Windows, Process.run assumes the output uses the system codepage by default. This allows specifying it in our wrapper, and sets the encoding for vswhere to UTF-8 since we're passing a flag that forces it to use UTF-8 output.
Fixes#53515
Some of the null-safety commands were missing - plumb them through. Ensure that verbose mode shows their output, and clean up the messaging around sound-null-safety.
Fixes#59769
Adds a test that validate each of the null safety supporting build commands has everything plumbed through.
https://github.com/dart-lang/coverage - 0.14.0 added the ability to be able to ignore coverage depending on comments.
// coverage:ignore-line to ignore one line.
// coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive.
// coverage:ignore-file to ignore the whole file.
Refactors KernelCompiler and ResidentCompiler to no longer use globals (except as a fallback for g3 migration). Improves the compilation error when running flutter test on a package without a flutter_test dependency.
Updates machine mode to output trace text to stderr
A frequent request from the last Flutter developer survey was for an easier method of testing light/dark mode changes. Currently, a user needs to manually change the theme settings or adjust phone settings to see the difference. Instead we should add a toggle from the CLI, and eventually devtools/Intellij/Vscode that allows developers to override the current setting.
Fixes#59495
Adds flutter.ext.brightnessOverride service protocol which either queries the current platform brightness, or overrides it to a new value. This accepts either Brightness.light or Brightness.dark as a value.
Adds a CLI toggle b which allows the setting to be toggled manually.
Requires an update to the MediaQuery, to conditionally use a debug override when not in release mode
Failing dev/integration_tests/ui/test_driver/keyboard_resize_test.dart
Also timing out on new_gallery_ios__transition_perf
This reverts commit c7a37c72c2.
Updates the tooling to use the GTK embedding, rather than the GLFW embedding:
- Adds new requirements to `doctor`
- Updates the app and plugin templates to make GTK-based runners and plugins
- Stops downloading and installing the GLFW artifacts
Final part of #54860, other than cleanup.
This command was previously used by the re-entrant build scripts in xcode_backend.sh and build.gradle. These have since been refactored to use flutter assemble.
Deprecation the command in preparation for removal in a future release of flutter. The only current use is a test on HHH
Ensure that the language version of the test/web generated entrypoint matches the language version of the test file to run, or the overall package language version if no annotation is provided.