Skip to content

Commit 3702cbe

Browse files
nateboschCommit Queue
authored andcommitted
Remove since annotations for 2.12 and earlier
The earliest supported language version in current SDK releases is 2.12. Information about the first version supporting an API is not useful for that or any earlier language versions. Remove the annotations to reduce noise in API docs. [email protected] Change-Id: Ide0b2a7f02bba6f9c261a01c7b9d4a48f5c71c2b CoreLibraryReviewExempt: No behavior changes. Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405821 Auto-Submit: Nate Bosch <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]> Reviewed-by: Brian Quinlan <[email protected]>
1 parent c0819ff commit 3702cbe

26 files changed

+14
-105
lines changed

pkg/front_end/testcases/general/error_export_from_dill/main.dart.strong.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ additionalExports = (core::Deprecated,
160160
core::deprecated,
161161
core::override,
162162
asy::Future,
163-
asy::Stream,
164163
asy::FutureExtensions,
164+
asy::Stream,
165165
asy::FutureIterable,
166166
asy::FutureRecord2,
167167
asy::FutureRecord3,

pkg/front_end/testcases/general/error_export_from_dill/main.dart.strong.outline.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ additionalExports = (core::Deprecated,
9595
core::deprecated,
9696
core::override,
9797
asy::Future,
98-
asy::Stream,
9998
asy::FutureExtensions,
99+
asy::Stream,
100100
asy::FutureIterable,
101101
asy::FutureRecord2,
102102
asy::FutureRecord3,

pkg/front_end/testcases/general/error_export_from_dill/main.dart.strong.transformed.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ additionalExports = (core::Deprecated,
156156
core::deprecated,
157157
core::override,
158158
asy::Future,
159-
asy::Stream,
160159
asy::FutureExtensions,
160+
asy::Stream,
161161
asy::FutureIterable,
162162
asy::FutureRecord2,
163163
asy::FutureRecord3,

sdk/lib/_http/http.dart

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -532,21 +532,13 @@ abstract interface class HttpHeaders {
532532
///
533533
/// The current case of the a header name is that of the name used by
534534
/// the last [set] or [add] call for that header.
535-
void add(
536-
String name,
537-
Object value, {
538-
@Since("2.8") bool preserveHeaderCase = false,
539-
});
535+
void add(String name, Object value, {bool preserveHeaderCase = false});
540536

541537
/// Sets the header [name] to [value].
542538
///
543539
/// Removes all existing values for the header named [name] and
544540
/// then [add]s [value] to it.
545-
void set(
546-
String name,
547-
Object value, {
548-
@Since("2.8") bool preserveHeaderCase = false,
549-
});
541+
void set(String name, Object value, {bool preserveHeaderCase = false});
550542

551543
/// Removes a specific value for a header name.
552544
///
@@ -1897,7 +1889,6 @@ abstract interface class HttpClientRequest implements IOSink {
18971889
/// // If abort() called before response is available, onError will fire.
18981890
/// });
18991891
/// ```
1900-
@Since("2.10")
19011892
void abort([Object? exception, StackTrace? stackTrace]);
19021893
}
19031894

@@ -1946,7 +1937,6 @@ abstract interface class HttpClientResponse implements Stream<List<int>> {
19461937
/// This specifies whether the response bytes were compressed when they were
19471938
/// received across the wire and whether callers will receive compressed
19481939
/// or uncompressed bytes when they listed to this response's byte stream.
1949-
@Since("2.4")
19501940
HttpClientResponseCompressionState get compressionState;
19511941

19521942
/// Gets the persistent connection state returned by the server.
@@ -2023,7 +2013,6 @@ abstract interface class HttpClientResponse implements Stream<List<int>> {
20232013
/// * Does the caller need to manually decompress the response's byte stream?
20242014
///
20252015
/// This enum is accessed via the [HttpClientResponse.compressionState] value.
2026-
@Since("2.4")
20272016
enum HttpClientResponseCompressionState {
20282017
/// The body of the HTTP response was received and remains in an uncompressed
20292018
/// state.

sdk/lib/async/future.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ void unawaited(Future<void>? future) {}
10051005
///
10061006
/// Adds functionality to futures which makes it easier to
10071007
/// write well-typed asynchronous code.
1008-
@Since("2.12")
10091008
extension FutureExtensions<T> on Future<T> {
10101009
/// Handles errors on this future.
10111010
///

sdk/lib/async/stream.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ abstract mixin class Stream<T> {
181181
///
182182
/// The returned stream is effectively equivalent to one created by
183183
/// `(() async* { yield value; } ())` or `Future<T>.value(value).asStream()`.
184-
@Since("2.5")
185184
factory Stream.value(T value) =>
186185
(_AsyncStreamController<T>(null, null, null, null)
187186
.._add(value)
@@ -210,7 +209,6 @@ abstract mixin class Stream<T> {
210209
/// `Future<T>.error(error, stackTrace).asStream()`, by or
211210
/// `(() async* { throw error; } ())`, except that you can control the
212211
/// stack trace as well.
213-
@Since("2.5")
214212
factory Stream.error(Object error, [StackTrace? stackTrace]) {
215213
AsyncError(:error, :stackTrace) = _interceptUserError(error, stackTrace);
216214
return (_AsyncStreamController<T>(null, null, null, null)
@@ -472,7 +470,6 @@ abstract mixin class Stream<T> {
472470
/// }
473471
/// }
474472
/// ```
475-
@Since("2.9")
476473
factory Stream.multi(
477474
void Function(MultiStreamController<T>) onListen, {
478475
bool isBroadcast = false,
@@ -2615,7 +2612,6 @@ abstract interface class StreamTransformer<S, T> {
26152612
/// final splitDecoded = StreamTransformer<List<int>, String>.fromBind(
26162613
/// (stream) => stream.transform(utf8.decoder).transform(LineSplitter()));
26172614
/// ```
2618-
@Since("2.1")
26192615
factory StreamTransformer.fromBind(Stream<T> Function(Stream<S>) bind) =
26202616
_StreamBindTransformer<S, T>;
26212617

@@ -2779,7 +2775,6 @@ class _ControllerEventSinkWrapper<T> implements EventSink<T> {
27792775
/// That usually means only delivering events synchronously in response to other
27802776
/// asynchronous events, because that is a time when an asynchronous event could
27812777
/// happen.
2782-
@Since("2.9")
27832778
abstract interface class MultiStreamController<T>
27842779
implements StreamController<T> {
27852780
/// Adds and delivers an event.

sdk/lib/async/zone.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,6 @@ R runZoned<R>(
19831983
/// Multiple attempts to use the future in a zone where the error is
19841984
/// inaccessible will cause the error to be reported *again* in it's original
19851985
/// error zone.
1986-
@Since("2.8")
19871986
R? runZonedGuarded<R>(
19881987
R body(),
19891988
void onError(Object error, StackTrace stack), {

sdk/lib/collection/hash_map.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ abstract final class HashMap<K, V> implements Map<K, V> {
283283
/// final map = HashMap.fromEntries(numbers.map((i) => MapEntry(i, i * i)));
284284
/// print(map); // {11: 121, 12: 144, 13: 169, 14: 196}
285285
/// ```
286-
@Since("2.1")
287286
factory HashMap.fromEntries(Iterable<MapEntry<K, V>> entries) =>
288287
HashMap<K, V>()..addEntries(entries);
289288
}

sdk/lib/collection/linked_hash_map.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ abstract final class LinkedHashMap<K, V> implements Map<K, V> {
269269
/// final map = LinkedHashMap.fromEntries(numbers.map((i) => MapEntry(i, i * i)));
270270
/// print(map); // {11: 121, 12: 144, 13: 169, 14: 196}
271271
/// ```
272-
@Since("2.1")
273272
factory LinkedHashMap.fromEntries(Iterable<MapEntry<K, V>> entries) =>
274273
LinkedHashMap<K, V>()..addEntries(entries);
275274
}

sdk/lib/collection/set.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ class _UnmodifiableSet<E> extends _SetBase<E> with _UnmodifiableSetMixin<E> {
425425
///
426426
/// unmodifiableSetView.remove('Earth'); // Throws.
427427
/// ```
428-
@Since("2.12")
429428
class UnmodifiableSetView<E> extends SetBase<E> with _UnmodifiableSetMixin<E> {
430429
final Set<E> _source;
431430

0 commit comments

Comments
 (0)