Skip to content

Commit 1039490

Browse files
devoncarewCommit Queue
authored andcommitted
[deps] bring in dart-lang/i18n; update intl benchmark and sdk usage
Change-Id: Ic0b7558fb7caf3f8d8ac9a1f460345de45d563f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410080 Auto-Submit: Devon Carew <[email protected]> Reviewed-by: Moritz Sümmermann <[email protected]> Commit-Queue: Devon Carew <[email protected]>
1 parent 5e8bd02 commit 1039490

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

DEPS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ vars = {
135135
"flute_rev": "e4ea0459a7debae5e9592c85141707b01fac86c9",
136136
"glob_rev": "043796be996190473b397fa2fecfa34bb91376fb",
137137
"http_rev": "e28f9f5ec65d83d0bfb299a78c9365cc4dc38ba1",
138+
"i18n_rev": "189c2285ea523f70b688b4803b9c6b8c7c7a9dd0",
138139
"intl_rev": "5d65e3808ce40e6282e40881492607df4e35669f",
139140
"leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # rolled manually
140141
"markdown_rev": "62f78c64d963ba6f73bd70ed65630dc934a264e6",
@@ -351,6 +352,8 @@ deps = {
351352

352353
Var("dart_root") + "/third_party/pkg/http":
353354
Var("dart_git") + "http.git" + "@" + Var("http_rev"),
355+
Var("dart_root") + "/third_party/pkg/i18n":
356+
Var("dart_git") + "i18n.git" + "@" + Var("i18n_rev"),
354357
Var("dart_root") + "/third_party/pkg/intl":
355358
Var("dart_git") + "intl.git" + "@" + Var("intl_rev"),
356359
Var("dart_root") + "/third_party/pkg/leak_tracker":

benchmarks/Intl/dart/format.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ class Base extends BenchmarkBase {
4242
g = formatter.format(datum);
4343
}
4444
}
45-
46-
// TODO(devoncarew): Duplicated for golem investigation.
47-
for (var datum in data) {
48-
for (var formatter in formatters) {
49-
g = formatter.format(datum);
50-
}
51-
}
52-
// TODO(devoncarew): Duplicated for golem investigation.
5345
}
5446
}
5547

pkg/bisect_dart/lib/src/bisection_config.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'dart:io';
66

77
import 'package:cli_config/cli_config.dart';
8-
import 'package:intl/intl.dart';
98

109
class BisectionConfig {
1110
/// A way to identify this bisection.
@@ -41,7 +40,7 @@ class BisectionConfig {
4140
static const String _failureStringKey = 'failure_string';
4241

4342
// This will likely be extended later to support regexes.
44-
Pattern get failurePattern => failureString.toPattern();
43+
Pattern get failurePattern => RegExp(RegExp.escape(failureString));
4544

4645
/// The SDK checkout to use for bisecting.
4746
///
@@ -64,7 +63,7 @@ class BisectionConfig {
6463
factory BisectionConfig.fromConfig(Config config) {
6564
final testCommands = config.stringList(_testCommandsKey);
6665
final name = config.optionalString(_nameKey) ??
67-
'${DateFormat('yyyyMMdd').format(DateTime.now())}_'
66+
'${yyyyMMdd(DateTime.now())}_'
6867
'${testCommands.last.split(' ').last.split('/').last}';
6968
final sdkPath = config.optionalPath(_sdkPathKey, mustExist: true) ??
7069
Directory.current.uri;
@@ -158,6 +157,11 @@ $descriptions
158157
}
159158
}
160159

161-
extension on String {
162-
RegExp toPattern() => RegExp(RegExp.escape(this));
160+
String yyyyMMdd(DateTime date) {
161+
// DateFormat('yyyyMMdd').format(date)
162+
return padZero(date.year, 4) + padZero(date.month, 2) + padZero(date.day, 2);
163+
}
164+
165+
String padZero(int value, int width) {
166+
return value.toString().padLeft(width, '0');
163167
}

pkg/bisect_dart/pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ environment:
77

88
dependencies:
99
cli_config: any
10-
intl: any
1110
logging: any
1211

1312
dev_dependencies:

0 commit comments

Comments
 (0)