Commit graph

100 commits

Author SHA1 Message Date
Jonah Williams a0334fb500
[flutter_tools] maintain file manifest for create (#59706)
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.
2020-06-24 16:20:21 -07:00
Jonah Williams f8c9e1bb67
[flutter_tools] de-flake integration tests (#60221)
The vm_service_integration test flake is caused by trying to call the method before the framework is initialized (and the extension added). The run errors failure is caused by the error taking some time to propagate to the harness
2020-06-24 12:14:58 -07:00
Anna Gringauze aac836c6ad
Enabled expression evaluation by default (#59826) 2020-06-19 15:23:03 -07:00
Helin Shiah f7a09bd2df
Add integration tests for structured error (#59809) 2020-06-19 13:58:03 -07:00
Jonah Williams e1f4cfb4f4
[flutter_tools] add toggle b and service extension to change platform brightness (#59571)
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
2020-06-18 10:32:43 -07:00
Per Classon 56a7dacd46
[flutter_tools] For l10n with deferred loading, use loadLibrary for non-web too (#59539)
After Dart VM change we are now required to use loadLibrary on an import whenever it is imported as deferred.

See: https://dart-review.googlesource.com/c/sdk/+/149613
2020-06-16 13:36:28 -07:00
Jonah Williams 15154b115f
[flutter_tools] deprecate build aot (#59487)
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
2020-06-16 13:00:11 -07:00
Jenn Magder 222c2cb0cc
Deprecate make-host-app-editable (#59217) 2020-06-11 11:37:15 -07:00
Jonah Williams d911eadf95
[flutter_tools] create NotifyingLogger at the top level when running flutter run --machine or flutter attach --machine (#59087)
Removes dependency on injecting additional logger with zones
2020-06-09 15:39:27 -07:00
Jonah Williams d0abf7f90f
[flutter_tools] don't use verbose when in doctor or help command (#58798) 2020-06-05 10:12:11 -07:00
Jonah Williams f5de6aadd4
[flutter_tools] remove zone level overrides of verbose and daemon logging (#57448)
Make it possible for all FlutterCommands to be global free, by moving instantiation to inside the Zone context. Additionally, provide VerboseLogger and NotifyLogger (daemon) at the top level and remove from command-specific overrides.

This allows removing a work around where web devices needed to look up directly from the context in non-test code.

Technically the output preferences are still zone injected, but these will be moved soon as they were not being used correctly by the top level command (the injection comes after ArgParser reads the overflow values, causing numerous wrap issues)
2020-06-04 16:35:36 -07:00
Jonah Williams 600338286f
[flutter_tools] add vm service method to pull SkSL (#57813) 2020-05-27 10:10:41 -07:00
Jonah Williams ffc56ff735
[flutter_tools] hide all development tools (#57690) 2020-05-27 10:10:19 -07:00
Jonah Williams 70b889a9a3
[flutter_tools] reland: integrate l10n tool into hot reload/restart/build (#57510)
Reland: #56167
2020-05-18 12:47:18 -07:00
Zachary Anderson 533cd7a6d1
[flutter_tools] Delete system temp entries on fatal signals (#55513) 2020-05-14 14:27:02 -07:00
Anna Gringauze e88ef6d554
Updated dwds (and other packages) (#56958) 2020-05-13 09:07:09 -07:00
Jonah Williams d70d0913b2
Revert "[flutter_tools] integrate l10n tool into build/run (#56167)" (#56800)
This reverts commit f865ac7e25.
2020-05-09 17:50:46 -07:00
Jonah Williams f865ac7e25
[flutter_tools] integrate l10n tool into build/run (#56167)
* [flutter_tools] integration l10n tool

* add runtime skip to build system

* Update build_system.dart

* add links to issues, comments

* Update packages/flutter_tools/test/general.shard/build_system/build_system_test.dart

Co-authored-by: Shi-Hao Hong <shihaohong@google.com>

* Update packages/flutter_tools/lib/src/build_system/targets/localizations.dart

Co-authored-by: Shi-Hao Hong <shihaohong@google.com>

* Update localizations.dart

* switch to gen_l10n localizations

* fix tests

Co-authored-by: Shi-Hao Hong <shihaohong@google.com>
2020-05-08 12:06:15 -07:00
Zachary Anderson 6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Devon Carew 3f9ede1311
fix the reload and restart service extension methods (#56240) 2020-05-04 11:34:02 -07:00
Jonah Williams ffcf1db3ca
[flutter_tools] reland migrate FlutterViews to package:vm_service (#55797)
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
2020-04-27 17:41:42 -07:00
Jenn Magder 958ab9336f
Revert "[flutter_tools] reland migrate FlutterView to new vmservice (#55774)" (#55788)
This reverts commit a18e6361cf.
2020-04-27 16:19:25 -07:00
Jonah Williams a18e6361cf
[flutter_tools] reland migrate FlutterView to new vmservice (#55774) 2020-04-27 15:54:59 -07:00
Jonah Williams 07c451fea9
Revert "[flutter_tools] migrate FlutterView to new vm_service (#55341)" (#55772)
This reverts commit 2e50fd75eb.
2020-04-27 14:26:56 -07:00
Jonah Williams 2e50fd75eb
[flutter_tools] migrate FlutterView to new vm_service (#55341)
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
2020-04-27 14:16:28 -07:00
Christopher Fujino 4552af155c
[flutter_tools] enable flutter upgrade to support force pushed branches (#55594) 2020-04-24 17:55:16 -07:00
Anna Gringauze 873b21ec04
fixed flutter pub get failure in tests (#55499) 2020-04-24 09:09:01 -07:00
Anna Gringauze bc1c1b2ff8
Add flag to enable expression evaluation for web (#55003)
* 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>
2020-04-17 10:42:02 -07:00
Anna Gringauze b69b2a8c9e
Convert expression evaluation exceptions to errors (#54916) 2020-04-17 10:40:02 -07:00
Jonah Williams 159710ecc5
[flutter_tools] fix response format of flutterVersion, flutterMemoryInfo (#54786) 2020-04-14 15:37:49 -07:00
Jonah Williams 9cc69d47a5
[flutter_tools] support machine and coverage together but for real (#54692) 2020-04-13 19:00:02 -07:00
Shi-Hao Hong c16c3b0443
[gen_l10n] Expand integration tests (#54314) 2020-04-10 10:25:03 -07:00
Per Classon 4451ffca23
Add option for deferred loading to gen_l10n (#53824) 2020-04-09 03:57:01 -07:00
Shi-Hao Hong 5d63637e43
[gen_l10n] Fallback feature for untranslated messages (#53374)
* Generate methods using template resources if they do not exist in other locales

* Added a flag to either output of messages that have not been translated with detail into a file, or display a summary on the terminal.

* Add integration test for fallback message usage
2020-04-08 18:55:50 -07:00
Per Classon e8d2907595
[gen_l10n] Handle single, double quotes, and dollar signs in strings (#54185) 2020-04-07 12:21:02 -07:00
Shi-Hao Hong 4e811d2819
[gen_l10n] Fix plural parsing for translated messages (#53954) 2020-04-03 15:46:01 -07:00
Shi-Hao Hong 6837b0e353
[gen_l10n] Add scriptCode handling (#53868)
* [gen_l10n] Add scriptCode handling
2020-04-03 09:46:01 -07:00
Christopher Fujino 2396616e09
Support old and new git release tag formats (#53715) 2020-04-03 09:39:28 -07:00
Christopher Fujino 1a685e03a2
Improve downgrade-upgrade integration test (#53775) 2020-04-02 10:35:30 -07:00
Anna Gringauze 3a0d837741
Enable expression evaluation in debugger for web platform (#53595) 2020-04-02 10:26:03 -07:00
Shi-Hao Hong 19e7db585d
[gen_l10n] Escape special JSON characters in generateString utility function (#53605) 2020-04-01 11:16:01 -07:00
Jonah Williams 10571920c0
[flutter_tools] update to latest dwds API (#52936)
Should fix issues introduced in web-server device and allow loading org-dartlang-app URIs
2020-03-23 18:47:50 -07:00
Jonah Williams b7101b45f5
[flutter_tools] disable added integration test due to Cirrus flakes (#52782) 2020-03-17 19:07:22 -07:00
Jonah Williams 6884086e5c
[flutter_tools] Update to latest dwds APIs (#51004)
Update to latest dwds APIs, moving back to dwds driven hot restart and enabling future work on expression evaluation.
2020-03-17 17:29:53 -07:00
Shi-Hao Hong 183da8f837
[gen_l10n] Fix suppportedLocales list (#52448)
* Fix suppportedLocales list

* Refactor integration tests for gen_l10n tool to catch exceptions
2020-03-12 12:58:13 -07:00
Jonah Williams d98213c46f
[flutter_tools] reland: Update background isolates when performing hot reload/restart (#52479)
Reland of #52149
2020-03-12 12:48:05 -07:00
Zachary Anderson 04a1b78b75
Revert "[flutter_tools] Update background isolates when performing hot reload/restart (#52149)" (#52476)
This reverts commit edd03a1af8.
2020-03-12 09:02:31 -07:00
Jonah Williams edd03a1af8
[flutter_tools] Update background isolates when performing hot reload/restart (#52149)
When performing a hot restart, collect isolates without an attached flutter view and send a kill signal. These must have been spawned by running main, so restarting without removing them leads to isolate duplication.

When performing a hot reload, ensure that we send a reloadSources command to every isolate and not just uiIsolates.
2020-03-11 15:52:04 -07:00
Zachary Anderson 6c408a0567
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#52021)
* Reland: [flutter_tool] Where possible, catch only subtypes of Exception

* Add armv7f to getIOSArchForName
2020-03-06 10:22:12 -08:00
Jonah Williams 35bf5ab5d0
[flutter-tools] add awaits to debug a potential timing issue (#52047) 2020-03-05 15:24:28 -08:00