Add `@Since` annotations to some recent and future features.
Addresses some parts of #37127
Bug: http://dartbug.com/37127
Change-Id: Ia3a98e5764a16529331b2ba5613096d27061cab0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104763
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Todd Volkert <tvolkert@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
diff --git a/sdk/lib/_http/http.dart b/sdk/lib/_http/http.dart
index 4e7d636..1e2560f 100644
--- a/sdk/lib/_http/http.dart
+++ b/sdk/lib/_http/http.dart
@@ -1963,7 +1963,7 @@
/// This specifies whether the response bytes were compressed when they were
/// received across the wire and whether callers will receive compressed
/// or uncompressed bytes when they listed to this response's byte stream.
- @Since("2.3.2")
+ @Since("2.4")
HttpClientResponseCompressionState get compressionState;
/**
@@ -2055,7 +2055,7 @@
/// * Does the caller need to manually decompress the response's byte stream?
///
/// This enum is accessed via the [HttpClientResponse.compressionState] value.
-@Since("2.3.2")
+@Since("2.4")
enum HttpClientResponseCompressionState {
/// The body of the HTTP response was received and remains in an uncompressed
/// state.
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index b604413..748933d 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -68,8 +68,8 @@
external factory RegExp(String source,
{bool multiLine = false,
bool caseSensitive = true,
- bool unicode = false,
- bool dotAll = false});
+ @Since("2.4") bool unicode = false,
+ @Since("2.4") bool dotAll = false});
/**
* Returns a regular expression that matches [text].
@@ -142,6 +142,7 @@
* some pattern features, like Unicode property escapes, are only available in
* this mode.
*/
+ @Since("2.4")
bool get isUnicode;
/**
@@ -155,6 +156,7 @@
* of different pattern characters, and so they can be used together or
* separately.
*/
+ @Since("2.4")
bool get isDotAll;
}
@@ -165,6 +167,7 @@
* to retrieve the names for any named capture groups and to retrieve
* matches for named capture groups by name instead of their index.
*/
+@Since("2.3")
abstract class RegExpMatch implements Match {
/**
* The string matched by the group named [name].
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index ec03664..fdf6bbd 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -413,6 +413,7 @@
/// It allows for fine grained control of the socket options, and its values will
/// be passed to the underlying platform's implementation of setsockopt and
/// getsockopt.
+@Since("2.2")
class RawSocketOption {
/// Creates a RawSocketOption for getRawOption andSetRawOption.
///
@@ -690,6 +691,7 @@
*
* Throws an [OSError] on failure.
*/
+ @Since("2.2")
Uint8List getRawOption(RawSocketOption option);
/**
@@ -698,6 +700,7 @@
*
* Throws an [OSError] on failure.
*/
+ @Since("2.2")
void setRawOption(RawSocketOption option);
}
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 5c5883d..0aa74c9 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -17,6 +17,7 @@
library dart.isolate;
import "dart:async";
+import "dart:_internal" show Since;
part "capability.dart";
@@ -123,6 +124,7 @@
* `Dart_DebugName` in the C embedding API and the `debugName` property in
* [IsolateMirror].
*/
+ @Since("2.3")
external String get debugName;
/**
@@ -249,7 +251,7 @@
bool errorsAreFatal,
SendPort onExit,
SendPort onError,
- String debugName});
+ @Since("2.3") String debugName});
/**
* Creates and spawns an isolate that runs the code from the library with
@@ -337,7 +339,8 @@
Uri packageRoot,
Uri packageConfig,
bool automaticPackageResolution: false,
- String debugName});
+ @Since("2.3")
+ String debugName});
/**
* Requests the isolate to pause.