Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 06cb010

Browse files
sstricklcommit-bot@chromium.org
authored andcommitted
Revert "Add unawaited to package:meta"
This reverts commit 0d44449. Reason for revert: Breaks Flutter HHH and the Dart->Flutter roll. Original change's description: > Add unawaited to package:meta > > Change-Id: I09df4989591327bd4d148e73a5887b900902576c > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152680 > Commit-Queue: Brian Wilkerson <[email protected]> > Reviewed-by: Jake Macdonald <[email protected]> [email protected],[email protected] Change-Id: I71f491bccc37508a24b7f6f9d051ed914bafeccd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153351 Reviewed-by: Tess Strickland <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent 6de0f53 commit 06cb010

File tree

4 files changed

+10
-42
lines changed

4 files changed

+10
-42
lines changed

DEPS

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ vars = {
123123
"oauth2_tag": "1.6.0",
124124
"package_config_rev": "9c586d04bd26fef01215fd10e7ab96a3050cfa64",
125125
"path_rev": "4f3bb71843fe5493ba490828a1721821d7b33746",
126-
"pedantic_tag": "v1.9.1",
126+
"pedantic_tag": "v1.9.0",
127127
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
128128
"pool_rev": "86fbb2cde9bbc66c8d159909d2f65a5981ea5b50",
129129
"protobuf_rev": "3746c8fd3f2b0147623a8e3db89c3ff4330de760",

pkg/meta/CHANGELOG.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
## 1.3.0-nnbd
1+
## 1.2.0-nnbd
22

33
* Opt into null safety.
4-
5-
## 1.2.1
6-
7-
* Fixed a bug by adding an import of dart:async so that the code really is
8-
compatible with the lower bound of the SDK constraints.
9-
10-
## 1.2.0
11-
124
* Introduce `@doNotStore` to annotate methods, getters and functions to
135
indicate that values obtained by invoking them should not be stored in a
146
field or top-level variable.
15-
* Introduce `unawaited` to mark invocations that return a `Future` where it's
16-
intentional that the future is not being awaited. (Moved from
17-
`package:pedantic`.)
187

198
## 1.1.8
209

pkg/meta/lib/meta.dart

+3-24
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
1+
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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-
/// Constants and functions that developers can use to express the intentions
6-
/// that otherwise can't be deduced by statically analyzing the source code.
5+
/// Constants for use in metadata annotations.
76
///
87
/// See also `@deprecated` and `@override` in the `dart:core` library.
98
///
@@ -13,7 +12,7 @@
1312
/// function's name differently.
1413
///
1514
/// For information on installing and importing this library, see the [meta
16-
/// package on pub.dev](https://pub.dev/packages/meta). For examples of using
15+
/// package on pub.dev](https://pub.dev/packages/meta). For examples of using
1716
/// annotations, see
1817
/// [Metadata](https://dart.dev/guides/language/language-tour#metadata) in the
1918
/// language tour.
@@ -267,26 +266,6 @@ const _VisibleForOverriding visibleForOverriding = _VisibleForOverriding();
267266
/// library which is in the `test` folder of the defining package.
268267
const _VisibleForTesting visibleForTesting = _VisibleForTesting();
269268

270-
/// Indicates to tools that [future] is intentionally not `await`-ed.
271-
///
272-
/// In an `async` context, it is normally expected that all [Future]s are
273-
/// awaited, and that is the basis of the lint `unawaited_futures`. However,
274-
/// there are times where one or more futures are intentionally not awaited.
275-
/// This function may be used to ignore a particular future. It silences the
276-
/// `unawaited_futures` lint.
277-
///
278-
/// ```
279-
/// Future<void> saveUserPreferences() async {
280-
/// await _writePreferences();
281-
///
282-
/// // While 'log' returns a Future, the consumer of 'saveUserPreferences'
283-
/// // is unlikely to want to wait for that future to complete; they only
284-
/// // care about the preferences being written).
285-
/// unawaited(log('Preferences saved!'));
286-
/// }
287-
/// ```
288-
void unawaited(Future<void>? future) {}
289-
290269
/// Used to annotate a class.
291270
///
292271
/// See [immutable] for more details.

pkg/meta/pubspec.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: meta
2-
version: 1.3.0-nnbd
2+
version: 1.2.0-nnbd
3+
author: Dart Team <[email protected]>
34
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/meta
45
description: >
5-
This library contains the declarations of constants and functions that
6-
developers can use to express the intentions that otherwise can't be deduced by
7-
statically analyzing the source code. These declarations are intended to be
8-
used by tools to provide a better user experience.
6+
This library contains the definitions of annotations that provide additional
7+
semantic information about the program being annotated. These annotations are
8+
intended to be used by tools to provide a better user experience.
99
environment:
1010
# This must remain a tight constraint (only allow dev versions) until nnbd is
1111
# stable.

0 commit comments

Comments
 (0)