Skip to content

Commit

Permalink
Revert "Dart SDK roll for 2018/07/26 (flutter#5876)" (flutter#5881)
Browse files Browse the repository at this point in the history
This reverts commit 503ba7c.
  • Loading branch information
bkonyi authored Jul 26, 2018
1 parent 896441a commit 00a5b80
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 243 deletions.
100 changes: 50 additions & 50 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -31,73 +31,73 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '9c69e7e1d29ecf349715ca2ddd437c9d0bbba0d7',
'dart_revision': '937ee2e8ca4b76499e24cd463f07bfb736bccd74',

'dart_args_tag': '1.4.4',
'dart_async_tag': '2.0.8',
'dart_args_tag': '1.4.1',
'dart_async_tag': '2.0.7',
'dart_bazel_worker_tag': '0.1.11',
'dart_boolean_selector_tag': '1.0.4',
'dart_boolean_selector_tag': '1.0.3',
'dart_boringssl_gen_rev': 'fc47eaa1a245d858bae462cd64d4155605b850ea',
'dart_boringssl_rev': '189270cd190267f5bd60cfe8f8ce7a61d07ba6f4',
'dart_charcode_tag': 'v1.1.2',
'dart_cli_util_rev': '4ad7ccbe3195fd2583b30f86a86697ef61e80f41',
'dart_collection_tag': '1.14.11',
'dart_convert_tag': '2.0.2',
'dart_crypto_tag': '2.0.6',
'dart_csslib_tag': '0.14.4+1',
'dart_charcode_tag': 'v1.1.1',
'dart_cli_util_tag': '0.1.2+1',
'dart_collection_tag': '1.14.10',
'dart_convert_tag': '2.0.1',
'dart_crypto_tag': '2.0.5',
'dart_csslib_tag': '0.14.1',
'dart_dart2js_info_tag': '0.5.6+4',
'dart_dart_style_tag': '1.1.3',
'dart_dartdoc_tag': 'v0.20.2',
'dart_fixnum_tag': '0.10.8',
'dart_glob_tag': '1.1.7',
'dart_html_tag': '0.13.3+2',
'dart_http_multi_server_tag': '2.0.5',
'dart_dart_style_tag': '1.1.2',
'dart_dartdoc_tag': 'v0.20.1',
'dart_fixnum_tag': '0.10.5',
'dart_glob_tag': '1.1.5',
'dart_html_tag': '0.13.3',
'dart_http_multi_server_tag': '2.0.4',
'dart_http_parser_tag': '3.1.1',
'dart_http_retry_tag': '0.1.1',
'dart_http_tag': '0.11.3+17',
'dart_http_throttle_tag': '1.0.2',
'dart_intl_tag': '0.15.6',
'dart_json_rpc_2_tag': '2.0.9',
'dart_linter_tag': '0.1.58',
'dart_logging_tag': '0.11.3+2',
'dart_markdown_tag': '2.0.2',
'dart_json_rpc_2_tag': '2.0.6',
'dart_linter_tag': '0.1.56',
'dart_logging_tag': '0.11.3+1',
'dart_markdown_tag': '2.0.1',
'dart_matcher_tag': '0.12.3',
'dart_mime_tag': '0.9.6+2',
'dart_mime_tag': '0.9.6',
'dart_mockito_tag': 'd39ac507483b9891165e422ec98d9fb480037c8b',
'dart_mustache4dart_tag': 'v2.1.2',
'dart_oauth2_tag': '1.2.1',
'dart_observatory_pub_packages_rev': '0894122173b0f98eb08863a7712e78407d4477bc',
'dart_package_config_tag': '1.0.5',
'dart_package_resolver_tag': '1.0.4',
'dart_path_tag': '1.6.2',
'dart_plugin_tag': 'f5b4b0e32d1406d62daccea030ba6457d14b1c47',
'dart_pool_tag': '1.3.6',
'dart_observatory_pub_packages_rev': 'caf0aecfb15077fc7a34d48e9df13606c793fddf',
'dart_package_config_tag': '1.0.3',
'dart_package_resolver_tag': '1.0.2+1',
'dart_path_tag': '1.5.1',
'dart_plugin_tag': '0.2.0+2',
'dart_pool_tag': '1.3.4',
'dart_protobuf_tag': '0.9.0',
'dart_pub_rev': '58fe996eab8d54f28f5109c407ff0ab62fbd835d',
'dart_pub_semver_tag': '1.4.2',
'dart_quiver_tag': '0.29.0+2',
'dart_resource_rev': '2.1.5',
'dart_pub_semver_tag': '1.4.1',
'dart_quiver_tag': '0.29.0',
'dart_resource_tag': '2.1.4',
'dart_root_certificates_rev': '16ef64be64c7dfdff2b9f4b910726e635ccc519e',
'dart_shelf_packages_handler_tag': '1.0.4',
'dart_shelf_static_rev': 'v0.2.8',
'dart_shelf_tag': '0.7.3+3',
'dart_shelf_web_socket_tag': '0.2.2+3',
'dart_source_map_stack_trace_tag': '1.1.5',
'dart_source_maps_tag': '8af7cc1a1c3a193c1fba5993ce22a546a319c40e',
'dart_source_span_tag': '1.4.1',
'dart_stack_trace_tag': '1.9.3',
'dart_stream_channel_tag': '1.6.8',
'dart_string_scanner_tag': '1.0.3',
'dart_term_glyph_tag': '1.0.1',
'dart_test_reflective_loader_tag': '0.1.4',
'dart_shelf_packages_handler_tag': '1.0.3',
'dart_shelf_static_rev': 'v0.2.7',
'dart_shelf_tag': '0.7.3+2',
'dart_shelf_web_socket_tag': '0.2.2',
'dart_source_map_stack_trace_tag': '1.1.4',
'dart_source_maps_tag': '0.10.6',
'dart_source_span_tag': '1.4.0',
'dart_stack_trace_tag': '1.9.2',
'dart_stream_channel_tag': '1.6.4',
'dart_string_scanner_tag': '1.0.2',
'dart_term_glyph_tag': '1.0.0',
'dart_test_tag': '1.0.0',
'dart_tuple_tag': 'v1.0.1',
'dart_typed_data_tag': '1.1.6',
'dart_typed_data_tag': '1.1.3',
'dart_usage_tag': '3.4.0',
'dart_utf_tag': '0.9.0+5',
'dart_watcher_rev': '0.9.7+10',
'dart_web_socket_channel_tag': '1.0.9',
'dart_yaml_tag': '2.1.15',
'dart_utf_tag': '0.9.0+4',
'dart_watcher_tag': '0.9.7+8',
'dart_web_socket_channel_tag': '1.0.7',
'dart_yaml_tag': '2.1.14',

# Build bot tooling for iOS
'ios_tools_revision': '69b7c1b160e7107a6a98d948363772dc9caea46f',

Expand Down Expand Up @@ -182,7 +182,7 @@ deps = {
Var('dart_git') + '/charcode.git' + '@' + Var('dart_charcode_tag'),

'src/third_party/dart/third_party/pkg/cli_util':
Var('dart_git') + '/cli_util.git' + '@' + Var('dart_cli_util_rev'),
Var('dart_git') + '/cli_util.git' + '@' + Var('dart_cli_util_tag'),

'src/third_party/dart/third_party/pkg/collection':
Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_tag'),
Expand Down Expand Up @@ -281,7 +281,7 @@ deps = {
Var('chromium_git') + '/external/github.com/google/quiver-dart' + '@' + Var('dart_quiver_tag'),

'src/third_party/dart/third_party/pkg/resource':
Var('dart_git') + '/resource.git' + '@' + Var('dart_resource_rev'),
Var('dart_git') + '/resource.git' + '@' + Var('dart_resource_tag'),

'src/third_party/dart/third_party/pkg/shelf':
Var('dart_git') + '/shelf.git' + '@' + Var('dart_shelf_tag'),
Expand Down Expand Up @@ -335,7 +335,7 @@ deps = {
Var('dart_git') + '/usage.git' + '@' + Var('dart_usage_tag'),

'src/third_party/dart/third_party/pkg/watcher':
Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'),
Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_tag'),

'src/third_party/dart/third_party/pkg/web_socket_channel':
Var('dart_git') + '/web_socket_channel.git' + '@' + Var('dart_web_socket_channel_tag'),
Expand Down
38 changes: 19 additions & 19 deletions tools/licenses/lib/filesystem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum FileType {
typedef Reader = List<int> Function();

class BytesOf extends Key { BytesOf(dynamic value) : super(value); }
class utf8Of extends Key { utf8Of(dynamic value) : super(value); }
class UTF8Of extends Key { UTF8Of(dynamic value) : super(value); }
class Latin1Of extends Key { Latin1Of(dynamic value) : super(value); }

bool matchesSignature(List<int> bytes, List<int> signature) {
Expand Down Expand Up @@ -59,7 +59,7 @@ const String kMultiLicenseFileHeader = 'Notices for files contained in';

bool isMultiLicenseNotice(Reader reader) {
List<int> bytes = reader();
return (ascii.decode(bytes.take(kMultiLicenseFileHeader.length).toList(), allowInvalid: true) == kMultiLicenseFileHeader);
return (ASCII.decode(bytes.take(kMultiLicenseFileHeader.length).toList(), allowInvalid: true) == kMultiLicenseFileHeader);
}

FileType identifyFile(String name, Reader reader) {
Expand Down Expand Up @@ -114,7 +114,7 @@ FileType identifyFile(String name, Reader reader) {
case 'tzdata': return FileType.binary;
case 'compressed_atrace_data.txt': return FileType.binary;
// Source files that don't use UTF-8
case 'Messages_de_DE.properties': // has a few non-ascii characters they forgot to escape (from gnu-libstdc++)
case 'Messages_de_DE.properties': // has a few non-ASCII characters they forgot to escape (from gnu-libstdc++)
case 'mmx_blendtmp.h': // author name in comment contains latin1 (mesa)
case 'calling_convention.txt': // contains a soft hyphen instead of a real hyphen for some reason (mesa)
// Character encoding data files
Expand Down Expand Up @@ -310,11 +310,11 @@ abstract class TextFile extends File {
}

// mixin
abstract class utf8TextFile extends TextFile {
abstract class UTF8TextFile extends TextFile {
@override
String readString() {
try {
return cache(new utf8Of(this), () => utf8.decode(readBytes()));
return cache(new UTF8Of(this), () => UTF8.decode(readBytes()));
} on FormatException {
print(fullName);
rethrow;
Expand All @@ -330,15 +330,15 @@ abstract class Latin1TextFile extends TextFile {
final List<int> bytes = readBytes();
if (bytes.any((int byte) => byte == 0x00))
throw '$fullName contains a U+0000 NULL and is probably not actually encoded as Win1252';
bool isutf8 = false;
bool isUTF8 = false;
try {
cache(new utf8Of(this), () => utf8.decode(readBytes()));
isutf8 = true;
cache(new UTF8Of(this), () => UTF8.decode(readBytes()));
isUTF8 = true;
} on FormatException {
}
if (isutf8)
if (isUTF8)
throw '$fullName contains valid UTF-8 and is probably not actually encoded as Win1252';
return latin1.decode(bytes);
return LATIN1.decode(bytes);
});
}
}
Expand Down Expand Up @@ -460,7 +460,7 @@ class FileSystemDirectory extends IoNode implements Directory {
case FileType.tar: yield new FileSystemTarFile(fileEntity); break;
case FileType.gz: yield new FileSystemGZipFile(fileEntity); break;
case FileType.bzip2: yield new FileSystemBZip2File(fileEntity); break;
case FileType.text: yield new FileSystemutf8TextFile(fileEntity); break;
case FileType.text: yield new FileSystemUTF8TextFile(fileEntity); break;
case FileType.latin1Text: yield new FileSystemLatin1TextFile(fileEntity); break;
case FileType.metadata: break; // ignore this file
}
Expand Down Expand Up @@ -499,8 +499,8 @@ class FileSystemFile extends IoNode implements File {
}
}

class FileSystemutf8TextFile extends FileSystemFile with utf8TextFile {
FileSystemutf8TextFile(io.File file) : super(file);
class FileSystemUTF8TextFile extends FileSystemFile with UTF8TextFile {
FileSystemUTF8TextFile(io.File file) : super(file);
}

class FileSystemLatin1TextFile extends FileSystemFile with Latin1TextFile {
Expand Down Expand Up @@ -554,7 +554,7 @@ class ArchiveDirectory extends IoNode implements Directory {
case FileType.tar: _files.add(new ArchiveTarFile(entryFullName, entry)); break;
case FileType.gz: _files.add(new ArchiveGZipFile(entryFullName, entry)); break;
case FileType.bzip2: _files.add(new ArchiveBZip2File(entryFullName, entry)); break;
case FileType.text: _files.add(new Archiveutf8TextFile(entryFullName, entry)); break;
case FileType.text: _files.add(new ArchiveUTF8TextFile(entryFullName, entry)); break;
case FileType.latin1Text: _files.add(new ArchiveLatin1TextFile(entryFullName, entry)); break;
case FileType.metadata: break; // ignore this file
}
Expand Down Expand Up @@ -595,8 +595,8 @@ class ArchiveFile extends IoNode implements File {
}
}

class Archiveutf8TextFile extends ArchiveFile with utf8TextFile {
Archiveutf8TextFile(String fullName, a.ArchiveFile file) : super(fullName, file);
class ArchiveUTF8TextFile extends ArchiveFile with UTF8TextFile {
ArchiveUTF8TextFile(String fullName, a.ArchiveFile file) : super(fullName, file);
}

class ArchiveLatin1TextFile extends ArchiveFile with Latin1TextFile {
Expand Down Expand Up @@ -634,7 +634,7 @@ class InMemoryFile extends IoNode implements File {
case FileType.tar: return new InMemoryTarFile(fullName, bytes); break;
case FileType.gz: return new InMemoryGZipFile(fullName, bytes); break;
case FileType.bzip2: return new InMemoryBZip2File(fullName, bytes); break;
case FileType.text: return new InMemoryutf8TextFile(fullName, bytes); break;
case FileType.text: return new InMemoryUTF8TextFile(fullName, bytes); break;
case FileType.latin1Text: return new InMemoryLatin1TextFile(fullName, bytes); break;
case FileType.metadata: break; // ignore this file
}
Expand All @@ -654,8 +654,8 @@ class InMemoryFile extends IoNode implements File {
List<int> readBytes() => _bytes;
}

class InMemoryutf8TextFile extends InMemoryFile with utf8TextFile {
InMemoryutf8TextFile(String fullName, List<int> file) : super(fullName, file);
class InMemoryUTF8TextFile extends InMemoryFile with UTF8TextFile {
InMemoryUTF8TextFile(String fullName, List<int> file) : super(fullName, file);
}

class InMemoryLatin1TextFile extends InMemoryFile with Latin1TextFile {
Expand Down
16 changes: 8 additions & 8 deletions tools/licenses/lib/licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,25 +322,25 @@ abstract class License implements Comparable<License> {
throw 'incomplete license detected:\n---\n$body\n---';
// if (type == LicenseType.unknown)
// print('need detector for:\n----\n$body\n----');
bool isutf8 = true;
bool isUTF8 = true;
List<int> latin1Encoded;
try {
latin1Encoded = latin1.encode(body);
isutf8 = false;
latin1Encoded = LATIN1.encode(body);
isUTF8 = false;
} on ArgumentError { }
if (!isutf8) {
if (!isUTF8) {
bool isAscii = false;
try {
ascii.decode(latin1Encoded);
ASCII.decode(latin1Encoded);
isAscii = true;
} on FormatException { }
if (isAscii)
return;
try {
utf8.decode(latin1Encoded);
isutf8 = true;
UTF8.decode(latin1Encoded);
isUTF8 = true;
} on FormatException { }
if (isutf8)
if (isUTF8)
throw 'tried to create a License object with text that appears to have been misdecoded as Latin1 instead of as UTF-8:\n$body';
}
}
Expand Down
20 changes: 10 additions & 10 deletions tools/licenses/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class RepositorySourceFile extends RepositoryLicensedFile {
try {
contents = io.readString();
} on FormatException {
print('non-utf8 data in $io');
print('non-UTF8 data in $io');
system.exit(2);
}
_licenses = determineLicensesFor(contents, name, parent, origin: '$this');
Expand Down Expand Up @@ -736,33 +736,33 @@ class RepositoryMultiLicenseNoticesForFilesFile extends RepositoryLicenseFile {
// "Notices for files contained in the"
// ...then have a second line which is 60 "=" characters
final List<List<int>> contents = splitIntList(io.readBytes(), 0x0A).toList();
if (!ascii.decode(contents[0]).startsWith('Notices for files contained in') ||
ascii.decode(contents[1]) != '============================================================\n')
if (!ASCII.decode(contents[0]).startsWith('Notices for files contained in') ||
ASCII.decode(contents[1]) != '============================================================\n')
throw 'unrecognised syntax: ${io.fullName}';
int index = 2;
while (index < contents.length) {
if (ascii.decode(contents[index]) != 'Notices for file(s):\n')
if (ASCII.decode(contents[index]) != 'Notices for file(s):\n')
throw 'unrecognised syntax on line ${index + 1}: ${io.fullName}';
index += 1;
final List<String> names = <String>[];
do {
names.add(ascii.decode(contents[index]));
names.add(ASCII.decode(contents[index]));
index += 1;
} while (ascii.decode(contents[index]) != '------------------------------------------------------------\n');
} while (ASCII.decode(contents[index]) != '------------------------------------------------------------\n');
index += 1;
final List<List<int>> body = <List<int>>[];
do {
body.add(contents[index]);
index += 1;
} while (index < contents.length &&
ascii.decode(contents[index], allowInvalid: true) != '============================================================\n');
ASCII.decode(contents[index], allowInvalid: true) != '============================================================\n');
index += 1;
final List<int> bodyBytes = body.expand((List<int> line) => line).toList();
String bodyText;
try {
bodyText = utf8.decode(bodyBytes);
bodyText = UTF8.decode(bodyBytes);
} on FormatException {
bodyText = latin1.decode(bodyBytes);
bodyText = LATIN1.decode(bodyBytes);
}
License license = new License.unique(bodyText, LicenseType.unknown, origin: io.fullName);
for (String name in names) {
Expand Down Expand Up @@ -2545,7 +2545,7 @@ Future<Null> main(List<String> arguments) async {
system.File goldenFile = new system.File(
path.join(argResults['golden'], 'licenses_${component.io.name}'));
String goldenSignature = await goldenFile.openRead()
.transform(utf8.decoder).transform(new LineSplitter()).first;
.transform(UTF8.decoder).transform(new LineSplitter()).first;
Match goldenMatch = signaturePattern.matchAsPrefix(goldenSignature);
if (goldenMatch != null && goldenMatch.group(1) == signature) {
system.stderr.writeln(' Skipping this component - no change in signature');
Expand Down
Loading

0 comments on commit 00a5b80

Please sign in to comment.