Skip to content

Updating my flutter fork to master. #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Jun 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
95f5d8d
Implement Matrix4Tween.lerp() (#10829)
alanlgardner Jun 21, 2017
595cd23
Change all occurrences of '$runtimeType#$hashCode' to use the describ…
jacob314 Jun 21, 2017
b231006
analytics expects a format of cd<integer> for custom dimensions (#10864)
sethladd Jun 21, 2017
963b90e
send the FLUTTER_HOST env var as analytics' app installer ID (#10889)
devoncarew Jun 21, 2017
c12b184
Add missing context bits to Fuchsia tools. (#10891)
pylaligand Jun 21, 2017
c78bfc5
Roll engine (#10892)
jason-simmons Jun 21, 2017
d36e2f6
Update versions for an alpha release (#10896)
jason-simmons Jun 21, 2017
265257a
Increment dev version numbers (#10897)
jason-simmons Jun 21, 2017
0224523
Save development certificate choice (#10849)
xster Jun 22, 2017
4d49066
Clean up pre-existing DevFS during creation (#10843)
zanderso Jun 22, 2017
b55441a
Do not require main asset files if variants are provided (#10901)
Jun 22, 2017
da4950c
Wait for the driver test to settle before collecting screenshots (#10…
Jun 22, 2017
0426fb6
upgrade package:usage to get clientId fix (#10919)
yjbanov Jun 23, 2017
09bdab2
[fuchsia_reload] Use ssh instead of netcp/netruncmd (#10436)
zanderso Jun 23, 2017
c79e25c
Stop uploading coverage and docs until dl.google.com issue is resolve…
tvolkert Jun 23, 2017
9a6a3e1
Delete unnecessary print statement (#10937)
cbracken Jun 23, 2017
ba520e7
Some clarifications for ListView constructors (#10907)
Hixie Jun 23, 2017
f4e4b93
Clarify image-related services docs (#10815)
Hixie Jun 23, 2017
f4f81e9
Require Xcode >= 8.0 for iOS development (#10932)
cbracken Jun 23, 2017
8f07a58
Add hasAGoodToStringDeep and equalsIgnoringHashCodes methods. (#10935)
jacob314 Jun 23, 2017
f18083d
Print ADB output when `adb install` fails (#10933)
tvolkert Jun 23, 2017
128967c
Bump Dart SDK version to 1.24.0 (stable) (#10931)
tvolkert Jun 23, 2017
856115b
Clear the selection when a text widget loses focus (#10938)
jason-simmons Jun 23, 2017
df1a01b
Add documentation. Also, add constructors to SliverGrid. (#10904)
Hixie Jun 23, 2017
59524c6
Slightly improve comments in SliverMultiBoxAdaptorElement (#10939)
Hixie Jun 23, 2017
9adb4a7
Deep linking: automatically push the route hiearchy on load. (#10894)
Hixie Jun 23, 2017
fe40eed
Provide haptic/acoustic feedback for tap & long-press on Android (#10…
goderbauer Jun 23, 2017
02171dc
Roll engine (#10944)
Hixie Jun 23, 2017
bb8e2a7
Lazily initialise Xcode installation status (#10945)
cbracken Jun 23, 2017
3e265e9
Revert "Lazily initialise Xcode installation status (#10945)" (#10951)
cbracken Jun 23, 2017
845c1b7
Re-land Lazily initialise Xcode installation status (#10952)
cbracken Jun 23, 2017
d131a8d
Fix --keep-app-running default and make devicelab verboser (#10957)
Hixie Jun 24, 2017
bbea0c3
enable routing_test in devicelab (#10958)
Hixie Jun 24, 2017
2ebb9e5
Use ProcessManager for Xcode tool invocations (#10955)
cbracken Jun 24, 2017
148565e
check existence of task files (#10959)
yjbanov Jun 24, 2017
f946171
update our build bot exclusions (#10964)
devoncarew Jun 26, 2017
d97b13b
Add objc doc to the dartdoc output (#10905)
szakarias Jun 26, 2017
c5999c7
Add gradle wrapper to project template (#10928)
mravn-google Jun 26, 2017
13edb32
Add Windows support to CONTRIBUTING.md (#10956)
goderbauer Jun 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ env:
before_script:
- ./dev/bots/travis_setup.sh
script:
- (./bin/cache/dart-sdk/bin/dart ./dev/bots/test.dart && ./dev/bots/travis_upload.sh)
# TODO(tvolkert): Re-enable `&& ./dev/bots/travis_upload.sh`
- (./bin/cache/dart-sdk/bin/dart ./dev/bots/test.dart)
cache:
directories:
- $HOME/.pub-cache
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
Things you will need
--------------------

* Linux or Mac OS X. (Windows is not yet supported.)
* Linux, Mac OS X, or Windows
* git (used for source version control).
* An IDE. We recommend [IntelliJ with the Flutter plugin](https://flutter.io/intellij-ide/).
* An ssh client (used to authenticate with GitHub).
Expand Down Expand Up @@ -92,6 +92,8 @@ assume you want to check a single package and the flutter repository has several
Running the tests
-----------------

_The `flutter test` command is not available on Windows (See [#8516](https://github.com/flutter/flutter/issues/8516))._

To automatically find all files named `_test.dart` inside a package's `test/` subdirectory, and run them inside the flutter shell as a test, use the `flutter test` command, e.g:

* `cd examples/stocks`
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# incompatible way, this version number might not change. Instead, the version
# number for package:flutter will update to reflect that change.

0.0.11-dev
0.0.12-dev
2 changes: 1 addition & 1 deletion bin/internal/dart-sdk.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.24.0-dev.6.7
1.24.0
2 changes: 1 addition & 1 deletion bin/internal/engine.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fffe502d437ac7931f08c6cef3e3f71fbd36adaa
8a2d337446ca076048608c6b6a932110e7c0f9c9
1 change: 1 addition & 0 deletions bin/internal/gradle_wrapper.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0b5c1398d1d04ac245a310de98825cb7b3278e2a
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BenchmarkingBinding extends LiveTestWidgetsFlutterBinding {

Future<Null> main() async {
assert(false); // don't run this in checked mode! Use --release.
stock_data.StockDataFetcher.actuallyFetchData = false;
stock_data.StockData.actuallyFetchData = false;

final Stopwatch wallClockWatch = new Stopwatch();
final Stopwatch cpuWatch = new Stopwatch();
Expand Down
2 changes: 1 addition & 1 deletion dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Duration kBenchmarkTime = const Duration(seconds: 15);

Future<Null> main() async {
assert(false); // don't run this in checked mode! Use --release.
stock_data.StockDataFetcher.actuallyFetchData = false;
stock_data.StockData.actuallyFetchData = false;

// This allows us to call onBeginFrame even when the engine didn't request it,
// and have it actually do something:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import '../common.dart';
const Duration kBenchmarkTime = const Duration(seconds: 15);

Future<Null> main() async {
stock_data.StockDataFetcher.actuallyFetchData = false;
stock_data.StockData.actuallyFetchData = false;

// This allows us to call onBeginFrame even when the engine didn't request it,
// and have it actually do something:
Expand Down
2 changes: 1 addition & 1 deletion dev/bots/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bin/cache/dart-sdk/bin/pub global activate dartdoc 0.13.0+1
# a custom index.html, placing everything into dev/docs/doc.
(cd dev/tools; ../../bin/cache/dart-sdk/bin/pub get)
FLUTTER_ROOT=$PWD bin/cache/dart-sdk/bin/dart dev/tools/dartdoc.dart
FLUTTER_ROOT=$PWD bin/cache/dart-sdk/bin/dart dev/tools/javadoc.dart
FLUTTER_ROOT=$PWD bin/cache/dart-sdk/bin/dart dev/tools/java_and_objc_doc.dart

# Ensure google webmaster tools can verify our site.
cp dev/docs/google2ed1af765c529f57.html dev/docs/doc
Expand Down
9 changes: 5 additions & 4 deletions dev/bots/travis_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ echo $KEY_FILE | base64 --decode > ../gcloud_key_file.json

set -x

if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
curl https://sdk.cloud.google.com | bash
fi
# TODO(tvolkert): Re-enable once this is able to successfully run on Travis
#if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# export CLOUDSDK_CORE_DISABLE_PROMPTS=1
# curl https://sdk.cloud.google.com | bash
#fi

# disable analytics on the bots and download Flutter dependencies
./bin/flutter config --no-analytics
Expand Down
5 changes: 4 additions & 1 deletion dev/bots/travis_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"

LCOV_FILE=./packages/flutter/coverage/lcov.info

if [ "$SHARD" = "coverage" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ -f "$LCOV_FILE" ]; then
if [ "$SHARD" = "coverage" ] && \
[ "$TRAVIS_PULL_REQUEST" = "false" ] && \
[ "$TRAVIS_BRANCH" = "master" ] && \
[ -f "$LCOV_FILE" ]; then
GSUTIL=$HOME/google-cloud-sdk/bin/gsutil
GCLOUD=$HOME/google-cloud-sdk/bin/gcloud

Expand Down
85 changes: 85 additions & 0 deletions dev/devicelab/bin/tasks/routing_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:convert';
import 'dart:io';

import 'package:path/path.dart' as path;

import 'package:flutter_devicelab/framework/adb.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';

void main() {
task(() async {
final Device device = await devices.workingDevice;
await device.unlock();
final Directory appDir = dir(path.join(flutterDirectory.path, 'dev/integration_tests/ui'));
section('TEST WHETHER `flutter drive --route` WORKS');
await inDirectory(appDir, () async {
return await flutter(
'drive',
options: <String>['--verbose', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
canFail: false,
);
});
section('TEST WHETHER `flutter run --route` WORKS');
await inDirectory(appDir, () async {
final Completer<Null> ready = new Completer<Null>();
bool ok;
print('run: starting...');
final Process run = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['run', '--verbose', '--observatory-port=8888', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
);
run.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
print('run:stdout: $line');
if (line == '[ ] For a more detailed help message, press "h". To quit, press "q".') {
print('run: ready!');
ready.complete();
ok ??= true;
}
});
run.stderr
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
stderr.writeln('run:stderr: $line');
});
run.exitCode.then((int exitCode) { ok = false; });
await Future.any<dynamic>(<Future<dynamic>>[ ready.future, run.exitCode ]);
if (!ok)
throw 'Failed to run test app.';
print('drive: starting...');
final Process drive = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['drive', '--use-existing-app', 'http://127.0.0.1:8888/', '--no-keep-app-running', 'lib/route.dart'],
);
drive.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
print('drive:stdout: $line');
});
drive.stderr
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
stderr.writeln('drive:stderr: $line');
});
int result;
result = await drive.exitCode;
if (result != 0)
throw 'Failed to drive test app (exit code $result).';
result = await run.exitCode;
if (result != 0)
throw 'Received unexpected exit code $result from run process.';
});
return new TaskResult.success(null);
});
}
3 changes: 2 additions & 1 deletion dev/devicelab/lib/framework/adb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
results.add(deviceID);
}
} else {
throw 'Failed to parse device from adb output: $line';
throw 'Failed to parse device from adb output: "$line"';
}
}

Expand Down Expand Up @@ -259,6 +259,7 @@ class AndroidDevice implements Device {
Future<Map<String, dynamic>> getMemoryStats(String packageName) async {
final String meminfo = await shellEval('dumpsys', <String>['meminfo', packageName]);
final Match match = new RegExp(r'TOTAL\s+(\d+)').firstMatch(meminfo);
assert(match != null, 'could not parse dumpsys meminfo output');
return <String, dynamic>{
'total_kb': int.parse(match.group(1)),
};
Expand Down
2 changes: 1 addition & 1 deletion dev/devicelab/lib/framework/framework.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool _isTaskRegistered = false;

/// Registers a [task] to run, returns the result when it is complete.
///
/// Note, the task does not run immediately but waits for the request via the
/// The task does not run immediately but waits for the request via the
/// VM service protocol to run it.
///
/// It is ok for a [task] to perform many things. However, only one task can be
Expand Down
51 changes: 40 additions & 11 deletions dev/devicelab/lib/framework/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:math' as math;

import 'package:args/args.dart';
import 'package:meta/meta.dart';
Expand Down Expand Up @@ -116,7 +117,12 @@ void mkdirs(Directory directory) {
bool exists(FileSystemEntity entity) => entity.existsSync();

void section(String title) {
print('\n••• $title •••');
title = '╡ ••• $title ••• ╞';
final String line = '═' * math.max((80 - title.length) ~/ 2, 2);
String output = '$line$title$line';
if (output.length == 79)
output += '═';
print('\n\n$output\n');
}

Future<String> getDartVersion() async {
Expand Down Expand Up @@ -167,7 +173,7 @@ Future<Process> startProcess(
String workingDirectory,
}) async {
final String command = '$executable ${arguments?.join(" ") ?? ""}';
print('Executing: $command');
print('\nExecuting: $command');
environment ??= <String, String>{};
environment['BOT'] = 'true';
final Process process = await _processManager.start(
Expand All @@ -178,7 +184,8 @@ Future<Process> startProcess(
final ProcessInfo processInfo = new ProcessInfo(command, process);
_runningProcesses.add(processInfo);

process.exitCode.whenComplete(() {
process.exitCode.then((int exitCode) {
print('exitcode: $exitCode');
_runningProcesses.remove(processInfo);
});

Expand Down Expand Up @@ -211,15 +218,22 @@ Future<int> exec(
}) async {
final Process process = await startProcess(executable, arguments, environment: environment);

final Completer<Null> stdoutDone = new Completer<Null>();
final Completer<Null> stderrDone = new Completer<Null>();
process.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen(print);
.listen((String line) {
print('stdout: $line');
}, onDone: () { stdoutDone.complete(); });
process.stderr
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen(stderr.writeln);
.listen((String line) {
print('stderr: $line');
}, onDone: () { stderrDone.complete(); });

await Future.wait<Null>(<Future<Null>>[stdoutDone.future, stderrDone.future]);
final int exitCode = await process.exitCode;

if (exitCode != 0 && !canFail)
Expand All @@ -230,24 +244,39 @@ Future<int> exec(

/// Executes a command and returns its standard output as a String.
///
/// Standard error is redirected to the current process' standard error stream.
/// For logging purposes, the command's output is also printed out.
Future<String> eval(
String executable,
List<String> arguments, {
Map<String, String> environment,
bool canFail: false,
}) async {
final Process process = await startProcess(executable, arguments, environment: environment);
process.stderr.listen((List<int> data) {
stderr.add(data);
});
final String output = await UTF8.decodeStream(process.stdout);

final StringBuffer output = new StringBuffer();
final Completer<Null> stdoutDone = new Completer<Null>();
final Completer<Null> stderrDone = new Completer<Null>();
process.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
print('stdout: $line');
output.writeln(line);
}, onDone: () { stdoutDone.complete(); });
process.stderr
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) {
print('stderr: $line');
}, onDone: () { stderrDone.complete(); });

await Future.wait<Null>(<Future<Null>>[stdoutDone.future, stderrDone.future]);
final int exitCode = await process.exitCode;

if (exitCode != 0 && !canFail)
fail('Executable failed with exit code $exitCode.');

return output.trimRight();
return output.toString().trimRight();
}

Future<int> flutter(String command, {
Expand Down
2 changes: 1 addition & 1 deletion dev/devicelab/lib/tasks/microbenchmarks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TaskFunction createMicrobenchmarkTask() {
}

Future<Process> _startFlutter({
String command = 'run',
String command: 'run',
List<String> options: const <String>[],
bool canFail: false,
Map<String, String> environment,
Expand Down
8 changes: 6 additions & 2 deletions dev/devicelab/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,18 @@ tasks:
Builds sample catalog markdown pages and Android screenshots
stage: devicelab
required_agent_capabilities: ["has-android-device"]
flaky: true

complex_layout_semantics_perf:
description: >
Measures duration of building the initial semantics tree.
stage: devicelab
required_agent_capabilities: ["linux/android"]

routing_test:
description: >
Verifies that `flutter drive --route` still works. No performance numbers.
stage: devicelab
required_agent_capabilities: ["linux/android"]
flaky: true

# iOS on-device tests
Expand Down Expand Up @@ -277,7 +282,6 @@ tasks:
with semantics enabled.
stage: devicelab
required_agent_capabilities: ["linux/android"]
flaky: true

flutter_gallery__memory_nav:
description: >
Expand Down
8 changes: 8 additions & 0 deletions dev/devicelab/test/manifest_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';

import 'package:test/test.dart';

import 'package:flutter_devicelab/framework/manifest.dart';
Expand All @@ -16,6 +18,12 @@ void main() {
expect(task.description, 'Measures the startup time of the Flutter Gallery app on Android.\n');
expect(task.stage, 'devicelab');
expect(task.requiredAgentCapabilities, <String>['linux/android']);

for (ManifestTask task in manifest.tasks) {
final File taskFile = new File('bin/tasks/${task.name}.dart');
expect(taskFile.existsSync(), true,
reason: 'File ${taskFile.path} corresponding to manifest task "${task.name}" not found');
}
});
});

Expand Down
2 changes: 2 additions & 0 deletions dev/docs/platform_integration/lib/ios.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// [Flutter platform integration APIs for iOS.](https://docs.flutter.io/objcdoc/)
library iOS;
Loading