Commit Graph

63 Commits

Author SHA1 Message Date
Ian Hickson
4d788b109d
Reduce animations further when --no-cli-animations is set. (#133598) 2023-11-16 21:05:22 +00:00
Ian Hickson
89310edaa2
Use a fake stopwatch to remove flakiness. (#133229)
Fixes https://github.com/flutter/flutter/issues/133215
2023-08-29 12:49:33 -07:00
Ian Hickson
487bd69078
Support disabling animations in the CLI (#132239) 2023-08-23 03:35:22 +00:00
Victoria Ashworth
fa01649a59
Update device selection to wait for wireless devices to load (#122932)
Update device selection to wait for wireless devices to load
2023-03-29 17:58:07 +00:00
Ian Hickson
d29668ddb2
Improve network resources doctor check (#120417)
...and various other minor cleanup:

* Moved "FLUTTER_STORAGE_BASE_URL" into a constant throughout the code. There are other strings that we should do that to but this one was relevant to the code I was changing.

* Fixed the logger's handling of slow warnings. Previously it deleted too much text. Fixed the test for that to actually verify it entirely, too.

* Made the logger delete the slow warning when it's finished.

* Fixed 'Please choose one (To quit, press "q/Q")' message to be the cleaner 'Please choose one (or "q" to quit)'.

* Added a debug toString to ValidationResult for debugging purposes (not used).

* In http_host_validator:

  - Shortened constant names to be clearer (e.g. kPubDevHttpHost -> kPubDev).
  - Added GitHub as a tested host since when you run `flutter` we hit that immediately.
  - Renamed the check "Network resources".
  - Updated the `slowWarning` of the check to say which hosts are pending.
  - Removed all timeout logic. Timeouts violate our style guide.
  - Removed `int.parse(... ?? '10')`; passing a constant to `int.parse` is inefficient.
  - Replaced the `_HostValidationResult` class with `String?` for simplicity.
  - Improved the error messages to be more detailed.
  - Removed all checks that dependened on the stringification of exceptions. That's very brittle.
  - Added a warning specifically for HandshakeException that talks about the implications (MITM attacks).
  - Replaced exception-message-parsing logic with just calling `Uri.tryParse` and validating the result.
  - Replaced a lot of list-filtering logic with just a single for loop to check the results.
  - Replaced code that added a constant to a known-empty list with just returning a constant list.
  - Revamped the logic for deciding which hosts to check to just use a single chain of if/else blocks instead of getters, lists literals with `if` expressions, `??`, functions, etc spread over multiple places in the code.
2023-02-15 00:02:09 +00:00
Sam Rawlins
f255390f4d
Remove redundant arguments passed to redirecting factory constructors (#115497) 2022-11-17 00:47:14 +00:00
Jenn Magder
8c8bb22222
BufferLogger should log stacktrace (#113240) 2022-10-11 20:14:18 +00:00
Liam Appelbe
ec75399beb
Null safety migration of packages/flutter_tools/test/general.shard, part 1/2 (#110711)
* Migrate packages/flutter_tools/test/general.shard, part 1/2

* Fix most of the tests

* Fix analysis

* Fix analysis

* Fix test

* Fix analysis

* Fix analysis

* Fix nit
2022-09-08 15:25:27 -07:00
Michael Goderbauer
e27a19e3f8
Remove outdated ignores (#108924) 2022-08-03 23:37:05 +00:00
Christopher Fujino
9c138f9c76
[flutter_tools] warn when doctor takes long (#100805)
* warn when doctor takes long
2022-03-28 14:13:28 -07:00
Lau Ching Jun
d7688ca093
Change all instance of throwing strings to throw specific error classes. (#97325) 2022-02-02 10:45:18 -08:00
Emmanuel Garcia
79bc1bfa89
Add ability to wrap text messages in a box (#94391) 2021-12-15 13:19:11 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Jonah Williams
63a4013160
Revert "[flutter_tools] let the logger know about machine mode (#86116)" (#86363)
This reverts commit 53d8cba3ec.
2021-07-13 10:39:35 -07:00
Jonah Williams
53d8cba3ec
[flutter_tools] let the logger know about machine mode (#86116) 2021-07-12 10:41:03 -07:00
Lau Ching Jun
89a3c353e6
Add more analytics for hot reload in flutter_tools. (#83972) 2021-06-07 18:51:47 -07:00
Alexandre Ardhuin
7d46d43635
use throwsXxx instead of throwsA(isA<Xxx>()) (#82328) 2021-05-12 09:59:02 -07:00
Ian Hickson
33b183e6c9
Fix extra blank lines in logger output (#81607) 2021-05-03 09:19:02 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Sam Rawlins
68492c5b69
Remove "unnecessary" imports. (#78664) 2021-04-06 11:19:02 -07:00
Jonah Williams
4807f806e2
[flutter_tools] remove globals from logger (#78353) 2021-03-16 16:46:21 -07:00
Michael Goderbauer
cb867bbedc
Enable unnecessary_await_in_return lint (#77434) 2021-03-05 18:38:15 -08:00
Michael Goderbauer
7b251f5f37
Enable use_function_type_syntax_for_parameters lint (#77163) 2021-03-04 08:59:17 -08:00
Jonah Williams
fc35508a40
[flutter_tools] remove mock from logger tests (#77064) 2021-03-02 10:35:44 -08:00
Michael Goderbauer
fc99e7c0d7
Enable missing_whitespace_between_adjacent_strings (#77027) 2021-03-01 18:30:17 -08:00
Jonah Williams
dce8f71228
[flutter_tools] do not use context logger in gradle (#75940) 2021-02-12 17:38:52 -08:00
Jonah Williams
18b1e23e89
[flutter_tools] move some fakes out of mocks.dart (#74992) 2021-01-29 14:28:18 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
J-P Nurmi
e1ff62a78c
[flutter_tools] propagate build errors from the backend (#72196) 2021-01-14 13:39:05 -08:00
Jonah Williams
9e70180f63
[flutter_tools] do not measure progress timeout (#67959)
Remove "This is taking a long time" progress timeout and TimeoutConfiguration.
2020-10-13 13:05:47 -07:00
James D. Lin
e4206ac5dd
[flutter tools] Add a DelegatingLogger class (#67581)
[flutter tools] Add a DelegatingLogger class

Move most of `DelegateLogger` `from test/src/testbed.dart` to
`lib/src/base/logger.dart` to better formalize the common practice of
chaining `Logger`s together.  I renamed the class since it isn't
itself the delegate and to better match the `Delegating...` classes
from `package:collection`.

Additionally, add a freestanding `asLogger<T>` function to "cast" a
`Logger` into a matching delegate if possible.  This will allow
`Logger` chains to be ordered a *bit* more freely (e.g.
`NotifyingLogger` and `AppRunLogger` will no longer required to be
at the end of the chain, an unwritten rule that has led to breakage in
google3).  Chain order still matters since lack of virtual dispatch
means that parent `Logger`s can never invoke child methods, however.

I made `asLogger<T>` a freestanding function because I didn't want to
make it part of the `Logger` interface (and I thought that making it
an extension method might be weird).

Bonus cleanup:
There no longer appears to be a way to construct an `AppRunLogger`
with a null parent, so remove all of code paths for that case and
make the `parent` construction parameter required.
2020-10-09 15:55:24 -07:00
Devon Carew
04e4b117f6
fix an issue where raw json output is written to IDE clients (#65508)
fix an issues where raw json output was written to IDE clients
2020-09-15 12:44:05 -07:00
Jonah Williams
9225d8d5b7
[flutter_tools] move to fake_async, skip failing tests (#63536) 2020-08-11 19:36:05 -07:00
Jonah Williams
fbca40add2
[flutter_tools] abstract logger construction (why can't I hold all these loggers) (#61201)
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.
2020-07-10 11:51:47 -07:00
Jenn Magder
20fe2f88c5
Prefer tear offs to lambdas in test expects (#61196) 2020-07-09 17:58:51 -07:00
Zachary Anderson
6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Christopher Fujino
03c566768b
[flutter_tools] Remove fromPlatform from tests (#54152) 2020-04-10 16:51:28 -07:00
Alexandre Ardhuin
c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
Jonah Williams
3489da9328
[flutter_tools] no more MockLogger in tests (#51684) 2020-03-02 16:23:56 -08:00
Zachary Anderson
914bd76979
[flutter_tools] Handle errors on the std{out,err}.done future (#51660) 2020-02-28 22:31:01 -08:00
Zachary Anderson
bf32974189
[flutter_tools] Handle asynchronous errors writing to stdio (#50779) 2020-02-14 10:38:02 -08:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Zachary Anderson
c23d9cd4ce
[flutter_tools] Print emojis in Windows Terminal (#50446) 2020-02-10 10:23:35 -08:00
Alexandre Ardhuin
b953c3e5a8
use raw strings to avoid escaping (#50322) 2020-02-07 16:35:55 +01:00
Zachary Anderson
68ed5c2baf [flutter_tool] Hide unsafe std{out,err} operations (#49561) 2020-01-28 07:58:02 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Zachary Anderson
93a5b7d419 [flutter_tool] Don't crash on a failure to write to std{out,err} (#49380) 2020-01-25 01:23:01 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00