This uses @kevmoo's completion package to do command line completion for flutter, and a new command "bash-completion" (with alias "zsh-completion") that will output the necessary shell script setup code, and adds the hidden command "completion" that does the actual completion.
Because it adds a dependency, I also had to do flutter update-packages --force-upgrade.
Fixes#18988.
* Revert "Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)" (#19276)"
This reverts commit cf932490b7 as it also
includes fix for type error that broke tests.
* Add type cast for dart2 type checks.
* Move up to latest goldens
* Make inDirectory() type-parameterized.
* Add typecasting to transitions_perf_test.dart and microbenchmarks.
* Add boolean flag initialization in save_catalog_screenshots.dart
* Add type conversion to gallery transition test
* Roll engine to rolled dart
Add connectionTimeout property to class that extends HttpOverrides.
Upgrade packages.
Add more type fixes.
Update goldens hash.
Add more type fixes.
Upgrade packages.
Fix tests.
Remove strong-mode from analysis options yaml file.
Increase dev/devicelab timeout from 2 to 10 seconds.
Added getVM to waitForViews. Fix type errors in compileExpression.
* Pick up engine revision with fix for microbenchmarks regression.
Increase default timeout from 20/30 to 60s.
This should make it more obvious from the error what's gone wrong if we see a repeat of #19096 (previously the error was something like "Bad state: future already completed").
* Include stdout/stderr in failure messages
Sometimes some of these tests unexpectedly fail with a non-zero exit code. This ensures stdout/stderr is included in the test failure message when this happens so that we can track down the issue.
* Remove redundant info about exit code
* Remove unnecessary indenting
The [markers] make it fairly clear so this just makes the test code noisy.
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.
Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.
This also reverts migration to Dart 2 typedef syntax.
This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
This should reduce the number of flakes without actually increasing
the timeout, so we'll still find out quickly if a test is hanging.
The numbers here might need tweaking. Maybe the default two seconds is
too short for CI bots.
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.
Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.
No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
* It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
* Fix indentation, remove no longer necessary .toList()
* Only push udpated kernel if >0 invalidated srcs
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.
Eliminates --preview-dart-2 / --no-preview-dart-2 support.
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
This allows test environments other than `flutter test` to have a hook
into the test exception reporting. Some test environments, for example,
don't just dump error details to the console, but rather require them
to be reported to a separate server.
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.
Only naming changes to private vars: no logic changes.
I'm moving the assets in the assets-for-api-docs repo to a slightly different location to help with organization in that repo, so this PR points the doc URLs to the new location. The old assets won't be removed until this PR makes its way to the API docs website.
No documentation or code changes here, other than changing doc image URLs.
This test fails consistently on mac2 and mac3 with the attached Moto G4
devices but passes consistently on other machines.
Adding a delay of 1s right after driver.connect() in setUpAll() causes
it to pass on the machines in question, which suggests a race condition.
Specifically it looks like connect returns the moment Flutter Driver
identifies that the isolate is up and running, but empirically it looks
like we start running the first test before the UI is actually up. This
triggers a failure wherein we start looking for elements before they're
onstage.
Link to viewport.dart:213 at HEAD:
b2b4665926/packages/flutter/lib/src/widgets/viewport.dart (L213)
Stack trace:
FlutterDriver waitFor should find text "present"
```
DriverError: Error in Flutter application: Uncaught extension error while executing waitFor: NoSuchMethodError: The getter 'visible' was called on null.
Receiver: null
Tried calling: visible
#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:46:5)
#1 _ViewportElement.debugVisitOnstageChildren. (package:flutter/src/widgets/viewport.dart:213:36)
#2 WhereIterator.moveNext (dart:_internal/iterable.dart:439:11)
#3 Iterable.forEach (dart:core/iterable.dart)
#4 _ViewportElement.debugVisitOnstageChildren (package:flutter/src/widgets/viewport.dart:214:8)
#5 _DepthFirstChildIterator._reverseChildrenOf (package:flutter_test/src/all_elements.dart:54:15)
#6 _DepthFirstChildIterator.moveNext (package:flutter_test/src/all_elements.dart:45:19)
#7 CachingIterable._fillNext (package:flutter/src/foundation/basic_types.dart:252:27)
#8 _LazyListIterator.moveNext (package:flutter/src/foundation/basic_types.dart:279:21)
#9 WhereIterator.moveNext (dart:_internal/iterable.dart:438:22)
#10 CachingIterable._fillNext (package:flutter/src/foundation/basic_types.dart:252:27)
#11 _LazyListIterator.moveNext (package:flutter/src/foundation/basic_types.dart:279:21)
#12 Iterable.isEmpty (dart:core/iterable.dart:449:33)
#13 Iterable.isNotEmpty (dart:core/iterable.dart:456:27)
#14 FlutterDriverExtension._waitForElement. (package:flutter_driver/src/extension/extension.dart:215:51)
#15 FlutterDriverExtension._waitUntilFrame (package:flutter_driver/src/extension/extension.dart:197:19)
#16 FlutterDriverExtension._waitForElement (package:flutter_driver/src/extension/extension.dart:215:11)
#17 FlutterDriverExtension._waitFor (package:flutter_driver/src/extension/extension.dart:286:11)
#18 FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:168:51)
#19 BindingBase.registerServiceExtension. (package:flutter/src/foundation/binding.dart:370:32)
```
Removes a previous hack that no longer appears to help (adding a 1
second delay in setUpAll() does seem to work around this issue though).
* Exclude flutter_goldens package from dartdoc because it's for internal
use only
* Document why flutter_tools doesn' tneed to be excluded from the list of
packages to document
* Performance optimization in the flutter comparator, and associated
test updates.
In order to avoid checking binaries into flutter/flutter,
this comparator can be used to retrieve golden files from
a sibling flutter/goldens repository.
https://github.com/flutter/flutter/issues/16859
* Configure Cirrus CI
* Read file directly instead of shelling a command
* Wait for all streams to finish
* Add LTR `textDirection`
Since `RenderFlex#_debugHasNecessaryDirections` requires it when `direction` is horizontal and there are multiple children.
* Add a `matchesGoldenFile()` async matcher that will match
a finder's widget's rasterized image against a golden file.
* Add support for pluggable image comparison backends
* Add a default backend that does simplistic PNG byte
comparison on locally stored golden files.
* Add support for `flutter test --update-goldens`, which will
treat the rasterized image bytes produced during the test
as the new golden bytes and update the golden file accordingly
Still TODO:
* Add support for the `flutter_test_config.dart` test config hook
* Utilize `flutter_test_config.dart` in `packages/flutter/test`
to install a backend that retrieves golden files from a dedicated
`flutter/goldens` repo
https://github.com/flutter/flutter/issues/16859
* Turn support for sync-async on in Flutter. With this feature
execution of async functions starts immediately instead of it
being delayed by one microtask tick.
* Address review comments.
* Adjust some stack trace expectations which are slightly different with
--sync-async turned on.
* Handle error count reported by frontend.
Extend compilation result from single string to a structure(string filename and integer error count).
* Use ?.
* Include engine roll with dart sdk roll.
* parse(onError) -> tryParse
* Make '?? throw' more readable and avoid issue with analyzer
* Fix test so it mocks compiler output including errors count
Changes since last roll:
```
ed303c628 Roll dart sdk again. Previous roll required 23ae4fa098 revert. (#4966)
8cd272733 Revert "Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884. (#4960)" (#4965)
9199b40f2 Revert "Support multiple shells in a single process. (#4932)" (#4964)
6baff4c82 Support multiple shells in a single process. (#4932)
31c5bb427 Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884. (#4960)
c8e4c6984 Avoid copying the contents of large platform message responses (#4947)
5ff527295 Update to use new vulkan GrBackendRenderTarget ctor. (#4962)
0c8993a1a Update to use new vulkan GrBackendRenderTarget ctor (part 2) (#4963)
132ebdda8 Revert "Roll src/third_party/skia/ 9874bf1bc..52e16d984 (135 commits) (#4958)" (#4961)
11882ab9e Roll src/third_party/skia/ 9874bf1bc..52e16d984 (135 commits) (#4958)
```
Add consts
* Fix powershell cat invocation to ensure correct encoding and line ending.
* Restore original flow for non-Windows platforms
* Reformat code to get rid of multi-line ?: expression
* Double quotes to single quotes
* Revert "Roll engine to 6473f1b106485cb0b4ea569af383173daeef8895 (#16032)"
This reverts commit 844ced010a.
* Revert "Let travis test archiving per commit too (#16004)"
This reverts commit df5905f382.
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"
This reverts commit e59651f925.
* More thenReturn to thenAnswer when mocking Futures
* Revert "More thenReturn to thenAnswer when mocking Futures"
This reverts commit 194d2cf417 as we are reverting engine roll.
* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""
This reverts commit 52c9e96b30.
* Add dependency override
* Fix issue
* Move mockito to 3.0.0-alpha.
This is needed so it matches mockito version used internally.
* Pick up +2 for the fixes
* Fix whenReturn in fuchsia_remote_debug_protocol
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
* more thenReturn becomes thenAnswer
Adds a package that will support connecting to and debugging devices with multiple instances of the Dart VM, and operate on multiple Isolates and Flutter Views.
Currently supports connecting to all existing Dart VMs and extracting information about all Flutter Views running across each VM.
This is not a grand refactor yet, it's just cleaning up what we have
already, so that people who keep using this API (e.g. dialogs) have
something coherent to deal with.
The major changes are that Navigator and NavigatorState have the same
API now, that most of the examples use `<void>` instead of `<Null>`,
that the navigator observer can see replaces, and that the `settings`
is moved from ModalRoute to Route. I also cleaned up some of the API
documentation.
* use HttpOverrides and dart:io HttpClient in flutter
* add missing package:http dependency
* update flutter packages and remove comment about createHttpClient from flutter_test
* move byte loading logic to common class, move string parsing logic to base class
* addAll doesn't work for a Uint8List
* use bytes.setRange
* undo addition to hello_world
* add newline to end of binding.dart
* and a newline for hello world
* refactor to function and add tests
* address comments on unknown length case
* alignment
* sort alaphabetically
* rename convertResponse to consolidateClientHttpClientResponseBytes. Add header
* fix alignment in test
* traverse dependencies and dev dependencies separately
* separate dev and reg deps
* update pubspecs
* add checksum string and update transitive dep string. Add additional verify command to check checksum
* cleanup comments
* add missing space, quote, run verify-onlu from bot script
* rerun tool with fixed string
* ensure correct working directory and bump versions
* flutter not flutterRoot
* With dart being default, move preview_dart_2 tests to dart1.
* Swap out defaults for preview-dart-2 option in tests. Make dart1 explicit
* Move suffix around
* Rename files
This changes the packaging tool to only set the remote URL instead of recreating the remote.
Recreating it was removing some metadata that identified the repo as having been cloned from the "real" repo, so flutter --version would report an unknown channel and source. This just sets the URL so that it looks like it came from GitHub.
I also fixed some incorrect comments, and made unzip work on platforms other than Windows (even though we don't really need it there yet).
Fixes#15518
* Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f.
Changes since last roll:
```
b6df7a637 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771)
a6764dbd5 Add sources for Fuchsia target. (#4763)
2d5900615 [fuchsia] Remove unused header file. (#4769)
9717063b7 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768)
9a9814312 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)
e74e8b35c [async] Update includes of async headers to new path (#4760)
e2c4b2760 Use Dart 2 camel case constants in the engine Dart libraries (#4766)
9c1e48434 Updates for Fuchsia roll. (#4765)
14c940e27 Switch from fxl::Mutex to std::mutex (#4764)
debf82c0b Roll Garnet (#4759)
5bffdefbb Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761)
```
* Update the following packages
- dart-petitparser to 1.7.5
- dart-xml to 3.0.3
- image to 1.1.30
These updates fix some of the strong mode errors we were encountering
while running flutter tests.
This fixes the error handling for the packaging script so that it will properly report a failure exit code when it can't find the executable that it's looking for.
Added a test too.
* Update dependencies with forced upgrade.
Now that https://github.com/flutter/flutter/issues/15261 is fixed, do the update with upgrade.
* Update test package use following upgrade
* Replace addOption(allowMultiple) with addMultiOption
* Fix some of the generic types specified to avoid runtime errors in
--preview-dart-2
type 'YamlMap' is not a subtype of type 'Map<String, dynamic>' where
YamlMap is from package:yaml/src/yaml_node.dart
Map is from dart:core
String is from dart:core
package:flutter_devicelab/framework/manifest.dart 17:36 loadTaskManifest
test/manifest_test.dart 14:33 main.<fn>.<fn>
package:test/src/backend/declarer.dart 161:27 Declarer.test.<fn>.<fn>.<fn>
* Add dynamic generic types to keep the analyer happy.
* Address code review comment.
* Run flutter tests in preview-dart-2 mode on travis flutter builds.
* Run dart2 tests on osx. Run dart tests in dart2.
* Fix name camelCase
* Default options to empty array, rather than null
* Troubleshoot failures
* More logging
* Troubleshoot: run single test
* Troubleshoot: run 15 tests
* Troubleshoot: run 15 tests with fix
* Try limit concurrency to 1
* Limit concurrency for preview-dart-2 tests to 4
* Move dart2 tests to allow_failures section
* Reinstate tests_dart_2 shard
* Raise concurrency to 8
* Reuse compiler across multiple test runs
* Allow to switch entry points when recompiling.
Actually use single compiler to incrementally recompile all tests executed by 'flutter test'.
* Remove leftover commented code
* Fix comment
* Lints
Dart is migrating to .dart_tool/ as the location for cached artifacts
and other temporary files generated by tooling in the SDK. As part of
this, pub will be migrating from .pub to .dart_tool/pub.
In future, this path will also be used for other tooling, such as package:build.
We can't use .tar.xz on Mac because although it can unpack them on the command line (with tar), the "Archive Utility" that runs when you double-click on them just does some crazy behavior (it
converts it to a compressed cpio archive, and when you double-click on that, it converts it back to .tar.xz, without ever unpacking it!)
So, this changes the script to use .zip for Mac, and the files are about 220MB larger than they need to be.
30+4 has made some changes to the remoting protocol that are incompatbile
with a test harness running 30+3 (e.g. adding a type='initial' field to the
first message)
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
This sets things up so that when we next roll a dev build to beta, it updates the docs.
This means that for a while (until we publish a beta) the dev docs will not be updating.
There were some problems I introduced with the last PR for this. It passed the test, but failed in practice.
This adds tests for those failure cases, adds a "--help" and fixes the test so that it doesn't try and actually download MinGit as part of the Windows test.
I added package:platform as a dependency, so I did a force upgrade on the packages.
Also, re-enabling 'create package' in the cache warming code, now that #14448 is fixed.
* Reject requests for hot reload if a hot reload is already in progress.
Fixes#14184
* Implement TODO, verifying further hot reloads complete sucessfully.
* Fix year on new file.
* Add missing type annotations to fix lints
* Add run_machine_concurrent_hot_reload to manifest for CI
* Reformat document
... but undo things that cause lints (like single-line ifs)
* Extract std stream transformations
* Make inProgressHotReload private
* Disallow all types of reload while hot reload in progress
* Simplify code handling in-progress hot reloads
This changes the publishing of archives so that it happens on the chrome_infra bots when they build a packaged branch instead of as part of the dev_roll process.
It uses the tagged version in the branch, and leaves the git repo that it clones checked out on the branch and hash used to build the package.
It updates metadata located at gs://flutter_infra/releases/releases_.json (where is one of macos, linux, or windows) once published, since it would be complex to do the proper locking to keep them all in one shared .json file safely.
A separate [change to the chrome_infra bots](https://chromium-review.googlesource.com/c/chromium/tools/build/+/902823) was made to instruct them to build packaged for the dev, beta, and release branches (but not master anymore).
* iOS works
* Works on Android
* Take in commit number in iOS also. Get rid of image upload for Android. It's just a waste of bandwidth
* Tweak to fix on Travis
* first round fastlane working on Android
* clean up and start ios
* Partial iOS
* Got a fastfile that works on iOS
* Finalize Android push instructions
* Finalize instructions for iOS
* Extra cleanup and optipng
* Disable readme autogen and add a default readme
This script will update release metadata in the cloud, and copy the already-built package to the right location and name on cloud storage.
The release metadata will be located in gs://flutter_infra/releases/releases.json, and the published packages will end up in gs://flutter_infra/releases/<channel>/<platform>/flutter_<platform>_<version><archive suffix>, where <channel>, <platform>, <version>, and <archive suffix> are determined by the script.
At the moment, it only supports dev rolls, but (once we know how those will work) should easily support beta rolls as well.
It adds lines like `SHARD=analyze` to each shard, and a message like `Contents of packages/flutter_localizations/lib/src/l10n/localizations.dart matches output of gen_localizations.dart script.` to the analysis shard.