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.
* Revert "Revert "Send text error in JSON and print in tools (#58284)" (#58872)"
This reverts commit c2d5e18cb2.
* Put streamListen in try/catch if extension events already listened for
* Send text error in JSON and print in tools
* Add test for error text
* Fix analysis issues
* Move streamListen to try/catch and use global.printStatus
* Extract print error fn and listen for events in web runner
* Add extension listen request to test
* Update packages/flutter_tools/lib/src/resident_runner.dart
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* Rename error parsing method
* Allow crash if listen for extension stream fails
* Add test for error and non-error extension events
* Fix formatting for TextTreeRenderer
* Use shorter message for second exceptions
* Specify types for map
* Add empty JSON for resident_web_runner test
* Move stream listen to vmservice and add vmservice test
* Fix stream type
* Move structured error log definition to vmservice
* Use correct test matcher isNot
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Remove caching of FlutterView. Perhaps the FlutterView RPC might return an empty list if the VM is not quite up yet? We had some old logic to poll the flutter views RPC for up to 200ms. That doesn't seem like a great approach, so instead we could forgo it entirely and trust that either the views come up before the developer tries to interact, or we crash.
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
* 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