Skip to content

Commit d6b40b0

Browse files
committed
[3.0 alpha] Remove deprecated dart:async APIs
Contributes to #49529 Change-Id: Ib70efd0f388f50686e1745ca5237d06a4538a870 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268460 Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
1 parent e2eb4cf commit d6b40b0

File tree

6 files changed

+10
-57
lines changed

6 files changed

+10
-57
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
removed. See [#49536](https://github.com/dart-lang/sdk/issues/49536) for
1010
details.
1111

12+
#### `dart:async`
13+
14+
- **Breaking change** [#49529][]:
15+
- Removed the deprecated [`DeferredLibrary`][] class.
16+
Use the [`deferred as`][] import syntax instead.
17+
18+
[#49529]: https://github.com/dart-lang/sdk/issues/49529
19+
[`DeferredLibrary`]: https://api.dart.dev/stable/2.18.4/dart-async/DeferredLibrary-class.html
20+
[`deferred as`]: https://dart.dev/guides/language/language-tour#deferred-loading
21+
1222
## 2.19.0
1323

1424
### Language

sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart

-9
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,6 @@ class _AsyncRun {
168168
}
169169
}
170170

171-
@patch
172-
class DeferredLibrary {
173-
@patch
174-
Future<Null> load() {
175-
throw 'DeferredLibrary not supported. '
176-
'please use the `import "lib.dart" deferred as lib` syntax.';
177-
}
178-
}
179-
180171
@patch
181172
class Timer {
182173
@patch

sdk/lib/_internal/js_runtime/lib/async_patch.dart

-9
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ class _AsyncRun {
9191
}
9292
}
9393

94-
@patch
95-
class DeferredLibrary {
96-
@patch
97-
Future<Null> load() {
98-
throw 'DeferredLibrary not supported. '
99-
'please use the `import "lib.dart" deferred as lib` syntax.';
100-
}
101-
}
102-
10394
@patch
10495
class Timer {
10596
@patch

sdk/lib/_internal/vm/lib/async_patch.dart

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import "dart:_internal" show VMLibraryHooks, patch, unsafeCast;
1111

1212
/// These are the additional parts of this patch library:
13-
part "deferred_load_patch.dart";
1413
part "schedule_microtask_patch.dart";
1514
part "timer_patch.dart";
1615

sdk/lib/_internal/vm/lib/deferred_load_patch.dart

-19
This file was deleted.

sdk/lib/async/deferred_load.dart

-19
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,6 @@
44

55
part of dart.async;
66

7-
/// Indicates that loading of [libraryName] is deferred.
8-
///
9-
/// This class is obsolete. Instead prefer the `deferred as` import directive
10-
/// syntax.
11-
/// ```
12-
@Deprecated("Dart sdk v. 1.8")
13-
class DeferredLibrary {
14-
final String libraryName;
15-
final String? uri;
16-
17-
const DeferredLibrary(this.libraryName, {this.uri});
18-
19-
/// Ensure that [libraryName] has been loaded.
20-
///
21-
/// If the library fails to load, the [Future] will complete with a
22-
/// [DeferredLoadException].
23-
external Future<Null> load();
24-
}
25-
267
/// Thrown when a deferred library fails to load.
278
class DeferredLoadException implements Exception {
289
DeferredLoadException(String message) : _s = message;

0 commit comments

Comments
 (0)