Skip to content

Commit cec8a6e

Browse files
authored
Manual roll of Dart SDK from ce76503f5b46 to dcd5a8f005a (flutter#22766)
dart-lang/sdk@dcd5a8f005a [vm/aot] Two improvements to signature shaking (reland) dart-lang/sdk@5bff8f3bb4c [co19] Roll co19 to 8740182c0547c1b26b79a5f96e28a0d5cd27b0c9 dart-lang/sdk@b16e402fb93 Prepare for replacing PackageBundle with PackageBundleReader. dart-lang/sdk@85174e4d8cf Revert "Reland "update Glob in the sdk, also adds package:file to the sdk"" dart-lang/sdk@4a206e41082 Analyzer: Report invalid instance access from closure within factory dart-lang/sdk@72e8eab7e2a [vm/concurrency] Reduce public API surface of ICData, remove unused methods, make methods private dart-lang/sdk@94f6532bd9c Capture a couple of failing completions as tests dart-lang/sdk@c62709e87b0 Reland "update Glob in the sdk, also adds package:file to the sdk" dart-lang/sdk@4fc797d6b15 [Analyzer] Add LSP dart.analysisExcludedFolders to readme dart-lang/sdk@e047dd60d61 Ensure that function elements inside local variable elements have unique locations. dart-lang/sdk@7de67100a30 [co19] Roll co19 to 7a43aa19fb31db657b8b2dac2ed8a8af28889be3 dart-lang/sdk@367761987bf [vm/corelib] Fix ConcurrentModificationError for empty addAll. dart-lang/sdk@b64550eaff6 Add a `nullFuture` in `dart:internal`.
1 parent 7b5f79f commit cec8a6e

File tree

6 files changed

+43
-16
lines changed

6 files changed

+43
-16
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ vars = {
3434
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
3535
# You can use //tools/dart/create_updated_flutter_deps.py to produce
3636
# updated revision list of existing dependencies.
37-
'dart_revision': 'ce76503f5b461590926ba619351518d593b81153',
37+
'dart_revision': 'dcd5a8f005a27361f351ef12b2ad49e700d36169',
3838

3939
# WARNING: DO NOT EDIT MANUALLY
4040
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py

ci/licenses_golden/licenses_third_party

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: e4f965835a37a079ac9033d7fe951bb4
1+
Signature: 32a07d90ab604d3cd5828941c268ea0d
22

33
UNUSED LICENSES:
44

tools/const_finder/.dart_tool/package_config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
"packageUri": "lib",
88
"languageVersion": "2.4"
99
},
10+
{
11+
"name": "collection",
12+
"rootUri": "../../../../third_party/dart/third_party/pkg/collection",
13+
"packageUri": "lib",
14+
"languageVersion": "2.10"
15+
},
1016
{
1117
"name": "kernel",
1218
"rootUri": "../../../../third_party/dart/pkg/kernel",
@@ -32,4 +38,4 @@
3238
"languageVersion": "2.10"
3339
}
3440
]
35-
}
41+
}

tools/const_finder/.packages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Generated by pub on 2020-07-16 10:06:29.401548.
1+
# Generated by pub on 2020-11-27 10:12:47.813477.
22
args:../../../third_party/dart/third_party/pkg/args/lib/
3+
collection:../../../third_party/dart/third_party/pkg/collection/lib/
34
kernel:../../../third_party/dart/pkg/kernel/lib/
45
meta:../../../third_party/dart/pkg/meta/lib/
56
path:../../../third_party/dart/third_party/pkg/path/lib/

tools/const_finder/pubspec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ environment:
1818

1919
dependencies:
2020
args: any
21+
collection: any
2122
meta: any
2223
kernel: any
2324

@@ -27,6 +28,8 @@ dev_dependencies:
2728
dependency_overrides:
2829
args:
2930
path: ../../../third_party/dart/third_party/pkg/args
31+
collection:
32+
path: ../../../third_party/dart/third_party/pkg/collection
3033
kernel:
3134
path: ../../../third_party/dart/pkg/kernel
3235
meta:

tools/const_finder/test/const_finder_test.dart

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import 'dart:convert' show jsonEncode;
66
import 'dart:io';
77

8+
import 'package:collection/collection.dart';
89
import 'package:const_finder/const_finder.dart';
910
import 'package:path/path.dart' as path;
1011

@@ -16,6 +17,22 @@ void expect<T>(T value, T expected) {
1617
}
1718
}
1819

20+
void expectInstances(dynamic value, dynamic expected) {
21+
// To ensure we ignore insertion order into maps as well as lists we use
22+
// DeepCollectionEquality as well as sort the lists.
23+
24+
int compareByStringValue(dynamic a, dynamic b) {
25+
return a['stringValue'].compareTo(b['stringValue']) as int;
26+
}
27+
value['constantInstances'].sort(compareByStringValue);
28+
expected['constantInstances'].sort(compareByStringValue);
29+
if (!const DeepCollectionEquality().equals(value, expected)) {
30+
stderr.writeln('Expected: ${jsonEncode(expected)}');
31+
stderr.writeln('Actual: ${jsonEncode(value)}');
32+
exitCode = -1;
33+
}
34+
}
35+
1936
final String basePath =
2037
path.canonicalize(path.join(path.dirname(Platform.script.path), '..'));
2138
final String fixtures = path.join(basePath, 'test', 'fixtures');
@@ -50,9 +67,9 @@ void _checkConsts() {
5067
classLibraryUri: 'package:const_finder_fixtures/target.dart',
5168
className: 'Target',
5269
);
53-
expect<String>(
54-
jsonEncode(finder.findInstances()),
55-
jsonEncode(<String, dynamic>{
70+
expectInstances(
71+
finder.findInstances(),
72+
<String, dynamic>{
5673
'constantInstances': <Map<String, dynamic>>[
5774
<String, dynamic>{'stringValue': '100', 'intValue': 100, 'targetValue': null},
5875
<String, dynamic>{'stringValue': '102', 'intValue': 102, 'targetValue': null},
@@ -76,22 +93,22 @@ void _checkConsts() {
7693
<String, dynamic>{'stringValue': 'package', 'intValue':-1, 'targetValue': null},
7794
],
7895
'nonConstantLocations': <dynamic>[],
79-
}),
96+
},
8097
);
8198

8299
final ConstFinder finder2 = ConstFinder(
83100
kernelFilePath: constsDill,
84101
classLibraryUri: 'package:const_finder_fixtures/target.dart',
85102
className: 'MixedInTarget',
86103
);
87-
expect<String>(
88-
jsonEncode(finder2.findInstances()),
89-
jsonEncode(<String, dynamic>{
104+
expectInstances(
105+
finder2.findInstances(),
106+
<String, dynamic>{
90107
'constantInstances': <Map<String, dynamic>>[
91108
<String, dynamic>{'val': '13'},
92109
],
93110
'nonConstantLocations': <dynamic>[],
94-
}),
111+
},
95112
);
96113
}
97114

@@ -103,9 +120,9 @@ void _checkNonConsts() {
103120
className: 'Target',
104121
);
105122

106-
expect<String>(
107-
jsonEncode(finder.findInstances()),
108-
jsonEncode(<String, dynamic>{
123+
expectInstances(
124+
finder.findInstances(),
125+
<String, dynamic>{
109126
'constantInstances': <dynamic>[
110127
<String, dynamic>{'stringValue': '1', 'intValue': 1, 'targetValue': null},
111128
<String, dynamic>{'stringValue': '6', 'intValue': 6, 'targetValue': null},
@@ -141,7 +158,7 @@ void _checkNonConsts() {
141158
'column': 25,
142159
}
143160
]
144-
}),
161+
},
145162
);
146163
}
147164

0 commit comments

Comments
 (0)