[infra] Update checked-in SDKs to 2.12.0-0.0.dev

This is the first checked-in SDK with null-safety enabled by default.

Change-Id: I8f6fcdfd8856483f4737eb200ed4623a244cb0cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170085
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This commit is contained in:
Alexander Thomas 2020-11-05 07:53:22 +00:00 committed by commit-bot@chromium.org
parent f387d24f68
commit 44f3881be6
14 changed files with 71 additions and 37 deletions

2
DEPS
View file

@ -39,7 +39,7 @@ vars = {
# Checked-in SDK version. The checked-in SDK is a Dart SDK distribution in a
# cipd package used to run Dart scripts in the build and test infrastructure.
"sdk_tag": "version:2.11.0-190.0.dev",
"sdk_tag": "version:2.12.0-0.0.dev",
# co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
# hashes. It requires access to the dart-build-access group, which EngProd

View file

@ -7,6 +7,8 @@
// The output contains additional details in the verbose mode. There is a human
// readable mode that explains the results and how they changed.
// @dart = 2.9
import 'dart:collection';
import 'dart:io';
@ -126,12 +128,10 @@ bool search(
} else {
output = name;
}
if (logs != null) {
final log = logs[event.after.key];
final bar = '=' * (output.length + 2);
if (log != null) {
logSection?.add("\n\n/$bar\\\n| $output |\n\\$bar/\n\n${log["log"]}");
}
final log = logs[event.after.key];
final bar = '=' * (output.length + 2);
if (log != null) {
logSection?.add("\n\n/$bar\\\n| $output |\n\\$bar/\n\n${log["log"]}");
}
if (!options["logs-only"]) {
print(output);
@ -247,7 +247,7 @@ ${parser.usage}""");
"changed": "began failing",
null: "failed",
},
null: {
"any": {
"unchanged": "had the same result",
"changed": "changed result",
null: "ran",
@ -261,10 +261,12 @@ ${parser.usage}""");
final logSection = <String>[];
bool judgement = false;
for (final searchForStatus
in searchForStatuses.isNotEmpty ? searchForStatuses : <String>[null]) {
in searchForStatuses.isNotEmpty ? searchForStatuses : <String>["any"]) {
final searchForChanged = options["unchanged"]
? "unchanged"
: options["changed"] ? "changed" : null;
: options["changed"]
? "changed"
: null;
final aboutStatus = filterDescriptions[searchForStatus][searchForChanged];
final sectionHeader = "The following tests $aboutStatus:";
final logSectionArg =
@ -286,8 +288,11 @@ ${parser.usage}""");
if (options["human"] && !options["logs-only"] && !firstSection) {
print("");
}
String oldNew =
options["unchanged"] ? "old " : options["changed"] ? "new " : "";
String oldNew = options["unchanged"]
? "old "
: options["changed"]
? "new "
: "";
if (judgement) {
if (options["human"] && !options["logs-only"]) {
print("There were ${oldNew}test failures.");

View file

@ -5,6 +5,8 @@
// Add fields with data about the test run and the commit tested, and
// with the result on the last build tested, to the test results file.
// @dart = 2.9
import 'dart:convert';
import 'dart:io';

View file

@ -5,6 +5,8 @@
// Find the newest commit that has a full set of results on the bots.
// @dart = 2.9
import 'dart:async';
import 'dart:convert';
import 'dart:io';

View file

@ -8,6 +8,8 @@
// These cloud functions write a success/failure result to the
// builder table based on the approvals in Firestore.
// @dart = 2.9
import 'dart:async';
import 'dart:convert';
import 'dart:io';
@ -18,7 +20,7 @@ import 'package:http/http.dart' as http;
const numAttempts = 20;
const failuresPerConfiguration = 20;
bool useStagingDatabase;
/*late*/ bool useStagingDatabase;
String get queryUrl {
var project = useStagingDatabase ? "dart-ci-staging" : "dart-ci";
@ -26,11 +28,11 @@ String get queryUrl {
'projects/$project/databases/(default)/documents:runQuery';
}
String builder;
String builderBase;
int buildNumber;
String token;
http.Client client;
/*late*/ String builder;
/*late*/ String builderBase;
/*late*/ int buildNumber;
/*late*/ String token;
/*late*/ http.Client client;
String get buildTable => builder.endsWith('-try') ? 'try_builds' : 'builds';
String get resultsTable => builder.endsWith('-try') ? 'try_results' : 'results';
@ -73,9 +75,9 @@ main(List<String> args) async {
usage(parser);
}
useStagingDatabase = options['staging'];
builder = options['builder'];
buildNumber = int.parse(options['build_number']);
useStagingDatabase = options['staging'] /*!*/;
builder = options['builder'] /*!*/;
buildNumber = int.parse(options['build_number'] /*!*/);
builderBase = builder.replaceFirst(RegExp('-try\$'), '');
if (options['auth_token'] == null) {
print('Option "--auth_token (-a)" is required\n');
@ -139,7 +141,7 @@ Future<List<String>> getConfigurations() async {
final response = await runFirestoreQuery(configurationsQuery());
if (response.statusCode == HttpStatus.ok) {
final documents = jsonDecode(response.body);
final groups = <String>{
final groups = <String /*!*/ >{
for (Map document in documents)
if (document.containsKey('document'))
document['document']['name'].split('/').last
@ -154,12 +156,12 @@ Map<int, Future<String>> commitHashes = {};
Future<String> commitHash(int index) =>
commitHashes.putIfAbsent(index, () => fetchCommitHash(index));
Future<String> fetchCommitHash(int index) async {
Future<String /*!*/ > fetchCommitHash(int index) async {
final response = await runFirestoreQuery(commitQuery(index));
if (response.statusCode == HttpStatus.ok) {
final document = jsonDecode(response.body).first['document'];
if (document != null) {
return document['name'].split('/').last;
return document['name'] /*!*/ .split('/').last;
}
}
print('Could not fetch commit with index $index');
@ -167,7 +169,7 @@ Future<String> fetchCommitHash(int index) async {
}
Future<Map<String, List<Map<String, dynamic>>>> fetchActiveFailures(
List<String> configurations) async {
List<String /*!*/ > configurations) async {
final failures = <String, List<Map<String, dynamic>>>{};
for (final configuration in configurations) {
final response =

View file

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'dart:convert' show jsonDecode, jsonEncode;
import 'dart:io' show File, HttpStatus;
@ -50,7 +52,7 @@ class FirestoreDatabase {
};
}
Future<List> runQuery(Query query) async {
Future<List /*!*/ > runQuery(Query query) async {
var body = jsonEncode(query.data);
var response = await _client.post(queryUrl, headers: _headers, body: body);
if (response.statusCode == HttpStatus.ok) {
@ -60,14 +62,18 @@ class FirestoreDatabase {
}
}
Future<Object> getDocument(String collectionName, String documentName) async {
Future<Map> getDocument(String collectionName, String documentName) async {
var url = '$documentsUrl/$collectionName/$documentName';
if (_currentTransaction != null) {
url = '$url?transaction=${_escapedCurrentTransaction}';
}
var response = await _client.get(url, headers: _headers);
if (response.statusCode == HttpStatus.ok) {
return jsonDecode(response.body);
var document = jsonDecode(response.body);
if (!document is Map) {
throw _error(response, message: 'Expected a Map');
}
return document;
} else {
throw _error(response);
}

View file

@ -6,6 +6,8 @@
// of active, non-approved failures which include the commit of the current
// bisection build.
// @dart = 2.9
import 'dart:io';
import 'package:args/args.dart';
@ -25,7 +27,7 @@ class ResultRecord {
ResultRecord(this.data);
Map field(String name) => data['fields'][name];
Map field(String name) => data['fields'][name] /*!*/;
int get blamelistStartIndex {
return int.parse(field('blamelist_start_index')['integerValue']);
@ -39,13 +41,13 @@ class ResultRecord {
return int.parse(field('blamelist_end_index')['integerValue']);
}
String get result => field('result')['stringValue'];
String get result => field('result')['stringValue'] /*!*/;
String get previousResult => field('previous_result')['stringValue'];
String get previousResult => field('previous_result')['stringValue'] /*!*/;
String get name => field('name')['stringValue'];
String get name => field('name')['stringValue'] /*!*/;
String get updateTime => data['updateTime'];
String get updateTime => data['updateTime'] /*!*/;
}
Query unapprovedActiveFailuresQuery(String configuration) {

View file

@ -5,6 +5,8 @@
// Update the flakiness data with a set of fresh results.
// @dart = 2.9
import 'dart:convert';
import 'dart:io';
@ -43,9 +45,9 @@ ${parser.usage}''');
for (final path in parameters) {
final results = await loadResults(path);
for (final resultObject in results) {
final String configuration = resultObject['configuration'];
final String name = resultObject['name'];
final String result = resultObject['result'];
final String configuration = resultObject['configuration'] /*!*/;
final String name = resultObject['name'] /*!*/;
final String result = resultObject['result'] /*!*/;
final key = '$configuration:$name';
Map<String, dynamic> newMap() => {};
final testData = data.putIfAbsent(key, newMap);

View file

@ -3,6 +3,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'dart:async';
import 'dart:io';
import 'dart:convert';

View file

@ -1,6 +1,9 @@
#!/usr/bin/env dart
/// Generates the repo's ".dart_tool/package_config.json" file.
// @dart = 2.9
import 'dart:convert';
import 'dart:io';

View file

@ -1,6 +1,8 @@
#!/usr/bin/env dart
/// Converts block-style Doc comments in Dart code to line style.
// @dart = 2.9
library line_doc_comments;
import 'dart:io';

View file

@ -1,8 +1,10 @@
#!/usr/bin/env dart
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'package:test_runner/test_runner.dart';
void main(List<String> args) {

View file

@ -4,6 +4,8 @@
// Test that the test matrix in the SDK can be parsed correctly.
// @dart = 2.9
import 'dart:convert' show jsonDecode;
import 'dart:io' show File, Platform;
import 'package:smith/smith.dart' show TestMatrix;

View file

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'dart:io' show File, exit, stderr;
import 'dart:isolate' show RawReceivePort;