If the vm of an attached device rejects a hot reload, pretty print the reason. Suggest a hot restart so that users are aware that they do not have to detach and rebuild. Also resets the last compilation time, so a subsequent restart would still apply the last change. Adds an integration test for the const field removal.
Fixes#64027
Cleans up some undocumented classes and re-organizes the AndroidDevices class to avoid the need for the static testing only member. Adds a script for tracking globals.
Integration tests must only go through the real file system/process manager/platform. The global indirection makes this code harder to understand than if it directly referred to the concrete instances that are being used.
Update the integration shard to use a const instance of a LocalFIleSystem, LocalProcessManager, and LocalPlatform. Remove global usage and apply testWithoutContext.
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
For #61407 , we need to be able to find all widgets that of a given type. Previously I experimented with using the type name, but of course this does not handles subtypes. The actual check needs to be an is check.
Since there is no way to convert a String to a Type at runtime for use in this check, we can instead evaluate an expression which assigns a closure to a field. The idea for this was inspired by how the dart devtools adds debug functionality to older versions of flutter.
Since the reload feature is not complete yet, adds an integration test which simulates how it will eventually behave
Move FlutterView and related RPCs to the package:vm_service implementation. Update some getIsolate calls with catchError to match previous behavior.
- Updates tests that were previously mocking FlutterViews to use real views
- Moves the FlutterView cache from VM to FlutterDevice
- Catch SentinelException during Isolate.kill
Move FlutterView and related RPCs to the package:vm_service implementation. Update some getIsolate calls with catchError to match previous behavior.
- Updates tests that were previously mocking FlutterViews to use real views
- Moves the FlutterView cache from VM to FlutterDevice
- Catch SentinelException during Isolate.kill
* Add flag to enable expression evaluation for web
Added flag --web-enable-expression-evaluation to flutter run commmand
that enables expression evaluation from IDEs for web target. Disabled
by default.
Helps https://github.com/flutter/flutter/issues/54520
* Update packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
Co-Authored-By: Jonah Williams <jonahwilliams@google.com>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* Fix expression evaluation test leaking flutter_tester processes.
Let flutter_tester process complete, wait for it completion, kill the test only if didn't complete on time.
* Type annotation
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs
* Resume isolate before terminating tests to prevent flutter_tester leak
* Fix lint
* Catch exceptions from resume() as well as timeout()
* Formatting fixes
* Don't try to resume if there's no vm service
* Fix handling of timeouts to not leak futures