Remove support for `dart __deprecated_pub`
This is no longer used after https://github.com/flutter/flutter/pull/121605
Change-Id: Ifc33004dd3a87612bf7b92a50587d68a37d629d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286927
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart
index 1d7aff4..8e32b20 100644
--- a/pkg/dartdev/lib/dartdev.dart
+++ b/pkg/dartdev/lib/dartdev.dart
@@ -40,29 +40,21 @@
int? exitCode = 1;
try {
VmInteropHandler.initialize(port);
-
- // TODO(sigurdm): Remove when top-level pub is removed.
- if (args[0] == '__deprecated_pub') {
- // This is the entry-point supporting the top-level `pub` script.
- // ignore: deprecated_member_use
- exitCode = await deprecatedpubCommand().run(args.skip(1));
- } else {
- if (args.contains('run')) {
- // These flags have a format that can't be handled by package:args, so while
- // they are valid flags we'll assume the VM has verified them by this point.
- args = args
- .where(
- (element) => !(element.contains('--observe') ||
- element.contains('--enable-vm-service') ||
- element.contains('--devtools')),
- )
- .toList();
- }
-
- // Finally, call the runner to execute the command; see DartdevRunner.
- final runner = DartdevRunner(args);
- exitCode = await runner.run(args);
+ if (args.contains('run')) {
+ // These flags have a format that can't be handled by package:args, so while
+ // they are valid flags we'll assume the VM has verified them by this point.
+ args = args
+ .where(
+ (element) => !(element.contains('--observe') ||
+ element.contains('--enable-vm-service') ||
+ element.contains('--devtools')),
+ )
+ .toList();
}
+
+ // Finally, call the runner to execute the command; see DartdevRunner.
+ final runner = DartdevRunner(args);
+ exitCode = await runner.run(args);
} on UsageException catch (e) {
// TODO(sigurdm): It is unclear when a UsageException gets to here, and
// when it is in DartdevRunner.runCommand.