Skip to content

Commit

Permalink
Merge pull request #2 from gspencergoog/master
Browse files Browse the repository at this point in the history
Pulling to make workspace up to date wrt master.
  • Loading branch information
gspencergoog authored Jun 15, 2017
2 parents 2ca1574 + 506bc1c commit 0ee01da
Show file tree
Hide file tree
Showing 334 changed files with 9,168 additions and 3,339 deletions.
6 changes: 5 additions & 1 deletion .analysis_options
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
#
# There are three similar analysis options files in the flutter repo:
# There are four similar analysis options files in the flutter repos:
# - .analysis_options (this file)
# - .analysis_options_repo
# - packages/flutter/lib/analysis_options_user.yaml
# - https://github.com/flutter/plugins/blob/master/.analysis_options
#
# This file contains the analysis options used by Flutter editors, such as Atom.
# It is very similar to the .analysis_options_repo file in this same directory;
# the only difference (currently) is the public_member_api_docs option,
# which triggers too many messages to be used in editors.
#
# The flutter/plugins repo contains a copy of this file, which should be kept
# in sync with this file.

analyzer:
language:
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.7-dev
0.0.10-dev
4 changes: 2 additions & 2 deletions bin/flutter
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
DART="$DART_SDK_PATH/bin/dart"
PUB="$DART_SDK_PATH/bin/pub"

# Test if running as superuser
if [[ "$EUID" == "0" ]]; then
# Test if running as superuser – but don't warn if running within Docker
if [[ "$EUID" == "0" ]] && ! [[ -f /.dockerenv ]]; then
echo " Woah! You appear to be trying to run flutter as root."
echo " We strongly recommend running the flutter tool without superuser privileges."
echo " /"
Expand Down
10 changes: 10 additions & 0 deletions bin/internal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Dart SDK dependency
===================

The Dart SDK is downloaded from one of [the supported channels](https://www.dartlang.org/install/archive),
cached in `bin/cache/dart-sdk` and is used to run Flutter Dart code.

The file `bin/internal/dart-sdk.version` determines the version of Dart SDK
that will be downloaded. Normally it points to the `dev` channel (for example,
`1.24.0-dev.6.7`), but it can also point to particular bleeding edge build
of Dart (for example, `hash/c0617d20158955d99d6447036237fe2639ba088c`).
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.3.0
1.24.0-dev.6.7
2 changes: 1 addition & 1 deletion bin/internal/engine.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
75c74dc463d56e17be10315cfde409010fd8f90b
18fdfb86bb3876fcbb4e1d25e5b2aad0c5cd669f
2 changes: 1 addition & 1 deletion bin/internal/update_dart_sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if ((Test-Path $dartSdkStampPath) -and ($dartSdkVersion -eq (Get-Content $dartSd

Write-Host "Downloading Dart SDK $dartSdkVersion..."
$dartZipName = "dartsdk-windows-x64-release.zip"
$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {"stable"}
$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {if ($dartSdkVersion.Contains("hash/")) {"be"} else {"stable"}}
$dartSdkUrl = "https://storage.googleapis.com/dart-archive/channels/$dartChannel/raw/$dartSdkVersion/sdk/$dartZipName"

if (Test-Path $dartSdkPath) {
Expand Down
3 changes: 3 additions & 0 deletions bin/internal/update_dart_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ if [ ! -f "$DART_SDK_STAMP_PATH" ] || [ "$DART_SDK_VERSION" != `cat "$DART_SDK_S
if [[ $DART_SDK_VERSION == *"-dev."* ]]
then
DART_CHANNEL="dev"
elif [[ $DART_SDK_VERSION == "hash/"* ]]
then
DART_CHANNEL="be"
fi

DART_SDK_URL="https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/raw/$DART_SDK_VERSION/sdk/$DART_ZIP_NAME"
Expand Down
8 changes: 8 additions & 0 deletions dev/benchmarks/complex_layout/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ android {
signingConfig signingConfigs.debug
}
}

aaptOptions {
// TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved.
if(System.getenv("FLUTTER_CI_WIN")) {
println "AAPT cruncher disabled when running on CI, see https://github.com/flutter/flutter/issues/8986"
cruncherEnabled false
}
}
}

flutter {
Expand Down
7 changes: 4 additions & 3 deletions dev/benchmarks/complex_layout/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ class ComplexLayoutState extends State<ComplexLayout> {
key: const Key('complex-scroll'), // this key is used by the driver test
itemBuilder: (BuildContext context, int index) {
if (index % 2 == 0)
return new FancyImageItem(index, key: new ValueKey<int>(index));
return new FancyImageItem(index, key: new PageStorageKey<int>(index));
else
return new FancyGalleryItem(index, key: new ValueKey<int>(index));
return new FancyGalleryItem(index, key: new PageStorageKey<int>(index));
},
)
),
Expand Down Expand Up @@ -496,7 +496,7 @@ class ItemGalleryBox extends StatelessWidget {
child: new TabBarView(
children: tabNames.map((String tabName) {
return new Container(
key: new Key(tabName),
key: new PageStorageKey<String>(tabName),
child: new Padding(
padding: const EdgeInsets.all(8.0),
child: new Card(
Expand Down Expand Up @@ -611,6 +611,7 @@ class GalleryDrawer extends StatelessWidget {
final ScrollMode currentMode = ComplexLayoutApp.of(context).scrollMode;
return new Drawer(
child: new ListView(
key: const PageStorageKey<String>('gallery-drawer'),
children: <Widget>[
new FancyDrawerHeader(),
new ListTile(
Expand Down
11 changes: 11 additions & 0 deletions dev/benchmarks/complex_layout/test_driver/semantics_perf.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2017 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 'package:flutter_driver/driver_extension.dart';
import 'package:complex_layout/main.dart' as app;

void main() {
enableFlutterDriverExtension();
app.main();
}
43 changes: 43 additions & 0 deletions dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2017 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:flutter_driver/flutter_driver.dart';
import 'package:path/path.dart' as p;
import 'package:test/test.dart';

void main() {
group('semantics performance test', () {
FlutterDriver driver;

setUpAll(() async {
driver = await FlutterDriver.connect(printCommunication: true);
});

tearDownAll(() async {
if (driver != null)
driver.close();
});

test('inital tree creation', () async {
// Let app become fully idle.
await new Future<Null>.delayed(const Duration(seconds: 1));

final Timeline timeline = await driver.traceAction(() async {
expect(await driver.setSemantics(true), isTrue);
});

final Iterable<TimelineEvent> semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == "Semantics");
if (semanticsEvents.length != 1)
fail('Expected exactly one semantics event, got ${semanticsEvents.length}');
final Duration semanticsTreeCreation = semanticsEvents.first.duration;

final String json = JSON.encode(<String, dynamic>{'initialSemanticsTreeCreation': semanticsTreeCreation.inMilliseconds});
new File(p.join(testOutputsDirectory, 'complex_layout_semantics_perf.json')).writeAsStringSync(json);
});
});
}
Loading

0 comments on commit 0ee01da

Please sign in to comment.