Our Cirrus Windows tests were not really working: they reported success even when failing.
This should fix several problems with the Cirrus Windows tests.
Generated.xcconfig is only required at build time for iOS apps. In the
flutter create project template and example apps, Generated.xcconfig was
previously marked as a resource to be bundled into the built app.
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.
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.
* 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
* 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.
* 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
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
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.
* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
* Revert "Reverting package changes until I can figure out how to fix Windows. (#14007)"
This reverts commit 6fda8ee821.
* Make prepare_package run on Windows
* Revert "Fixed output validation. (#14005)"
This reverts commit d84398db72.
* Revert "Update package prep script to do async process execution and emit output as it happens. (#13918)"
This reverts commit b7169c1d95.
- Switches to async process execution, which now shows output as it happens instead of in chunks when the process completes
- Now uses ProcessManager so that it may be mocked for the test.
- Adds in the download and install of mingit on Windows.
- Updated package dependencies because of added dependency on process package.
This simply updates the package dependencies by running flutter update-packages --force-upgrade.
I'm doing this with no other changes, because the last time I tried that, redness occurred. I want to isolate the problem to a "clean" update of the packages.
It looks like the plugins device_info, connectivity, and url_launcher haven't yet had their gradle configurations updated, so they fail when trying to build with the new gradle. I did not upgrade for those three packages only (in flutter_gallery) until we are ready to fix them (fixing them for master will break them for alpha users, so we need to do an alpha roll to do that).
This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.
I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
By default BoxScrollView (and hence ListView, which is a subclass)
padding is the media padding along its scroll axis in order to avoid
placing list items within areas where user interaction should be
minimised -- e.g. under the status bar, or in and around the iPhone X
notch in landscape mode.
In cases where a list item should occupy the padding area, developers
should set the ListView padding to EdgeInsets.zero so as not to pick up
the default media padding. For widgets inside the drawer that should
avoid safe areas, developers can add a SafeArea widget.
* Revert "Include a directory with Flutter assets (#12944)"
This reverts commit 3af6b9cbf5.
* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"
This reverts commit 08128cb29b.
* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"
This reverts commit 35f1a04195.
* mark complex_layout_ios__start_up as flaky
This consolidates all of the non-template .gitignore rules into the top level .gitignore, to ignore common things more broadly, with less maintenance needed for the .gitignore files. Does not touch the templates, so that they still produce needed .gitignores as part of flutter create.
* Built first tab
* Small additions
* started tab 3
* Need color arithmetics
* tab 2 built
* finalize
* lint and tests
* review
* Reapply docs after rebase
* use color.computeLuminance
* linter
* nit
* fix updrade script; upgrade to the latest package versions
* exclude special dependencies from transitive closure
* fix stack trace handling in flutter_test due to stack_trace change
* change type on _emptyStackTrace
* Add framework-side support for system text scale factor.
* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
Additional changes rolled in with engine change:
libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
Provide an entropy source to the Dart engine (#4161) - e1aa867
libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
Roll skia to e4679fa06a. (#4157) - 267e7a8
Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
Revert engine Dart roll. (#4158) - 14aab33
Add support for system text scale factor. (#4124) - b2a7f4b
Include _http into sky_engine libraries for analyzer (#4154) - b930f10
libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
libtxt: remove redundant line_widths (#4152) - 14bf515
Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
* Pin all dependencies ONCE AND FOR ALL
This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.
* Add comments.
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.
As part of doing that, I:
* Changed the default for MaterialApp.initialRoute to honor the
actual initial route.
* Added a MaterialApp.onUnknownRoute for handling bad routes.
* Added a feature to flutter_driver that allows the host test script
and the device test app to communicate.
* Added a test to make sure `flutter drive --route` works.
(Hopefully that will also prove `flutter run --route` works, though
this isn't testing the `flutter` tool's side of that. My main
concern is over whether the engine side works.)
* Fixed `flutter drive` to output the right target file name.
* Changed how the stocks app represents its data, so that we can
show a page for a stock before we know if it exists.
* Made it possible to show a stock page that doesn't exist. It shows
a progress indicator if we're loading the data, or else shows a
message saying it doesn't exist.
* Changed the pathing structure of routes in stocks to work more
sanely.
* Made search in the stocks app actually work (before it only worked
if we happened to accidentally trigger a rebuild). Added a test.
* Replaced some custom code in the stocks app with a BackButton.
* Added a "color" feature to BackButton to support the stocks use case.
* Spaced out the ErrorWidget text a bit more.
* Added `RouteSettings.copyWith`, which I ended up not using.
* Improved the error messages around routing.
While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
This splits the frame pipeline into two, beginFrame and drawFrame.
As part of making this change I added some debugging hooks that helped
debug the issues that came up:
* I added debugPrintScheduleFrameStacks which prints a stack whenever
a frame is actually scheduled, so you can see why frames are being
scheduled.
* I added some toString output to EditableText and RawKeyboardListener.
* I added a scheduler_tester.dart library for scheduler library tests.
* I changed the test framework to flush microtasks before pumping.
* Some asserts that had the old string literal form were replaced by
asserts with messages.
I also fixed a few subtle bugs that this uncovered:
* setState() now calls `ensureVisualUpdate`, rather than
`scheduleFrame`. This means that calling it from an
AnimationController callback does not actually schedule an extra
redundant frame as it used to.
* I corrected some documentation.
* Manually fix every use of Point.x and Point.y
Some of these were moved to dx/dy, but not all.
* Manually convert uses of the old gradient API
* Remove old reference to Point.
* Mechanical changes
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
* Mechanical changes - dartdocs
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
* Further improvements and a test
* Fix minor errors from rebasing...
* Roll engine
* Fix tests to use Ahem, and helpful changes around that
- Fix fonts that had metric-specific behaviours.
- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
to LiveTestWidgetsFlutterBinding.framePolicy.
- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
that pumps slightly more frames, to animate the pointer crosshairs.
- Added "flutter run --use-test-fonts" to enable Ahem on devices.
- Changed how idle() works to be more effective in live mode.
- Display the test name in live mode (unless ahem fonts are enabled).
- Added a toString to TextSelectionPoint.
- Style nit fixes.
* Roll engine to get Ahem changes.
* Update tests for dartdoc changes.
* Fix flutter_tools tests
* Return null from VM.mainView if no view exists
* Retry in connectToServiceProtocol if a view is not yet available
* Do not explicitly call exit from the benchmarks - it will not cleanly shut down the engine
- output single-line JSON because iOS 9.x cannot output more than one line
- move the workaround for #7433 into LiveTestWidgetsFlutterBinding so that it works in all cases (e.g. animation_bench.dart on iOS)
* s/sky/flutter/ in Android templates
* update engine.version with a compatible engine version
* replace more SkyActivity references with FlutterActivity
This patch replaces uses of Flexible with Expanded where we're using
FlexFit.tight. We still need to think of a better name for the
FlexFit.loose variant.
Also, improve the docs for Row, Column, Flex, and RenderFlex to be more
problem-oriented and to give a complete account of the layout algorithn.
Fixes#6960Fixes#5169
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
Switch our pubspec.yamls to using SDK sources so that we can have consistent
source types when we depend on these packages from external packages using SDK
sources.
This code is now in its own standalone library. The library is in a private git
repository in the flutter organization because the code is unmaintained. If
you're interested in using and maintaining this code, please contact
flutter-dev@googlegroups.com for more information.
Previously, if a StatefulWidget was marked dirty, then removed from the
build, then reinserted using the exact same widget under a widget under
a LayoutBuilder, it wouldn't rebuild.
This fixes that.
It also introduces an assert that's supposed to catch SizeObserver-like
behaviour. Rather than make this patch even bigger, I papered over two
pre-existing bugs which this assert uncovered (and fixed the other
problems it found):
https://github.com/flutter/flutter/issues/5751https://github.com/flutter/flutter/issues/5749
We should fix those before 1.0 though.
* Remove stray PRODUCT_BUNDLE_IDENTIFIER
This was erroneously added and overrides
the bundle for the gallery causing signing
to fail in my setup.
@chinmaygarde
* Remove PRODUCT_BUNDLE_IDENTIFIER from all Runner pbxproj's
* Added custom radii to RRect.
This is the first commit towads an implementation of
MergeableMaterial. It adds custom radii to RRect.
* Renamed RRect constructors and added BorderRadius.
BorderRadius is a class similar to EdgeInsets that lets you define
all rounded corners of a rounded rectangle easily.
We now use a different approach for ios projects where the developer controls
the Xcode project file. This patch removes the old ".generated" approach in
favor of the new approach.
Anywhere that accepted IconData now accepts either an Icon or an
ImageIcon.
Places that used to take an IconData in an `icon` argument, notably
IconButton and DrawerItem, now take a Widget in that slot. You can wrap
the value that used to be passed in in an Icon constructor to get the
same result.
Icon itself now takes the icon as a positional argument, for brevity.
ThemeData now has an iconTheme as well as a primaryIconTheme, the same
way it has had a textTheme and primaryTextTheme for a while.
IconTheme.of() always returns a value now (though that value itself may
have nulls in it). It defaults to the ThemeData.iconTheme.
IconThemeData.fallback() is a new method that returns an icon theme data
structure with all fields filled in.
IconTheme.merge() is a new constructor that takes a context and creates
a widget that mixes in the new values with the inherited values.
Most places that introduced an IconTheme widget now use IconTheme.merge.
IconThemeData.merge and IconThemeData.copyWith act in a way analogous to
the similarly-named members of TextStyle.
ImageIcon is introduced. It acts like Icon but takes an ImageProvider
instead of an IconData.
Also: Fix the analyzer to actually check the stocks app.
Overview
========
This patch refactors images to achieve the following goals:
* it allows references to unresolved assets to be passed
around (previously, almost every layer of the system had to know about
whether an image came from an asset bundle or the network or
elsewhere, and had to manually interact with the image cache).
* it allows decorations to use the same API for declaring images as the
widget tree.
It requires some minor changes to call sites that use images, as
discussed below.
Widgets
-------
Change this:
```dart
child: new AssetImage(
name: 'my_asset.png',
...
)
```
...to this:
```dart
child: new Image(
image: new AssetImage('my_asset.png'),
...
)
```
Decorations
-----------
Change this:
```dart
child: new DecoratedBox(
decoration: new BoxDecoration(
backgroundImage: new BackgroundImage(
image: DefaultAssetBundle.of(context).loadImage('my_asset.png'),
...
),
...
),
child: ...
)
```
...to this:
```dart
child: new DecoratedBox(
decoration: new BoxDecoration(
backgroundImage: new BackgroundImage(
image: new AssetImage('my_asset.png'),
...
),
...
),
child: ...
)
```
DETAILED CHANGE LOG
===================
The following APIs have been replaced in this patch:
* The `AssetImage` and `NetworkImage` widgets have been split in two,
with identically-named `ImageProvider` subclasses providing the
image-loading logic, and a single `Image` widget providing all the
widget tree logic.
* `ImageResource` is now `ImageStream`. Rather than configuring it with
a `Future<ImageInfo>`, you complete it with an `ImageStreamCompleter`.
* `ImageCache.load` and `ImageCache.loadProvider` are replaced by
`ImageCache.putIfAbsent`.
The following APIs have changed in this patch:
* `ImageCache` works in terms of arbitrary keys and caches
`ImageStreamCompleter` objects using those keys. With the new model,
you should never need to interact with the cache directly.
* `Decoration` can now be `const`. The state has moved to the
`BoxPainter` class. Instead of a list of listeners, there's now just a
single callback and a `dispose()` method on the painter. The callback
is passed in to the `createBoxPainter()` method. When invoked, you
should repaint the painter.
The following new APIs are introduced:
* `AssetBundle.loadStructuredData`.
* `SynchronousFuture`, a variant of `Future` that calls the `then`
callback synchronously. This enables the asynchronous and
synchronous (in-the-cache) code paths to look identical yet for the
latter to avoid returning to the event loop mid-paint.
* `ExactAssetImage`, a variant of `AssetImage` that doesn't do anything clever.
* `ImageConfiguration`, a class that describes parameters that configure
the `AssetImage` resolver.
The following APIs are entirely removed by this patch:
* `AssetBundle.loadImage` is gone. Use an `AssetImage` instead.
* `AssetVendor` is gone. `AssetImage` handles everything `AssetVendor`
used to handle.
* `RawImageResource` and `AsyncImage` are gone.
The following code-level changes are performed:
* `Image`, which replaces `AsyncImage`, `NetworkImage`, `AssetImage`,
and `RawResourceImage`, lives in `image.dart`.
* `DecoratedBox` and `Container` live in their own file now,
`container.dart` (they reference `image.dart`).
DIRECTIONS FOR FUTURE RESEARCH
==============================
* The `ImageConfiguration` fields are mostly aspirational. Right now
only `devicePixelRatio` and `bundle` are implemented. `locale` isn't
even plumbed through, it will require work on the localisation logic.
* We should go through and make `BoxDecoration`, `AssetImage`, and
`NetworkImage` objects `const` where possible.
* This patch makes supporting animated GIFs much easier.
* This patch makes it possible to create an abstract concept of an
"Icon" that could be either an image or a font-based glyph (using
`IconData` or similar). (see
https://github.com/flutter/flutter/issues/4494)
RELATED ISSUES
==============
Fixes https://github.com/flutter/flutter/issues/4500
Fixes https://github.com/flutter/flutter/issues/4495
Obsoletes https://github.com/flutter/flutter/issues/4496
It's safe to remove the unneeded `void`s from setters since the blocking issues in the
`always_declare_return_types` lint have been fixed (https://github.com/dart-lang/linter/). We can also safely flip the bit on `avoid_return_types_on_setters`.
The 'routes' table is a point of confusion with new developers. By
providing a 'home' argument that sets the '/' route, we can delay the
point at which we teach developers about 'routes' until the point where
they want to have a second route.
Previously, the client of PopupMenuButton needed to build all the menu times
when building the PopupMenuButton. This can get expensive if, for example, each
item in a scrollable list has a popup menu associated with it.
Now the client passes a builder function to the PopupMenuButton that gets
invoked only when its time to show the menu items.
LazyBlock is intended as a replacement for MixedViewport. Rather than
maintaining a table of all the observed child sizes (like
MixedViewport), LazyBlock works by dead reckoning the location of the
children based on the existing viewport. This approach makes it easier
to resize children because LazyBlock doesn't cache any additional
information that would need to be invalidated.
This patch contains a first draft of LazyBlock that works in a simple
usage scenario. Subsequent patches will replace
ScrollableMixedWidgetList with LazyBlock and port the existing
ScrollableMixedWidgetList tests over to LazyBlock.
Related to #3075