Commit graph

14775 commits

Author SHA1 Message Date
Greg Spencer 7181c7a86a
Convert some more widget tests to NNBD (#68160) 2020-10-15 14:27:04 -07:00
Dan Field 12f54e17f4
reland List queue search optimization (#68214)
* Revert "Revert "Improve performance of collectAllElements (#68065)" (#68207)"

This reverts commit 46ff57d6f1.

* use fewer elements for benchmark
2020-10-15 13:46:50 -07:00
Jonah Williams 0f88644883
[devicelab] allow the devicelab to take a screenshot if the iOS connection fails with FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE (#68156)
More attempts to remote diagnose the issues in the iOS devicelab
2020-10-15 13:13:28 -07:00
Greg Spencer 3f56178df8
Convert some more widget tests to NNBD (#68129) 2020-10-15 11:26:11 -07:00
Darren Austin f7ee440207
Migrate yet even more widget framework tests to null safety. (#67941)
Migrate yet even more widget framework tests to null safety.
2020-10-15 11:12:02 -07:00
Jonah Williams 27936e9f22
Revert "[flutter_tools] ensure android log reader works in flutter drive (#68131)" (#68222)
This reverts commit d962c8f2a2.
2020-10-15 10:50:56 -07:00
Jonah Williams 2321b72dfb
[flutter_tools] move gradle download failure handling into tool (#68140)
This crash affects anyone using flutter, so move it into the tool where it can be tested and documented. Ensure it works on windows devicelab too.
2020-10-15 09:20:52 -07:00
Jonah Williams 46ff57d6f1
Revert "Improve performance of collectAllElements (#68065)" (#68207)
This reverts commit 8ba5732c4c.
2020-10-15 08:04:59 -07:00
Michael Goderbauer aaaf37418b
Migrate last batch of tests (#68163) 2020-10-14 22:52:05 -07:00
Hans Muller bf6460f935
Updated Builder API doc (#68151) 2020-10-14 22:47:04 -07:00
Michael Goderbauer e3184b38be
Migrate some widget tests to NNBD (#68150) 2020-10-14 22:42:05 -07:00
Shi-Hao Hong dfc6c4386a
[NNBD] More widget tests (#68088)
* NNBD widget test migration
2020-10-15 13:39:06 +08:00
Dan Field 8ba5732c4c
Improve performance of collectAllElements (#68065) 2020-10-14 21:32:04 -07:00
Pedro Massango ff85d97ae5
Expose the tileColor property (#67135) 2020-10-14 21:27:07 -07:00
Sam Rawlins 12bea61c29
Mark unusuallyLongTimeout as internal (#68038) 2020-10-14 15:57:04 -07:00
Albert Wolszon e8343c0ec4
Add missing margin to SnackBarAction (#67167) 2020-10-14 15:47:03 -07:00
Jenn Magder 1fb94fb894
Noninteractive iOS debugger session (#68145) 2020-10-14 15:38:07 -07:00
Darren Austin 2c59a3a760
Migrate Switch tests to null safety. (#68133) 2020-10-14 15:32:04 -07:00
xubaolin f2d5f1f61f
Add test case for AndroidView clipBehavior (#67913) 2020-10-14 15:27:03 -07:00
Jenn Magder a82807d782
Run Xcode command lines tools in native ARM (#68050) 2020-10-14 15:24:32 -07:00
Yash Johri 0a130100ac
Updated tests (#67083) 2020-10-14 15:22:04 -07:00
Jonah Williams d962c8f2a2
[flutter_tools] ensure android log reader works in flutter drive (#68131) 2020-10-14 14:04:33 -07:00
Jenn Magder 537cf33a21
Move processUtils to globals (#67976) 2020-10-14 13:12:46 -07:00
Jonah Williams 767fb98a7b
[flutter_tools] partial revert of start app change (#68128)
* [flutter_tools] partial revert of start app change
2020-10-14 12:20:30 -07:00
Jenn Magder 431c599bec
Revert "[flutter_tools] If run fails to install the application on iOS, try uninstalling it and trying again. (#68078)" (#68118)
This reverts commit 61ba7dd218.
2020-10-14 10:07:30 -07:00
Jonah Williams 61ba7dd218
[flutter_tools] If run fails to install the application on iOS, try uninstalling it and trying again. (#68078) 2020-10-14 09:14:36 -07:00
Per Classon 8a7fd39b85
[Material] Parent checkbox in DataTable should deselect all, if children checkboxes are disabled or selected (#67938) 2020-10-14 08:57:06 -07:00
xubaolin 7eeab2666b
Fix DropdownButton bug (#65915) 2020-10-14 01:52:03 -07:00
HeavenOSK 66cf8d47a3
[Improvement] Add prefix Alignment. for toString of Alignment (#67860)
* modify: add prefix `Alignment.` for toString of Alignment
2020-10-14 13:47:28 +08:00
Jonah Williams 4b351ac1b4
[flutter_tools] do not allow attaching in release mode (#68071)
Do not allow attach in release mode, as there is not VM Service to connect to. Observed in crash reporting as thrown string which is changed to exception below.
2020-10-13 21:29:23 -07:00
Jonah Williams 751459df24
[flutter_tool] support --use-application-binary in flutter drive (#68060)
--use-application-binary allows running with an already built APK. This can be useful for speeding up CI test cases, or in our case eventually supporting some sort of build server. Demonstrate that this works by updating the old gallery test to use it. Fixes #56604

Co-authored-by: Jenn Magder <magder@google.com>
2020-10-13 19:27:30 -07:00
Darren Austin ca065f6456
Migrate more Material framework tests to null safety. (#67790)
* Migrate more Material framework tests to null safety.
2020-10-13 16:48:41 -07:00
Greg Spencer ef119187d0
Convert some widgets tests to NNBD (#67782)
Migrating some more widget tests to NNBD.
2020-10-13 14:41:24 -07:00
Kate Lovett 085f1daa43
Clean up after large refactor (#67939) 2020-10-13 13:42:02 -07:00
Kate Lovett 46d1b7d8e8
[NNBD] Migrate some Widgets tests (#68034) 2020-10-13 13:07:05 -07: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
Jenn Magder 3e0d2741de
Detach debugger when VM connection fails on iOS (#68046) 2020-10-13 12:50:50 -07:00
Jenn Magder 4dffc851bc
Detect ARM macOS arch with sysctl hw.optional.arm64 (#67970) 2020-10-13 12:05:04 -07:00
Michael Goderbauer 0343555af1
Migrate more tests (#68037)
* Migrate more tests

* fix
2020-10-13 12:01:53 -07:00
Jonah Williams bdfb07dffd
[flutter_test] export fake from flutter_test (#68032)
Fake has been moved from mockito to test to facilitate NNBD, re-export this from flutter_test
2020-10-13 11:38:00 -07:00
Kate Lovett e48c9b5553
[NNBD] Migrating some Material tests (#67689) 2020-10-13 11:37:03 -07:00
Jonah Williams d6d06ed9f0
[flutter_tools] delete applicationPackageStore (#68026)
This class is entirely superseded by the application package factory. Only drive and install use it, and removing it from drive will allow use-application-binary support.
2020-10-13 11:33:55 -07:00
Jonah Williams 1c976933f3
[flutter_tools] support Android Studio 4.1 on Windows (#67992)
Android Studio 4.1 moved the location of the .home file on Windows which is used to located the install directory. This functionality is important because it is how we locate and discover the Android SDK functionality, as well as the appropriate JRE.

fixes #67986
2020-10-13 11:33:26 -07:00
Miguel Beltran 1aaa455f1b
Fix for "Pass RouteSettings to the internal Route in showCupertinoModalPopup" (#67990) 2020-10-13 11:32:20 -07:00
xubaolin 4982555982
Add more unit test cases for EditableText widget (#66889) 2020-10-13 11:32:03 -07:00
Jonah Williams 37ebe3d82a
Revert "prevent pageView scrolling when calling ensureVisible (#67988)" (#68036)
This reverts commit 62cf4dbf10.
2020-10-13 10:52:23 -07:00
Ren You a57f45e080
Revert "More EditableText docs (#66864)" (#68025)
This reverts commit daa6b2cc29.
2020-10-13 09:08:48 -07:00
xubaolin 62cf4dbf10
prevent pageView scrolling when calling ensureVisible (#67988) 2020-10-12 23:12:02 -07:00
Nobuhiro Tabuki 1e180062aa
[flutter_tools] Support IntelliJ 2020.1 and later on Linux and Windows (#58853)
This PR will update IntelliJ IDEA/Community validation logic for 2020.1 and later on Linux and Windows.
2020-10-12 22:03:36 -07:00
Jonah Williams ac751cc50c
[flutter_tools] verify checksum of downloaded artifacts (#67839)
All of the network requests from google cloud storage include an x-goog-hash header which contains an MD5 checksum. If present, use to validate that the downloaded binary is valid. This will rule out corrupt files as the cause of getting started crashers in the flutter_tool.

#38980

This does not fully resolve the above issue, because while we can check if the checksum matches what was expected from cloud storage, this A) may not necessarily be present and B) may not match up to what should be uploaded as part of the engine build process.

But when life gives you lemons you hash those lemons using an outdated hashing algorithm.
2020-10-12 17:44:23 -07:00
Jonah Williams 5dfe7e6d51
[flutter_tools] attempt to stabilize hot restart benchmark the old fashioned way (#67971)
A change which sped up hot restart locally caused many of the devicelab measures to regress. I think this is because we do not measure when the isolate is actually "ready", so starting a reload or restart prematurely can cause time spent doing initialization to be registered as part of the reload operation.

A fix for this would be to have the framework include some sort of "initialization complete" event ... but it is not clear what the correct trigger would be. Perhaps after the first frame is successfully registered?

(9a3a0dc caused the benchmark regression - possibly since we spend less time syncing files now so we start the restart earlier)
2020-10-12 17:00:26 -07:00
Shi-Hao Hong 46238de8c5
[NNBD] Migrate some Material tests to NNBD (#67887)
Migrates the following files to NNBD: 
* input_decorator_test.dart
* list_tile_test.dart
* localizations_test.dart
* material_button_test.dart
* material_state_property_test.dart
* material_test.dart
* mergeable_material_test.dart
2020-10-13 07:57:23 +08:00
Shi-Hao Hong 244f5ab598
Expose date symbols and patterns for en_US in framework (#67900)
* Expose date symbols and patterns for en_US in framework
2020-10-13 07:56:10 +08:00
Jonah Williams 8aee75f645
Revert "Pass RouteSettings to the internal Route in showCupertinoModalPopup (#56024)" (#67969)
This reverts commit da58f5e6fe.
2020-10-12 16:09:20 -07:00
Miguel Beltran da58f5e6fe
Pass RouteSettings to the internal Route in showCupertinoModalPopup (#56024) 2020-10-12 15:53:54 -07:00
Jonah Williams 18bb4d7254
Revert "[flutter_tools] reland: fold process resolution logic into the flutter tool (#67957)" (#67968)
This reverts commit bd8138797e.
2020-10-12 15:53:16 -07:00
Jonah Williams 52f8b89c0e
[flutter_tools] dont allow creating package name that is invalid (#67786)
According to https://dart.dev/tools/pub/pubspec#name , uppercase is not permitted for package names.
2020-10-12 15:38:23 -07:00
Jonah Williams bd8138797e
[flutter_tools] reland: fold process resolution logic into the flutter tool (#67957)
Reland of #67669

The flutter tool has a number of crashes on stable where an ArgumentError is thrown due to the process manager not being able to resolve an executable.

So that we can adjust/modify this logic, fold it into flutter and add some additional logging.
caches the resolved executable per target directory, to avoid repeated look ups.
Instead of throwing an argument error, attempts to run the executable as given if an exact path can't be found
Accept files or symlinks for the executable path.
user where/which to resolve path instead of package:process logic.
2020-10-12 15:37:02 -07:00
Jonah Williams c606f044d7
[gestures] make stylus pointer types use touch pan/drag slop (#67885) 2020-10-12 15:20:50 -07:00
Dan Field b6c56fdeaf
Add test for TabBarView (#67799) 2020-10-12 14:25:17 -07:00
Hans Muller 6219b30850
Replace obsolete FlatButton reference in flutter_driver extension_test.dart (#67952) 2020-10-12 14:22:13 -07:00
Kate Lovett 9464661a98
Fix sample code (#67940) 2020-10-12 14:22:03 -07:00
Anurag Roy 7f1540f323
Add contentPadding property for RadioListTile (#67438)
Exposes contentPadding property for RadioListTile from its appropriate ListTile.
2020-10-12 14:22:01 -07:00
Michael Goderbauer 053ebf2c08
Make CupertinoTabScaffold restorable (#67770) 2020-10-12 14:17:02 -07:00
LongCatIsLooong daa6b2cc29
More EditableText docs (#66864) 2020-10-12 14:12:06 -07:00
xubaolin dd41f41f34
CupertinoTextField should not accept requestFocus when disabled (#65235) 2020-10-12 14:07:05 -07:00
Jonah Williams 408cd71d82
[flutter_tools] check asset files while the tool waits for the frontend_server compile (#67826)
On every hot reload, the flutter tool must file stat each asset in the bundle. With a large number of assets or a slow file system, this can take 20 - 30 ms. Do this operation while the flutter tool is waiting for a response from the frontend_server.

No tests updated since this is only a timing update. Any difference in behavior will be shown on benchmarks
2020-10-12 14:06:40 -07:00
Jonah Williams 354e2a57b1
Revert "[flutter_tools] fold executable resolution into flutter (#67669)" (#67954)
This reverts commit 10c78c264a.
2020-10-12 13:15:39 -07:00
Jonah Williams 10c78c264a
[flutter_tools] fold executable resolution into flutter (#67669)
The flutter tool has a number of crashes on stable where an ArgumentError is thrown due to the process manager not being able to resolve an executable. Fold the resolution logic into the tool and use where/which instead of the package:process specific logic.
2020-10-12 12:51:37 -07:00
Jonah Williams ac614de7ac
[flutter_tools] validate that SkSL bundle path exists (#67883)
Fixes #61772

tool exit if there is no file at the path provided when building/running with sksl
2020-10-12 12:49:51 -07:00
Jonah Williams fd11d149f7
[flutter_tools] teach flutter drive to uninstall if install fails (#67936)
Work towards #39925

Currently flutter run will uninstall and reinstall if the initial install fails and the APK was previously installed. Allow drive to share this same logic by moving it into installApp and out of startApp.

This should reduce the occurrence of the error in the devicelab.
2020-10-12 12:49:36 -07:00
Sergey Solodukhin 3e069a433b
fix issue #55400 PopupMenuButton positions menu incorrectly with nest… (#65832) 2020-10-12 11:52:04 -07:00
Darren Austin 7ce0dce2e5
Migrate even more Material framework tests to null safety. (#67849) 2020-10-12 11:30:26 -07:00
Michael Goderbauer 18795b471e
Migrate some widget tests to NNBD (#67776) 2020-10-12 11:18:52 -07:00
Jonah Williams b4e4e8d965
[flutter_tools] do not crash validator if intellij JAR file is missing (#67931)
This failure has been happening for a while but was covered by the overly broad catch. Removing that revealed that newer intellij versions have a different plugins file. The tool still can't find the file, but it won't crash now

Fixes #67918
2020-10-12 10:34:05 -07:00
Per Classon 7668f06ffe
[Material] Use primary color for selected rows and checkboxes in DataTable (#67919) 2020-10-12 10:17:03 -07:00
Justin McCandless b93f71f9c8
NNDB TextField tests (#67696)
Just another nnbd conversion PR.
2020-10-12 09:59:05 -07:00
Sam Rawlins 23c7ee9deb
Bump meta to 1.3.0-nullsafety.4 (#67744) 2020-10-12 09:50:30 -07:00
Jonah Williams 0afddf3578
[flutter_tools] use fixed entry for dill uploads (#67837)
For historical reasons, the flutter tool uploads dill files to paths based on the entrypoint URI. This isn't actually necessary, and the tool can use specific files : main.dart.incremental.dill for incremental dills, and main.dart.dill/main.dart.swap.dill for full dills. This allows hot restarting applications with an entrypoint outside of lib/ and simplifies the devFS code.

Fixes #63243
2020-10-12 09:47:41 -07:00
xubaolin 8538b4f546
Fix TextField bug when the formatter repeatedly format (#67892) 2020-10-12 09:37:03 -07:00
chunhtai 345188d40e
make Router.of nullable (#67683) 2020-10-12 09:32:07 -07:00
Jonah Williams 08576cb671
[flutter_tools] HACKTOBERFEST (#67882)
HACKTOBERFEST
2020-10-12 09:31:02 -07:00
xubaolin 8211aaa2ae
Fix ListTile assert when layout at zero size (#66798)
* Fix ListTile assert when layout at zero size #66636
2020-10-12 17:25:38 +08:00
xubaolin d914d5d2f9
Fix typos in the [BottomNavigationBar] document (#67811) 2020-10-12 02:22:01 -07:00
Alexandre Ardhuin eefcff900c
Final definite assignment (#67682) 2020-10-10 14:42:02 -07:00
Jonah Williams 1a9d635f64
[flutter_tools] remove --with-driver-test (#67783)
Remove flutter create --with-driver-test . Fixes #64095
2020-10-09 21:03:37 -07:00
Dan Field 8bb61c3801
Reland ensure visible fix for nested viewports (#67773)
* Revert "Revert "Improve the behavior of Scrollable.ensureVisible when Scrollable nested (#65226)" (#66918)"

This reverts commit e8812c409b.

* Fix for page views

* comment
2020-10-09 17:40:33 -07:00
Marcin Jeleński 439992472a
Export finder factory (#67779) 2020-10-09 16:50:54 -07:00
Alexander Markov 1973cf2d6c
Remove uses of bytecode mode of Dart VM (#67755) 2020-10-09 16:33:06 -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
Jonah Williams bdb830a833
[flutter_tools] pretty print hot reload rejection error (#66701)
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
2020-10-09 15:44:52 -07:00
Jonah Williams 5fa801718f
[flutter_tools] remove train and inject-plugins command (#67766)
The train command does nothing and was originally added to provide a no-output default for generating app-jit snapshots. The inject-plugins command is only for a repo-only analysis check, which is not necessary since we regenerate during pub get.

#29805
2020-10-09 15:43:39 -07:00
Jonah Williams 92702a28ec
Revert "Flutter driver patch: export finder factory (#67769)" (#67777)
This reverts commit be5830cdf0.
2020-10-09 15:16:24 -07:00
Greg Spencer c083f02f3a
Migrate more material tests to NNBD (#67674)
This migrates more material tests to NNBD.
2020-10-09 14:58:13 -07:00
Marcin Jeleński be5830cdf0
Flutter driver patch: export finder factory (#67769) 2020-10-09 14:49:45 -07:00
Marcin Jeleński 759ddb1ccd
Reland "Flutter Driver - Create widget finders from serialized finders extensions" with null safety (#67711)
* Flutter Driver - Create widget finders from serialized finders extensions
2020-10-09 13:28:25 -07:00
Matej Knopp 24abe59f38
Provide oldLayer where possible (#67320) 2020-10-09 13:07:05 -07:00
Jonah Williams cba84d5127
[flutter_tools] remove globals from IntelliJ validator, refactor tests to remove dependency on JAR (#67240)
Move the intellij validator to its own file, and split off the tests. Remove globals from each, and remove dependency on a real jar/filesystem by creating a minimal version of the manifest xml and setting it up in the memory file system.

#47161
2020-10-09 13:05:42 -07:00
Jonah Williams 9a3a0dc18f
[flutter_tools] hot reload/restart update for asset manager change (#66742)
Do not upload all assets on initial devFS sync. This should increase the reliability of the initial connection, even in the face of flaky devfs behavior, in addition to a moderate perf improvement.

Updates fast-start to build assets as part of the initial bundle

Requires flutter/engine#21436
Requires flutter/engine#21586
Requires flutter/engine#21611
2020-10-09 12:25:15 -07:00
nturgut a755c03819
Add web e2e to the flutter/flutter repo (#67693)
* adding tests that uses integration_test (e2e) package to flutter

* change the package name for the import

* fix licenses. fix README commands. add links

* adding dependency change auto generated by the tool

* more analyzer error fixes
2020-10-09 12:24:36 -07:00