Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cfc6ed0

Browse files
committed
Version 2.14.0-377.1.beta
Merge '2.14.0-377.0.dev' into beta
2 parents 3cc4208 + 96fdaff commit cfc6ed0

File tree

2,107 files changed

+70807
-28054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,107 files changed

+70807
-28054
lines changed

.dart_tool/package_config.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"constraint, update this by running tools/generate_package_config.dart."
1212
],
1313
"configVersion": 2,
14-
"generated": "2021-07-02T15:48:57.033703",
14+
"generated": "2021-07-27T19:27:52.638315",
1515
"generator": "tools/generate_package_config.dart",
1616
"packages": [
1717
{
@@ -64,7 +64,7 @@
6464
"name": "_js_interop_checks",
6565
"rootUri": "../pkg/_js_interop_checks",
6666
"packageUri": "lib/",
67-
"languageVersion": "2.7"
67+
"languageVersion": "2.12"
6868
},
6969
{
7070
"name": "analysis_server",
@@ -142,13 +142,13 @@
142142
"name": "browser_launcher",
143143
"rootUri": "../third_party/pkg/browser_launcher",
144144
"packageUri": "lib/",
145-
"languageVersion": "2.2"
145+
"languageVersion": "2.12"
146146
},
147147
{
148148
"name": "build_integration",
149149
"rootUri": "../pkg/build_integration",
150150
"packageUri": "lib/",
151-
"languageVersion": "2.1"
151+
"languageVersion": "2.12"
152152
},
153153
{
154154
"name": "charcode",
@@ -250,7 +250,7 @@
250250
"name": "dev_compiler",
251251
"rootUri": "../pkg/dev_compiler",
252252
"packageUri": "lib/",
253-
"languageVersion": "2.3"
253+
"languageVersion": "2.12"
254254
},
255255
{
256256
"name": "devtools_shared",
@@ -353,12 +353,6 @@
353353
"packageUri": "lib/",
354354
"languageVersion": "2.12"
355355
},
356-
{
357-
"name": "http_retry",
358-
"rootUri": "../third_party/pkg/http_retry",
359-
"packageUri": "lib/",
360-
"languageVersion": "2.12"
361-
},
362356
{
363357
"name": "http_throttle",
364358
"rootUri": "../third_party/pkg/http_throttle",
@@ -731,13 +725,13 @@
731725
"name": "testing",
732726
"rootUri": "../pkg/testing",
733727
"packageUri": "lib/",
734-
"languageVersion": "2.0"
728+
"languageVersion": "2.12"
735729
},
736730
{
737731
"name": "typed_data",
738732
"rootUri": "../third_party/pkg/typed_data",
739733
"packageUri": "lib/",
740-
"languageVersion": "2.10"
734+
"languageVersion": "2.12"
741735
},
742736
{
743737
"name": "usage",
@@ -755,7 +749,7 @@
755749
"name": "vm",
756750
"rootUri": "../pkg/vm",
757751
"packageUri": "lib/",
758-
"languageVersion": "2.7"
752+
"languageVersion": "2.12"
759753
},
760754
{
761755
"name": "vm_service",
@@ -797,7 +791,7 @@
797791
"name": "webkit_inspection_protocol",
798792
"rootUri": "../third_party/pkg/webkit_inspection_protocol",
799793
"packageUri": "lib/",
800-
"languageVersion": "2.0"
794+
"languageVersion": "2.12"
801795
},
802796
{
803797
"name": "yaml",

CHANGELOG.md

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,26 @@
159159

160160
#### Linter
161161

162-
Updated the Linter to `1.7.0`, which includes changes that
163-
162+
Updated the Linter to `1.8.0`, which includes changes that
163+
164+
165+
- improve performance for `prefer_is_not_empty`.
166+
- fix false positives in `no_logic_in_create_state`.
167+
- improve `package_names` to allow dart identifiers as package names.
168+
- fix a false-positive in `package_names` (causing keywords to wrongly get flagged).
169+
- fix `avoid_classes_with_only_static_member` to check for inherited members and also
170+
flag classes with only methods.
171+
- fix `curly_braces_in_flow_control_structures` to properly flag terminating `else-if`
172+
blocks.
173+
- improve `always_specify_types` to support type aliases.
174+
- fix a false positive in `unnecessary_string_interpolations` w/ nullable interpolated
175+
strings
176+
- fix a false positive in `avoid_function_literals_in_foreach_calls` for nullable
177+
iterables.
178+
- fix false positives in `avoid_returning_null` w/ NNBD
179+
- fix false positives in `use_late_for_private_fields_and_variables` in the presence
180+
of const constructors.
181+
- adds a new lint: `eol_at_end_of_file`.
164182
- fix case-sensitive false positive in `use_full_hex_values_for_flutter_colors`.
165183
- improve try-block and switch statement flow analysis for
166184
`use_build_context_synchronously`.
@@ -246,50 +264,15 @@ Updated the Linter to `1.7.0`, which includes changes that
246264
[#46545]: https://github.com/dart-lang/sdk/issues/46545
247265
[1]: https://dart.dev/faq#q-what-browsers-do-you-support-as-javascript-compilation-targets
248266

249-
### Language
250-
251-
* Add an unsigned shift right operator `>>>`. Pad with zeroes, ignoring the
252-
sign bit. On the web platform `int.>>>` shifts the low 32 bits interpreted
253-
as an unsigned integer, so `a >>> b` gives the same result as
254-
`a.toUnsigned(32) >>> b` on the VM.
255-
256-
* Prior to Dart 2.14, metadata (annotations) were not permitted to be
257-
specified with generic type arguments. This restriction is lifted in Dart
258-
Dart 2.14.
259-
260-
```dart
261-
class C<T> {
262-
const C();
263-
}
264-
@C(); // Previously permitted.
265-
@C<int>(); // Previously an error, now permitted.
266-
```
267+
#### Dart Dev Compiler (DDC)
267268

268-
* Prior to Dart 2.14, generic function types were not permitted as arguments
269-
to generic classes or functions, nor to be used as generic bounds. This
270-
restriction is lifted in Dart 2.14.
269+
- **Breaking Change** [#44154][]: Subtyping relations of `package:js` classes
270+
have been changed to be more correct and consistent with Dart2JS.
271+
Like `anonymous` classes, non-`anonymous` classes will no longer check the
272+
underlying type in DDC. The internal type representation of these objects have
273+
changed as well, which will affect the `toString` value of these types.
271274

272-
```dart
273-
T wrapWithLogging<T>(T f) {
274-
if (f is void Function<T>(T x)) {
275-
return <S>(S x) {
276-
print("Call: f<$S>($x)");
277-
var r = f<S>(x);
278-
print("Return: $x");
279-
return r;
280-
} as T;
281-
} // More cases here
282-
return f;
283-
}
284-
void foo<T>(T x) {
285-
print("Foo!");
286-
}
287-
void main() {
288-
// Previously an error, now permitted.
289-
var f = wrapWithLogging<void Function<T>(T)>(foo);
290-
f<int>(3);
291-
}
292-
```
275+
[#44154]: https://github.com/dart-lang/sdk/issues/44154
293276

294277
## 2.13.4 - 2021-06-28
295278

DEPS

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ vars = {
3939

4040
# Checked-in SDK version. The checked-in SDK is a Dart SDK distribution in a
4141
# cipd package used to run Dart scripts in the build and test infrastructure.
42-
"sdk_tag": "version:2.13.1",
42+
"sdk_tag": "version:2.14.0-293.0.dev",
4343

4444
# co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
4545
# hashes. It requires access to the dart-build-access group, which EngProd
@@ -72,22 +72,22 @@ vars = {
7272
"gperftools_revision": "180bfa10d7cb38e8b3784d60943d50e8fcef0dcb",
7373

7474
# Revisions of /third_party/* dependencies.
75-
"args_rev": "d8fea36c10ef96797be02e3d132d572445cd86f4",
76-
"async_rev": "8193eac211905cf33ae1f514022fdbd843836be5",
75+
"args_rev": "bf4c8796881b62fd5d3f6d86ab43014f9651eb20",
76+
"async_rev": "25a7e2ec39c03622b86918cb9ce3e7d00dd283d1",
7777
"bazel_worker_rev": "0885637b037979afbf5bcd05fd748b309fd669c0",
7878
"benchmark_harness_rev": "c546dbd9f639f75cd2f75de8df2eb9f8ea15e8e7",
7979
"boolean_selector_rev": "665e6921ab246569420376f827bff4585dff0b14",
8080
"boringssl_gen_rev": "7322fc15cc065d8d2957fccce6b62a509dc4d641",
8181
"boringssl_rev" : "1607f54fed72c6589d560254626909a64124f091",
8282
"browser-compat-data_tag": "v1.0.22",
83-
"browser_launcher_rev": "12ab9f351a44ac803de9bc17bb2180bb312a9dd7",
83+
"browser_launcher_rev": "c6cc1025d6901926cf022e144ba109677e3548f1",
8484
"charcode_rev": "84ea427711e24abf3b832923959caa7dd9a8514b",
8585
"chrome_rev" : "19997",
8686
"cli_util_rev" : "8c504de5deb08fe32ecf51f9662bb37d8c708e57",
8787
"clock_rev" : "a494269254ba978e7ef8f192c5f7fec3fc05b9d3",
8888
"collection_rev": "75a7a5510979a3cd70143af85bcc1667ee233674",
89-
"convert_rev": "413f591577419d8a8b95d445094a82c926650bd1",
90-
"crypto_rev": "1c8ccc07b83b100216dc6dede767371043385648",
89+
"convert_rev": "e063fdca4bebffecbb5e6aa5525995120982d9ce",
90+
"crypto_rev": "b5024e4de2b1c474dd558bef593ddbf0bfade152",
9191
"csslib_rev": "e411d862fd8cc50415c1badf2632e017373b3f47",
9292
"dart2js_info_rev" : "e0acfeb5affdf94c53067e68bd836adf589628fd",
9393

@@ -103,7 +103,7 @@ vars = {
103103
# and land the review.
104104
#
105105
# For more details, see https://github.com/dart-lang/sdk/issues/30164
106-
"dart_style_rev": "9d9dff90d9a2e0793ad2f795f36c2777f720eda0",
106+
"dart_style_rev": "06bfd19593ed84dd288f67e02c6a753e6516288a",
107107

108108
"dartdoc_rev" : "c9621b92c738ec21a348cc2de032858276e9c774",
109109
"devtools_rev" : "64cffbed6366329ad05e44d48fa2298367643bb6",
@@ -115,38 +115,37 @@ vars = {
115115
"html_rev": "00cd3c22dac0e68e6ed9e7e4945101aedb1b3109",
116116
"http_io_rev": "2fa188caf7937e313026557713f7feffedd4978b",
117117
"http_multi_server_rev": "de1b312164c24a1690b46c6e97bd47eff40c4649",
118-
"http_parser_rev": "7720bfd42a0c096734c5213478fdce92c62f0293",
119-
"http_retry_rev": "845771af7bb5ab38ab740ce4a31f3b0c7680302b",
120-
"http_rev": "f93c76fabdb03963303762e3fe16cbdf60799cff",
118+
"http_parser_rev": "202391286ddc13c4c3c284ac5b511f04697250ed",
119+
"http_rev": "778174bca2c13becd88ef3353309190b1e8b9479",
121120
"http_throttle_tag" : "1.0.2",
122121
"icu_rev" : "81d656878ec611cb0b42d52c82e9dae93920d9ba",
123122
"idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
124123
"intl_tag": "0.17.0-nullsafety",
125124
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
126125
"json_rpc_2_rev": "7e00f893440a72de0637970325e4ea44bd1e8c8e",
127-
"linter_tag": "422981ffb2fbd4010aa52381676cf745e2844dd9",
126+
"linter_tag": "1.8.0",
128127
"lints_tag": "f9670df2a66e0ec12eb51554e70c1cbf56c8f5d0",
129-
"logging_rev": "e2f633b543ef89c54688554b15ca3d7e425b86a2",
128+
"logging_rev": "575781ef196e4fed4fb737e38fb4b73d62727187",
130129
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
131130
"markdown_rev": "9c4beaac96d8f008078e00b027915f81b665d2de",
132-
"matcher_rev": "1f7b6f0cb15eb6659a1de0513571575a5c8a51d0",
131+
"matcher_rev": "b411b22ec2437ba206c7a3006bbaeb519bd343d1",
133132
"mime_rev": "c931f4bed87221beaece356494b43731445ce7b8",
134133
"mockito_rev": "d39ac507483b9891165e422ec98d9fb480037c8b",
135134
"oauth2_rev": "7cd3284049fe5badbec9f2bea2afc41d14c01057",
136135
"package_config_rev": "a84c0d45401f215fbe9384df923a38f4022a3c45",
137-
"path_rev": "407ab76187fade41c31e39c745b39661b710106c",
136+
"path_rev": "c20d73c3516d3a0061c90f14b761ff532b9bf707",
138137
"pedantic_rev": "66f2f6c27581c7936482e83be80b27be2719901c",
139138
"platform_rev": "c20e6fa315e9f8820e51c0ae721f63aff33b8e17",
140139
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
141140
"pool_rev": "7abe634002a1ba8a0928eded086062f1307ccfae",
142141
"process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
143-
"protobuf_rev": "0d03fd588df69e9863e2a2efc0059dee8f18d5b2",
144-
"pub_rev": "d159e5b9f04a7e4826b6afea7b3364d48aa0dad8",
142+
"protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
143+
"pub_rev": "70b1a4f9229a36bac6340ec7eae2b2068baac96c",
145144
"pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
146145
"resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
147146
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
148147
"rust_revision": "b7856f695d65a8ebc846754f97d15814bcb1c244",
149-
"shelf_static_rev": "fb6b7d0ee4ad936a84e503ae6b3703cc99e61d52",
148+
"shelf_static_rev": "202ec1a53c9a830c17cf3b718d089cf7eba568ad",
150149
"shelf_packages_handler_rev": "78302e67c035047e6348e692b0c1182131f0fe35",
151150
"shelf_proxy_tag": "v1.0.0",
152151
"shelf_rev": "46483f896cc4308ee3d8e997030ae799b72aa16a",
@@ -164,8 +163,8 @@ vars = {
164163
"test_process_tag": "2.0.0",
165164
"term_glyph_rev": "6a0f9b6fb645ba75e7a00a4e20072678327a0347",
166165
"test_reflective_loader_rev": "54e930a11c372683792e22bddad79197728c91ce",
167-
"test_rev": "030816c32b6fe78d5fb7653afbd9f63cca18bacf",
168-
"typed_data_tag": "f94fc57b8e8c0e4fe4ff6cfd8290b94af52d3719",
166+
"test_rev": "099dcc4d052a30c6921489cfbefa1c8531d12975",
167+
"typed_data_rev": "29ce5a92b03326d0b8035916ac04f528874994bd",
169168
"usage_rev": "e0780cd8b2f8af69a28dc52678ffe8492da27d06",
170169
"vector_math_rev": "0c9f5d68c047813a6dcdeb88ba7a42daddf25025",
171170
"watcher_rev": "3924194385fb215cef483193ed2879a618a3d69c",
@@ -174,7 +173,7 @@ vars = {
174173
"web_socket_channel_rev": "6448ce532445a8a458fa191d9346df071ae0acad",
175174
"WebCore_rev": "fb11e887f77919450e497344da570d780e078bc8",
176175
"webdev_rev": "b0aae7b6944d484722e6af164abedd864a2a0afa",
177-
"webkit_inspection_protocol_rev": "6b15729292d030f2e5c5861022da4c5a4c11961c",
176+
"webkit_inspection_protocol_rev": "dd6fb5d8b536e19cedb384d0bbf1f5631923f1e8",
178177
"yaml_rev": "b4c4411631bda556ce9a45af1ab0eecaf9f3ac53",
179178
"zlib_rev": "bf44340d1b6be1af8950bbdf664fec0cf5a831cc",
180179
"crashpad_rev": "bf327d8ceb6a669607b0dbab5a83a275d03f99ed",
@@ -370,9 +369,6 @@ deps = {
370369
"@" + Var("http_multi_server_rev"),
371370
Var("dart_root") + "/third_party/pkg/http_parser":
372371
Var("dart_git") + "http_parser.git" + "@" + Var("http_parser_rev"),
373-
Var("dart_root") + "/third_party/pkg/http_retry":
374-
Var("dart_git") + "http_retry.git" +
375-
"@" + Var("http_retry_rev"),
376372
Var("dart_root") + "/third_party/pkg/http_throttle":
377373
Var("dart_git") + "http_throttle.git" +
378374
"@" + Var("http_throttle_tag"),
@@ -460,7 +456,7 @@ deps = {
460456
Var("dart_git") + "test_reflective_loader.git" +
461457
"@" + Var("test_reflective_loader_rev"),
462458
Var("dart_root") + "/third_party/pkg/typed_data":
463-
Var("dart_git") + "typed_data.git" + "@" + Var("typed_data_tag"),
459+
Var("dart_git") + "typed_data.git" + "@" + Var("typed_data_rev"),
464460
Var("dart_root") + "/third_party/pkg/usage":
465461
Var("dart_git") + "usage.git" + "@" + Var("usage_rev"),
466462
Var("dart_root") + "/third_party/pkg/vector_math":

PRESUBMIT.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ def _CheckDartFormat(input_api, output_api):
109109
utils = imp.load_source('utils',
110110
os.path.join(local_root, 'tools', 'utils.py'))
111111

112-
prebuilt_dartfmt = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dartfmt')
112+
dart = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dart')
113113

114114
windows = utils.GuessOS() == 'win32'
115115
if windows:
116-
prebuilt_dartfmt += '.bat'
116+
dart += '.exe'
117117

118-
if not os.path.isfile(prebuilt_dartfmt):
119-
print('WARNING: dartfmt not found: %s' % (prebuilt_dartfmt))
118+
if not os.path.isfile(dart):
119+
print('WARNING: dart not found: %s' % (dart))
120120
return []
121121

122122
def HasFormatErrors(filename=None, contents=None):
@@ -129,21 +129,25 @@ def HasFormatErrors(filename=None, contents=None):
129129
if '//#' in contents:
130130
return False
131131

132-
args = [prebuilt_dartfmt, '--set-exit-if-changed']
133-
if not contents:
134-
args += [filename, '-n']
132+
args = [
133+
dart,
134+
'format',
135+
'--set-exit-if-changed',
136+
'--output=none',
137+
'--summary=none',
138+
filename,
139+
]
135140

136141
process = subprocess.Popen(
137142
args, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
138-
process.communicate(input=contents)
139143

140144
# Check for exit code 1 explicitly to distinguish it from a syntax error
141145
# in the file (exit code 65). The repo contains many Dart files that are
142146
# known to have syntax errors for testing purposes and which can't be
143147
# parsed and formatted. Don't treat those as errors.
144148
return process.returncode == 1
145149

146-
unformatted_files = _CheckFormat(input_api, "dartfmt", ".dart", windows,
150+
unformatted_files = _CheckFormat(input_api, "dart format", ".dart", windows,
147151
HasFormatErrors)
148152

149153
if unformatted_files:

benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ const snapshots = <String>[
3434
];
3535

3636
Future<void> reportArtifactSize(String path, String name) async {
37-
final size = await File(path).length();
38-
print('SDKArtifactSizes.$name(CodeSize): $size');
37+
try {
38+
final size = await File(path).length();
39+
print('SDKArtifactSizes.$name(CodeSize): $size');
40+
} on FileSystemException {
41+
// Report dummy data for artifacts that don't exist for specific platforms.
42+
print('SDKArtifactSizes.$name(CodeSize): 0');
43+
}
3944
}
4045

4146
Future<void> main() async {

benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ const snapshots = <String>[
3434
];
3535

3636
Future<void> reportArtifactSize(String path, String name) async {
37-
final size = await File(path).length();
38-
print('SDKArtifactSizes.$name(CodeSize): $size');
37+
try {
38+
final size = await File(path).length();
39+
print('SDKArtifactSizes.$name(CodeSize): $size');
40+
} on FileSystemException {
41+
// Report dummy data for artifacts that don't exist for specific platforms.
42+
print('SDKArtifactSizes.$name(CodeSize): 0');
43+
}
3944
}
4045

4146
Future<void> main() async {

0 commit comments

Comments
 (0)