Skip to content

Commit 2d4ba07

Browse files
kevmoodart-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
[corelib] Mark dart:mirrors as @deprecated
Marks dart:mirrors with @deprecated on the library declaration, updates its maturity status in libraries.dart to Maturity.DEPRECATED, adds an entry to CHANGELOG.md, and ignores the deprecation in tests and tools that legitimately reference dart:mirrors. TEST=ci CoreLibraryReviewExempt: dart:mirrors is a VM-only library Change-Id: I96b0bd37b92d71d0fd5deb32a447eab98d5d5862 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/541360 Reviewed-by: Martin Kustermann <[email protected]> Auto-Submit: Kevin Moore <[email protected]> Reviewed-by: Leaf Petersen <[email protected]> Commit-Queue: Kevin Moore <[email protected]> Reviewed-by: Kevin Moore <[email protected]>
1 parent a141e71 commit 2d4ba07

6 files changed

Lines changed: 20 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
more efficient to convert between possibly-synchronous values at the Dart/JS
7474
boundary.
7575

76+
#### `dart:mirrors`
77+
78+
- The `dart:mirrors` library is now marked `@deprecated`, and will be removed
79+
in a future release. For details, see issue [#44489].
80+
81+
[#44489]: https://github.com/dart-lang/sdk/issues/44489
7682
[#61353]: https://github.com/dart-lang/sdk/issues/61353
7783
[#62699]: https://github.com/dart-lang/sdk/issues/62699
7884

‎pkg/vm/bin/compare_il.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// This is a helper script which performs IL matching for AOT IL tests.
66
// See runtime/docs/infra/il_tests.md for more information.
77

8+
// ignore_for_file: deprecated_member_use
9+
810
import 'dart:collection';
911
import 'dart:convert';
1012
import 'dart:io';

‎pkg/vm_service/test/mirror_references_lib.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:mirrors';
68

79
import 'common/test_helper.dart';

‎pkg/vm_service/test/weak_properties_lib.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:mirrors';
68

79
import 'common/test_helper.dart';

‎sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const Map<String, LibraryInfo> libraries = const {
159159
'mirrors': const LibraryInfo(
160160
'mirrors/mirrors.dart',
161161
categories: 'Client,Server',
162-
maturity: Maturity.UNSTABLE,
162+
maturity: Maturity.DEPRECATED,
163163
dart2jsPatchPath: '_internal/js_runtime/lib/mirrors_patch_cfe.dart',
164164
),
165165
'nativewrappers': const LibraryInfo(

‎sdk/lib/mirrors/mirrors.dart‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@
4545
/// across isolates, or a map with keys and values that are all serializable across
4646
/// isolates.
4747
///
48-
/// ## Status: Unstable
48+
/// ## Status: Deprecated
4949
///
50-
/// The dart:mirrors library is unstable and its API might change slightly as a
51-
/// result of user feedback. This library is only supported by the Dart VM and
52-
/// only available on some platforms.
50+
/// The `dart:mirrors` library is `@deprecated` and will be removed in a future
51+
/// release. For details, see https://github.com/dart-lang/sdk/issues/44489.
52+
///
53+
/// This library is only supported by the Dart VM and only available on some
54+
/// platforms.
5355
///
5456
/// {@category VM}
57+
@deprecated
5558
library dart.mirrors;
5659

5760
import "dart:core";

0 commit comments

Comments
 (0)