Skip to content

Commit 35cd618

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
Remove dart:mirrors library from dart2js and ddc SDKs
A followup change will delete the patches that are no longer needed once these changes have been "mirrored" :P to the libraries files in the flutter repos. Change-Id: I7d255838b97922198248b29311facd4956001e25 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134405 Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]>
1 parent c798bd8 commit 35cd618

File tree

9 files changed

+24
-330
lines changed

9 files changed

+24
-330
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ additional details see the [announcement].
4242
`allowInterop`. This behavior was always enforced by `dart2js`, but was not
4343
enforced consistently in `ddc`. It will now be enforced in both.
4444
* JS interop classes with an index operator are now static errors.
45+
* Removed the `dart:mirrors` library from the SDK. Use of this library on the
46+
web has been unsupported and prevented by the Dart build systems since Dart
47+
v2.0.0. All known exception cases have been cleaned up. This change makes DDC
48+
and dart2js now issue a compile-time error directly as well.
4549

4650
[announcement]: https://github.com/dart-lang/sdk/issues/38994
4751

@@ -53,6 +57,10 @@ additional details see the [announcement].
5357
forgiving. Corresponding type parameter bounds now only need to be mutual
5458
subtypes rather than structurally equal up to renaming of bound type variables
5559
and equating all top types.
60+
* Removed the `dart:mirrors` library from the SDK. Use of this library on the
61+
web has been unsupported and prevented by the Dart build systems since Dart
62+
v2.0.0. All known exception cases have been cleaned up. This change makes DDC
63+
and dart2js now issue a compile-time error directly as well.
5664

5765
#### Linter
5866

pkg/compiler/lib/src/kernel/dart2js_target.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ const _requiredLibraries = const <String, List<String>>{
183183
'dart:io',
184184
'dart:js',
185185
'dart:js_util',
186-
'dart:mirrors',
187186
'dart:svg',
188187
'dart:web_audio',
189188
'dart:web_gl',
@@ -202,7 +201,6 @@ const _requiredLibraries = const <String, List<String>>{
202201
'dart:io',
203202
'dart:js',
204203
'dart:js_util',
205-
'dart:mirrors',
206204
]
207205
};
208206

pkg/dev_compiler/lib/src/kernel/target.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class DevCompilerTarget extends Target {
4545
'dart:_internal',
4646
'dart:_isolate_helper',
4747
'dart:_js_helper',
48-
'dart:_js_mirrors',
4948
'dart:_js_primitives',
5049
'dart:_metadata',
5150
'dart:_native_typed_data',
@@ -58,7 +57,6 @@ class DevCompilerTarget extends Target {
5857
'dart:js',
5958
'dart:js_util',
6059
'dart:math',
61-
'dart:mirrors',
6260
'dart:typed_data',
6361
'dart:indexed_db',
6462
'dart:html',

sdk/lib/libraries.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,6 @@
217217
"uri": "math/math.dart",
218218
"patches": "_internal/js_runtime/lib/math_patch.dart"
219219
},
220-
"mirrors": {
221-
"uri": "mirrors/mirrors.dart",
222-
"patches": "_internal/js_runtime/lib/mirrors_patch_cfe.dart",
223-
"supported": false
224-
},
225220
"typed_data": {
226221
"uri": "typed_data/typed_data.dart",
227222
"patches": "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -327,11 +322,6 @@
327322
"uri": "math/math.dart",
328323
"patches": "_internal/js_runtime/lib/math_patch.dart"
329324
},
330-
"mirrors": {
331-
"uri": "mirrors/mirrors.dart",
332-
"patches": "_internal/js_runtime/lib/mirrors_patch_cfe.dart",
333-
"supported": false
334-
},
335325
"typed_data": {
336326
"uri": "typed_data/typed_data.dart",
337327
"patches": "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -399,9 +389,6 @@
399389
"_js_helper": {
400390
"uri": "_internal/js_dev_runtime/private/js_helper.dart"
401391
},
402-
"_js_mirrors": {
403-
"uri": "_internal/js_dev_runtime/private/js_mirrors.dart"
404-
},
405392
"_js_primitives": {
406393
"uri": "_internal/js_dev_runtime/private/js_primitives.dart"
407394
},
@@ -441,11 +428,6 @@
441428
"patches": "_internal/js_dev_runtime/patch/isolate_patch.dart",
442429
"supported": false
443430
},
444-
"mirrors": {
445-
"uri": "mirrors/mirrors.dart",
446-
"patches": "_internal/js_dev_runtime/patch/mirrors_patch.dart",
447-
"supported": false
448-
},
449431
"math": {
450432
"uri": "math/math.dart",
451433
"patches": "_internal/js_dev_runtime/patch/math_patch.dart"

sdk/lib/libraries.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,6 @@ dart2js:
214214
uri: "math/math.dart"
215215
patches: "_internal/js_runtime/lib/math_patch.dart"
216216

217-
mirrors:
218-
uri: "mirrors/mirrors.dart"
219-
patches: "_internal/js_runtime/lib/mirrors_patch_cfe.dart"
220-
supported: false
221-
222217
typed_data:
223218
uri: "typed_data/typed_data.dart"
224219
patches: "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -322,11 +317,6 @@ dart2js_server:
322317
uri: "math/math.dart"
323318
patches: "_internal/js_runtime/lib/math_patch.dart"
324319

325-
mirrors:
326-
uri: "mirrors/mirrors.dart"
327-
patches: "_internal/js_runtime/lib/mirrors_patch_cfe.dart"
328-
supported: false
329-
330320
typed_data:
331321
uri: "typed_data/typed_data.dart"
332322
patches: "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -392,9 +382,6 @@ dartdevc:
392382
_js_helper:
393383
uri: "_internal/js_dev_runtime/private/js_helper.dart"
394384

395-
_js_mirrors:
396-
uri: "_internal/js_dev_runtime/private/js_mirrors.dart"
397-
398385
_js_primitives:
399386
uri: "_internal/js_dev_runtime/private/js_primitives.dart"
400387

@@ -434,11 +421,6 @@ dartdevc:
434421
patches: "_internal/js_dev_runtime/patch/isolate_patch.dart"
435422
supported: false
436423

437-
mirrors:
438-
uri: "mirrors/mirrors.dart"
439-
patches: "_internal/js_dev_runtime/patch/mirrors_patch.dart"
440-
supported: false
441-
442424
math:
443425
uri: "math/math.dart"
444426
patches: "_internal/js_dev_runtime/patch/math_patch.dart"

sdk_nnbd/lib/libraries.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,6 @@
217217
"uri": "../../sdk/lib/math/math.dart",
218218
"patches": "../../sdk/lib/_internal/js_runtime/lib/math_patch.dart"
219219
},
220-
"mirrors": {
221-
"uri": "../../sdk/lib/mirrors/mirrors.dart",
222-
"patches": "../../sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart",
223-
"supported": false
224-
},
225220
"typed_data": {
226221
"uri": "typed_data/typed_data.dart",
227222
"patches": "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -327,11 +322,6 @@
327322
"uri": "../../sdk/lib/math/math.dart",
328323
"patches": "../../sdk/lib/_internal/js_runtime/lib/math_patch.dart"
329324
},
330-
"mirrors": {
331-
"uri": "../../sdk/lib/mirrors/mirrors.dart",
332-
"patches": "../../sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart",
333-
"supported": false
334-
},
335325
"typed_data": {
336326
"uri": "typed_data/typed_data.dart",
337327
"patches": "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -399,9 +389,6 @@
399389
"_js_helper": {
400390
"uri": "_internal/js_dev_runtime/private/js_helper.dart"
401391
},
402-
"_js_mirrors": {
403-
"uri": "_internal/js_dev_runtime/private/js_mirrors.dart"
404-
},
405392
"_js_primitives": {
406393
"uri": "_internal/js_dev_runtime/private/js_primitives.dart"
407394
},
@@ -441,11 +428,6 @@
441428
"patches": "_internal/js_dev_runtime/patch/isolate_patch.dart",
442429
"supported": false
443430
},
444-
"mirrors": {
445-
"uri": "mirrors/mirrors.dart",
446-
"patches": "_internal/js_dev_runtime/patch/mirrors_patch.dart",
447-
"supported": false
448-
},
449431
"math": {
450432
"uri": "math/math.dart",
451433
"patches": "_internal/js_dev_runtime/patch/math_patch.dart"

sdk_nnbd/lib/libraries.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,6 @@ dart2js:
214214
uri: "../../sdk/lib/math/math.dart"
215215
patches: "../../sdk/lib/_internal/js_runtime/lib/math_patch.dart"
216216

217-
mirrors:
218-
uri: "../../sdk/lib/mirrors/mirrors.dart"
219-
patches: "../../sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart"
220-
supported: false
221-
222217
typed_data:
223218
uri: "typed_data/typed_data.dart"
224219
patches: "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -322,11 +317,6 @@ dart2js_server:
322317
uri: "../../sdk/lib/math/math.dart"
323318
patches: "../../sdk/lib/_internal/js_runtime/lib/math_patch.dart"
324319

325-
mirrors:
326-
uri: "../../sdk/lib/mirrors/mirrors.dart"
327-
patches: "../../sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart"
328-
supported: false
329-
330320
typed_data:
331321
uri: "typed_data/typed_data.dart"
332322
patches: "_internal/js_runtime/lib/typed_data_patch.dart"
@@ -392,9 +382,6 @@ dartdevc:
392382
_js_helper:
393383
uri: "_internal/js_dev_runtime/private/js_helper.dart"
394384

395-
_js_mirrors:
396-
uri: "_internal/js_dev_runtime/private/js_mirrors.dart"
397-
398385
_js_primitives:
399386
uri: "_internal/js_dev_runtime/private/js_primitives.dart"
400387

@@ -434,11 +421,6 @@ dartdevc:
434421
patches: "_internal/js_dev_runtime/patch/isolate_patch.dart"
435422
supported: false
436423

437-
mirrors:
438-
uri: "mirrors/mirrors.dart"
439-
patches: "_internal/js_dev_runtime/patch/mirrors_patch.dart"
440-
supported: false
441-
442424
math:
443425
uri: "math/math.dart"
444426
patches: "_internal/js_dev_runtime/patch/math_patch.dart"

tests/co19_2/co19_2-dart2js.status

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
# for details. All rights reserved. Use of this source code is governed by a
33
# BSD-style license that can be found in the LICENSE file.
44

5+
[ $compiler == dart2js ]
6+
Language/Expressions/Null/instance_of_class_null_t01: Skip # dart:mirrors not supported https://github.com/dart-lang/co19/issues/522.
7+
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
8+
Language/Metadata/before*: Skip # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523.
9+
LayoutTests/*: Skip # These tests are going to be removed.
10+
LibTest/io/*: SkipByDesign # dart:io not supported.
11+
LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
12+
WebPlatformTest/*: Skip # These tests are going to be removed.
13+
514
[ $compiler == dart2js && $runtime == d8 ]
615
LayoutTests/*: SkipByDesign # d8 is not a browser
716
LibTest/html/*: SkipByDesign # d8 is not a browser
@@ -27,10 +36,3 @@ LibTest/collection/ListMixin/ListMixin_class_A01_t06: SkipSlow # slow babeljs tr
2736
LibTest/core/List/List_class_A01_t04: SkipSlow # slow babeljs transformation
2837
LibTest/core/List/List_class_A01_t05: SkipSlow # slow babeljs transformation
2938
LibTest/core/List/List_class_A01_t06: SkipSlow # slow babeljs transformation
30-
31-
[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ]
32-
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
33-
LayoutTests/*: Skip # These tests are going to be removed.
34-
LibTest/io/*: SkipByDesign # dart:io not supported.
35-
LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
36-
WebPlatformTest/*: Skip # These tests are going to be removed.

0 commit comments

Comments
 (0)