Add `@doNotSubmit` to `(test|group) solo:`... (#2206)

* Add @doNotSubmit to (test|group) solo:...

* ++ pubspec.

* Eagerly bump dep constraints

---------

Co-authored-by: Nate Bosch <nbosch@google.com>
diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml
index 6439481..3380005 100644
--- a/pkgs/test/pubspec.yaml
+++ b/pkgs/test/pubspec.yaml
@@ -34,7 +34,7 @@
   stream_channel: ^2.1.0
 
   # Use an exact version until the test_api and test_core package are stable.
-  test_api: 0.7.0
+  test_api: 0.7.1
   test_core: 0.6.1
 
   typed_data: ^1.3.0
diff --git a/pkgs/test_api/CHANGELOG.md b/pkgs/test_api/CHANGELOG.md
index 6d989aa..bad7fc7 100644
--- a/pkgs/test_api/CHANGELOG.md
+++ b/pkgs/test_api/CHANGELOG.md
@@ -1,38 +1,44 @@
+## 0.7.1-wip
+
+- Added [`@doNotSubmit`](https://pub.dev/documentation/meta/latest/meta/doNotSubmit-constant.html) to `test(solo: ...)` and `group(solo: ...)`. In
+  practice, this means that code that was relying on ignoring deprecation
+  warnings and using `solo` or `group` with a `skip` parameter will now fail if
+  `dart analyze --fatal-infos` (or similar) is enabled.
+
 ## 0.7.0
 
-* Deprecate `Runtime.internetExplorer`.
-* Added `dart2wasm` as a supported compiler for the `chrome` runtime.
-* **BREAKING**: Removed the `experimentalChromeWasm` runtime.
-* **BREAKING**: Removed `Runtime.isJS` and `Runtime.isWasm`, as this is now
+- Deprecate `Runtime.internetExplorer`.
+- Added `dart2wasm` as a supported compiler for the `chrome` runtime.
+- **BREAKING**: Removed the `experimentalChromeWasm` runtime.
+- **BREAKING**: Removed `Runtime.isJS` and `Runtime.isWasm`, as this is now
   based on the compiler and not the runtime.
 
 ## 0.6.1
 
-* Drop support for null unsafe Dart, bump SDK constraint to `3.0.0`.
-* Make some implementation classes `final`. These classes were never intended to
+- Drop support for null unsafe Dart, bump SDK constraint to `3.0.0`.
+- Make some implementation classes `final`. These classes were never intended to
   be extended or implemented. `Metadata`, `PlatformSelector`, `RemoteListener`,
   `Runtime`, `StackTraceFormatter`, `SuitePlatform`, `RemoteException`,
   `TestHandle`, `OutstandingWork`, `OutsideTestException`, `OnPlatform`,
   `Retry`, `Skip`, `Tags`, `TestOn`, `Timeout`.
-* Mark an implementation class `interface`: `StackTraceMapper`.
-* Change the `Compiler` class into an `enum`.
-* Make `Fake` a `mixin class`.
-* Allow the latest analyzer (6.x.x).
+- Mark an implementation class `interface`: `StackTraceMapper`.
+- Change the `Compiler` class into an `enum`.
+- Make `Fake` a `mixin class`.
+- Allow the latest analyzer (6.x.x).
 
 ## 0.6.0
 
-* Remove the `package:test_api/expect.dart' library. `test` will export from
-  `package:matcher` directly.
-* Fix compatibility with wasm number semantics.
+- Remove the `package:test_api/expect.dart' library. `test`will export from`package:matcher` directly.
+- Fix compatibility with wasm number semantics.
 
 ## 0.5.2
 
-* Remove deprecation for the `scaffolding.dart` and `backend.dart` libraries.
-* Export `registerException` from the `scaffolding.dart` library.
+- Remove deprecation for the `scaffolding.dart` and `backend.dart` libraries.
+- Export `registerException` from the `scaffolding.dart` library.
 
 ## 0.5.1
 
-* Handle a missing `'compiler'` value when running a test compiled against a
+- Handle a missing `'compiler'` value when running a test compiled against a
   newer `test_api` than the runner back end is using. The expectation was that
   the json protocol is only used across packages compatible with the same major
   version of the `test_api` package, but `flutter test` does not check the
@@ -40,282 +46,280 @@
 
 ## 0.5.0
 
-* Add `Compiler` class, exposed through `backend.dart`.
-* Support compiler identifiers in platform selectors.
-* Add `compiler` field to `SuitePlatform`. This will become required in the next
+- Add `Compiler` class, exposed through `backend.dart`.
+- Support compiler identifiers in platform selectors.
+- Add `compiler` field to `SuitePlatform`. This will become required in the next
   major release.
-* **BREAKING** Add required `defaultCompiler` and `supportedCompilers` fields
+- **BREAKING** Add required `defaultCompiler` and `supportedCompilers` fields
   to `Runtime`.
-* Add `package:test_api/hooks_testing.dart` library for writing tests against
+- Add `package:test_api/hooks_testing.dart` library for writing tests against
   code that uses `package:test_api/hooks.dart`.
-* **BREAKING** Remove `ErrorFormatter`, `expectAsync`,  `throws`, and `Throws`
+- **BREAKING** Remove `ErrorFormatter`, `expectAsync`, `throws`, and `Throws`
   from `package:test_api/test_api.dart`.
 
 ## 0.4.18
 
-* Don't run `tearDown` until the test body and outstanding work is complete,
+- Don't run `tearDown` until the test body and outstanding work is complete,
   even if the test has already failed.
 
 ## 0.4.17
 
-* Deprecate `throwsNullThrownError`, use `throwsA(isA<TypeError>())` instead.
+- Deprecate `throwsNullThrownError`, use `throwsA(isA<TypeError>())` instead.
   The implementation has been changed to ease migrations.
-* Deprecate `throwsCyclicInitializationError` and replace the implementation
+- Deprecate `throwsCyclicInitializationError` and replace the implementation
   with `Throws(TypeMatcher<Error>())`. The specific exception no longer exists
   and there is no guarantee about what type of error will be thrown.
 
 ## 0.4.16
 
-* Add the `experimental-chrome-wasm` runtime. This is very unstable and will
+- Add the `experimental-chrome-wasm` runtime. This is very unstable and will
   eventually be deleted, to be replaced by a `--compiler` flag. See
   https://github.com/dart-lang/test/issues/1776 for more information on future
   plans
-* Add `isWasm` field to `Runtime` (defaults to `false`).
+- Add `isWasm` field to `Runtime` (defaults to `false`).
 
 ## 0.4.15
 
-* Expand the pubspec description.
-* Support `package:matcher` version `0.12.13`.
+- Expand the pubspec description.
+- Support `package:matcher` version `0.12.13`.
 
 ## 0.4.14
 
-* Require Dart >= 2.18.0
-* Support the latest `package:analyzer`.
+- Require Dart >= 2.18.0
+- Support the latest `package:analyzer`.
 
 ## 0.4.13
 
-* Fix `printOnFailure` output to be associated with the correct test.
+- Fix `printOnFailure` output to be associated with the correct test.
 
 ## 0.4.12
 
-* Internal cleanup.
+- Internal cleanup.
 
 ## 0.4.11
 
-* Support the latest version of `package:matcher`.
+- Support the latest version of `package:matcher`.
 
 ## 0.4.10
 
-* Add `Target` to restrict `TestOn` annotation to library level.
+- Add `Target` to restrict `TestOn` annotation to library level.
 
 ## 0.4.9
 
-* Add `ignoreTimeouts` option to `Suite`, which disables all timeouts for all
+- Add `ignoreTimeouts` option to `Suite`, which disables all timeouts for all
   tests in that suite.
 
 ## 0.4.8
 
-* `TestFailure` implements `Exception` for compatibility with
+- `TestFailure` implements `Exception` for compatibility with
   `only_throw_exceptions`.
 
 ## 0.4.7
 
-* Remove logging about enabling the chain-stack-traces flag from the invoker.
+- Remove logging about enabling the chain-stack-traces flag from the invoker.
 
 ## 0.4.6
 
-* Give a better exception when using `markTestSkipped` outside of a test.
-* Format stack traces if a formatter is available when serializing tests
+- Give a better exception when using `markTestSkipped` outside of a test.
+- Format stack traces if a formatter is available when serializing tests
   and groups from the remote listener.
 
 ## 0.4.5
 
-* Add defaulting for older test backends that don't pass a configuration for
+- Add defaulting for older test backends that don't pass a configuration for
   the `allow_duplicate_test_names` parameter to the remote listener.
 
 ## 0.4.4
 
-* Allow disabling duplicate test or group names in the `Declarer`.
+- Allow disabling duplicate test or group names in the `Declarer`.
 
 ## 0.4.3
 
-* Use the latest `package:matcher`.
+- Use the latest `package:matcher`.
 
 ## 0.4.2
 
-* Update `analyzer` constraint to `>=1.5.0 <3.0.0`.
+- Update `analyzer` constraint to `>=1.5.0 <3.0.0`.
 
 ## 0.4.1
 
-* Give a better error when `printOnFailure` is called from outside a test
+- Give a better error when `printOnFailure` is called from outside a test
   zone.
 
 ## 0.4.0
 
-* Add libraries `scaffolding.dart`, and `expect.dart` to allow importing as
+- Add libraries `scaffolding.dart`, and `expect.dart` to allow importing as
   subset of the normal surface area.
-* Add new APIs in `hooks.dart` to allow writing custom expectation frameworks
+- Add new APIs in `hooks.dart` to allow writing custom expectation frameworks
   which integrate with the test runner.
-* Add examples to `throwsA` and make top-level `throws...` matchers refer to it.
-* Disable stack trace chaining by default.
-* Fix `expectAsync` function type checks.
-* Add `RemoteException`, `RemoteListener`, `StackTraceFormatter`, and
+- Add examples to `throwsA` and make top-level `throws...` matchers refer to it.
+- Disable stack trace chaining by default.
+- Fix `expectAsync` function type checks.
+- Add `RemoteException`, `RemoteListener`, `StackTraceFormatter`, and
   `StackTraceMapper` to `backend.dart`.
-* **Breaking** remove `Runtime.phantomJS`
-* **Breaking** Add callback to get the suite channel in the `beforeLoad`
+- **Breaking** remove `Runtime.phantomJS`
+- **Breaking** Add callback to get the suite channel in the `beforeLoad`
   callback of `RemoteListener.start`. This is now used in place of using zones
   to communicate the value.
 
 ## 0.3.0
 
-* **Breaking** `TestException.message` is now nullable.
-  * Fixes handling of `null` messages in remote exceptions.
+- **Breaking** `TestException.message` is now nullable.
+  - Fixes handling of `null` messages in remote exceptions.
 
 ## 0.2.20
 
-* Fix some strong null safety mode errors in the original migration.
+- Fix some strong null safety mode errors in the original migration.
 
 ## 0.2.19
 
-* Stable release for null safety.
+- Stable release for null safety.
 
 ## 0.2.19-nullsafety.7
 
-* Expand upper bound constraints for some null safe migrated packages.
+- Expand upper bound constraints for some null safe migrated packages.
 
 ## 0.2.19-nullsafety.6
 
-* Fix `spawnHybridUri` to respect language versioning of the spawned uri.
+- Fix `spawnHybridUri` to respect language versioning of the spawned uri.
 
 ## 0.2.19-nullsafety.5
 
-* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
+- Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
   guidelines.
 
 ## 0.2.19-nullsafety.4
 
-* Allow prerelease versions of the 2.12 sdk.
+- Allow prerelease versions of the 2.12 sdk.
 
 ## 0.2.19-nullsafety.3
 
-* Add capability to filter to a single exact test name in `Declarer`.
-* Add `markTestSkipped` API.
+- Add capability to filter to a single exact test name in `Declarer`.
+- Add `markTestSkipped` API.
 
 ## 0.2.19-nullsafety.2
 
-* Allow `2.10` stable and `2.11.0-dev` SDKs.
-* Annotate the classes used as annotations to restrict their usage to library
+- Allow `2.10` stable and `2.11.0-dev` SDKs.
+- Annotate the classes used as annotations to restrict their usage to library
   level.
 
 ## 0.2.19-nullsafety
 
-* Migrate to NNBD.
-  * The vast majority of changes are intended to express the pre-existing
+- Migrate to NNBD.
+  - The vast majority of changes are intended to express the pre-existing
     behavior of the code regarding to handling of nulls.
-  * **Breaking Change**: `GroupEntry.name` is no longer nullable, the root
+  - **Breaking Change**: `GroupEntry.name` is no longer nullable, the root
     group now has the empty string as its name.
-* Add the `Fake` class, available through `package:test_api/fake.dart`.  This
+- Add the `Fake` class, available through `package:test_api/fake.dart`. This
   was previously part of the Mockito package, but with null safety it is useful
-  enough that we decided to make it available through `package:test`.  In a
+  enough that we decided to make it available through `package:test`. In a
   future release it will be made available directly through
   `package:test_api/test_api.dart` (and hence through
   `package:test_core/test_core.dart` and `package:test/test.dart`).
 
 ## 0.2.18+1 (Backport)
 
-* Fix `spawnHybridUri` to respect language versioning of the spawned uri.
+- Fix `spawnHybridUri` to respect language versioning of the spawned uri.
 
 ## 0.2.18
 
-* Update to `matcher` version `0.12.9`.
+- Update to `matcher` version `0.12.9`.
 
 ## 0.2.17
 
-* Add `languageVersionComment` on the `MetaData` class. This should only be
+- Add `languageVersionComment` on the `MetaData` class. This should only be
   present for test suites.
 
 ## 0.2.16
 
-* Deprecate `LiveTestController.liveTest`, the `LiveTestController` instance now
+- Deprecate `LiveTestController.liveTest`, the `LiveTestController` instance now
   implements `LiveTest` and can be used directly.
 
 ## 0.2.15
 
-* Cancel any StreamQueue that is created as a part of a stream matcher once it
+- Cancel any StreamQueue that is created as a part of a stream matcher once it
   is done matching.
-  * This fixes a bug where using a matcher on a custom stream controller and
+  - This fixes a bug where using a matcher on a custom stream controller and
     then awaiting the `close()` method on that controller would hang.
-* Avoid causing the test runner to hang if there is a timeout during a
+- Avoid causing the test runner to hang if there is a timeout during a
   `tearDown` callback following a failing test case.
 
 ## 0.2.14
 
-* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
+- Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
 
 ## 0.2.13
 
-* Work around a bug in the `2.3.0` SDK by avoiding for-loop elements at the top
+- Work around a bug in the `2.3.0` SDK by avoiding for-loop elements at the top
   level.
 
 ## 0.2.12
 
-* Link to docs on setting timeout when a test times out with the default
+- Link to docs on setting timeout when a test times out with the default
   duration.
-* No longer directly depend on `package:pedantic`.
+- No longer directly depend on `package:pedantic`.
 
 ## 0.2.11
 
-* Extend the timeout for synthetic tests, e.g. `tearDownAll`.
+- Extend the timeout for synthetic tests, e.g. `tearDownAll`.
 
 ## 0.2.10
 
-* Update to latest `package:matcher`. Improves output for instances of private
+- Update to latest `package:matcher`. Improves output for instances of private
   classes.
 
 ## 0.2.9
 
-* Treat non-solo tests as skipped so they are properly reported.
+- Treat non-solo tests as skipped so they are properly reported.
 
 ## 0.2.8
 
-* Remove logic which accounted for a race condition in state change. The logic
+- Remove logic which accounted for a race condition in state change. The logic
   was required because `package:sse` used to not guarantee order. This is no
   longer the case.
 
 ## 0.2.7
 
-* Prepare for upcoming `Stream<List<int>>` changes in the Dart SDK.
-* Mark `package:test_api` as deprecated to prevent accidental use.
+- Prepare for upcoming `Stream<List<int>>` changes in the Dart SDK.
+- Mark `package:test_api` as deprecated to prevent accidental use.
 
 ## 0.2.6
 
-* Don't swallow exceptions from callbacks in `expectAsync*`.
-* Internal cleanup - fix lints.
-* Fixed a race condition that caused tests to occasionally fail during
+- Don't swallow exceptions from callbacks in `expectAsync*`.
+- Internal cleanup - fix lints.
+- Fixed a race condition that caused tests to occasionally fail during
   `tearDownAll` with the message `(tearDownAll) - did not complete [E]`.
 
 ## 0.2.5
 
-* Expose the  `Metadata`, `PlatformSelector`, `Runtime`, and `SuitePlatform`
+- Expose the `Metadata`, `PlatformSelector`, `Runtime`, and `SuitePlatform`
   classes publicly through a new `backend.dart` import.
 
 ## 0.2.4
 
-* Allow `stream_channel` version `2.0.0`.
+- Allow `stream_channel` version `2.0.0`.
 
 ## 0.2.3
 
-* Update to matcher version `0.12.5`.
+- Update to matcher version `0.12.5`.
 
 ## 0.2.2
 
-* Require Dart SDK `>=2.1.0`.
+- Require Dart SDK `>=2.1.0`.
 
 ## 0.2.1
 
-* Add `remote_listener.dart` and `suite_channel_manager.dart`.
+- Add `remote_listener.dart` and `suite_channel_manager.dart`.
 
 ## 0.2.0
 
-* Remove "runner" extensions.
-
+- Remove "runner" extensions.
 
 ## 0.1.1
 
-* Update `stack_trace_formatter` to fold `test_api` frames by default.
-
+- Update `stack_trace_formatter` to fold `test_api` frames by default.
 
 ## 0.1.0
 
-* Initial release of `test_api`. Provides the basic API for writing tests and
+- Initial release of `test_api`. Provides the basic API for writing tests and
   touch points for implementing a custom test runner.
diff --git a/pkgs/test_api/lib/src/scaffolding/test_structure.dart b/pkgs/test_api/lib/src/scaffolding/test_structure.dart
index 97c6d79..642e013 100644
--- a/pkgs/test_api/lib/src/scaffolding/test_structure.dart
+++ b/pkgs/test_api/lib/src/scaffolding/test_structure.dart
@@ -77,7 +77,8 @@
     Object? tags,
     Map<String, dynamic>? onPlatform,
     int? retry,
-    @Deprecated('Debug only') bool solo = false}) {
+    // TODO(https://github.com/dart-lang/test/issues/2205): Remove deprecated.
+    @Deprecated('Debug only') @doNotSubmit bool solo = false}) {
   _declarer.test(description.toString(), body,
       testOn: testOn,
       timeout: timeout,
@@ -155,7 +156,8 @@
     Object? tags,
     Map<String, dynamic>? onPlatform,
     int? retry,
-    @Deprecated('Debug only') bool solo = false}) {
+    // TODO(https://github.com/dart-lang/test/issues/2205): Remove deprecated.
+    @Deprecated('Debug only') @doNotSubmit bool solo = false}) {
   _declarer.group(description.toString(), body,
       testOn: testOn,
       timeout: timeout,
diff --git a/pkgs/test_api/pubspec.yaml b/pkgs/test_api/pubspec.yaml
index 91eb7e9..d1df17a 100644
--- a/pkgs/test_api/pubspec.yaml
+++ b/pkgs/test_api/pubspec.yaml
@@ -1,5 +1,5 @@
 name: test_api
-version: 0.7.0
+version: 0.7.1-wip
 description: >-
   The user facing API for structuring Dart tests and checking expectations.
 repository: https://github.com/dart-lang/test/tree/master/pkgs/test_api
@@ -11,7 +11,7 @@
   async: ^2.5.0
   boolean_selector: ^2.1.0
   collection: ^1.15.0
-  meta: ^1.3.0
+  meta: ^1.14.0
   source_span: ^1.8.0
   stack_trace: ^1.10.0
   stream_channel: ^2.1.0
diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml
index 26df30e..269a162 100644
--- a/pkgs/test_core/pubspec.yaml
+++ b/pkgs/test_core/pubspec.yaml
@@ -26,7 +26,7 @@
   stack_trace: ^1.10.0
   stream_channel: ^2.1.0
   # Use an exact version until the test_api package is stable.
-  test_api: 0.7.0
+  test_api: 0.7.1
   vm_service: ">=6.0.0 <15.0.0"
   yaml: ^3.0.0