mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:59:47 +00:00
Revert "Stop using package:intl, remove it from DEPS."
This reverts commit b0d7c56e84
.
Reason for revert: breaks Golem, we need these benchmarks.
Original change's description:
> Stop using package:intl, remove it from DEPS.
>
> Change-Id: I7a6c036f7cd2c5ac64b0ab5a8b87bed1b9f34034
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224660
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com
Change-Id: I39d4a2c773063da4dfa75404b64987f85dbcf764
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
93bcdf0329
commit
73cfe523e0
|
@ -11,7 +11,7 @@
|
|||
"constraint, update this by running tools/generate_package_config.dart."
|
||||
],
|
||||
"configVersion": 2,
|
||||
"generated": "2021-12-16T12:51:36.232645",
|
||||
"generated": "2021-12-10T17:31:54.553345",
|
||||
"generator": "tools/generate_package_config.dart",
|
||||
"packages": [
|
||||
{
|
||||
|
@ -371,6 +371,12 @@
|
|||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "intl",
|
||||
"rootUri": "../third_party/pkg/intl",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.11"
|
||||
},
|
||||
{
|
||||
"name": "js",
|
||||
"rootUri": "../pkg/js",
|
||||
|
|
3
DEPS
3
DEPS
|
@ -120,6 +120,7 @@ vars = {
|
|||
"http_parser_rev": "202391286ddc13c4c3c284ac5b511f04697250ed",
|
||||
"http_rev": "f35d1e1467092f6a5edb2abf7071c4a99e8c737a",
|
||||
"icu_rev" : "81d656878ec611cb0b42d52c82e9dae93920d9ba",
|
||||
"intl_tag": "0.17.0-nullsafety",
|
||||
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
|
||||
"json_rpc_2_rev": "7e00f893440a72de0637970325e4ea44bd1e8c8e",
|
||||
"linter_tag": "1.17.1",
|
||||
|
@ -364,6 +365,8 @@ deps = {
|
|||
"@" + Var("http_multi_server_rev"),
|
||||
Var("dart_root") + "/third_party/pkg/http_parser":
|
||||
Var("dart_git") + "http_parser.git" + "@" + Var("http_parser_rev"),
|
||||
Var("dart_root") + "/third_party/pkg/intl":
|
||||
Var("dart_git") + "intl.git" + "@" + Var("intl_tag"),
|
||||
Var("dart_root") + "/third_party/pkg/json_rpc_2":
|
||||
Var("dart_git") + "json_rpc_2.git" + "@" + Var("json_rpc_2_rev"),
|
||||
Var("dart_root") + "/third_party/pkg/linter":
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:analyzer/file_system/file_system.dart';
|
|||
import 'package:analyzer/file_system/physical_file_system.dart';
|
||||
import 'package:analyzer_utilities/package_root.dart';
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'perf/benchmarks_impl.dart';
|
||||
|
@ -87,6 +88,8 @@ abstract class Benchmark {
|
|||
}
|
||||
|
||||
class BenchMarkResult {
|
||||
static final NumberFormat nf = NumberFormat.decimalPattern();
|
||||
|
||||
/// One of 'bytes', 'micros', or 'compound'.
|
||||
final String kindName;
|
||||
|
||||
|
@ -101,7 +104,7 @@ class BenchMarkResult {
|
|||
Map toJson() => {kindName: value};
|
||||
|
||||
@override
|
||||
String toString() => '$kindName: $value';
|
||||
String toString() => '$kindName: ${nf.format(value)}';
|
||||
}
|
||||
|
||||
class CompoundBenchMarkResult extends BenchMarkResult {
|
||||
|
|
|
@ -5,11 +5,15 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
final NumberFormat numberFormat = NumberFormat.decimalPattern();
|
||||
|
||||
String escape(String? text) => text == null ? '' : htmlEscape.convert(text);
|
||||
|
||||
String printInteger(int value) => '$value';
|
||||
String printInteger(int value) => numberFormat.format(value);
|
||||
|
||||
String printMilliseconds(int value) => '$value ms';
|
||||
String printMilliseconds(num value) => '${numberFormat.format(value)} ms';
|
||||
|
||||
String printPercentage(num value, [int fractionDigits = 1]) =>
|
||||
'${(value * 100).toStringAsFixed(fractionDigits)}%';
|
||||
|
|
|
@ -20,6 +20,7 @@ dependencies:
|
|||
dart_style: any
|
||||
http: any
|
||||
html: any
|
||||
intl: any
|
||||
linter: any
|
||||
meta:
|
||||
path: ../meta
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'dart:async';
|
|||
import 'dart:io' as io;
|
||||
|
||||
import 'package:analysis_server_client/protocol.dart' hide AnalysisError;
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
|
@ -17,6 +18,8 @@ import '../utils.dart';
|
|||
class FixCommand extends DartdevCommand {
|
||||
static const String cmdName = 'fix';
|
||||
|
||||
static final NumberFormat _numberFormat = NumberFormat.decimalPattern();
|
||||
|
||||
static const String cmdDescription =
|
||||
'''Apply automated fixes to Dart source code.
|
||||
|
||||
|
@ -341,7 +344,7 @@ To use the tool, run either ['dart fix --dry-run'] for a preview of the proposed
|
|||
}
|
||||
}
|
||||
|
||||
static String _format(int value) => '$value';
|
||||
static String _format(int value) => _numberFormat.format(value);
|
||||
}
|
||||
|
||||
/// The result of running tests in a given directory.
|
||||
|
|
|
@ -23,6 +23,7 @@ dependencies:
|
|||
devtools_server: any
|
||||
front_end:
|
||||
path: ../front_end
|
||||
intl: any
|
||||
meta:
|
||||
path: ../meta
|
||||
nnbd_migration:
|
||||
|
|
Loading…
Reference in a new issue