From 785c3258f657ee73381346b5e7af68a998b160c0 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 9 Nov 2020 14:36:38 +0000 Subject: [PATCH] Migration: remove deprecated code related to flag `--skip-pub-outdated`. This flag was removed in https://dart-review.googlesource.com/c/sdk/+/170561, but some of the code related to it was deprecated and retained in order to avoid breaking an internal client. The internal client has now been updated, so we no longer need the deprecated code. Bug: https://github.com/dart-lang/sdk/issues/44061 Change-Id: I08cbb7a617a349c2a4debbe342643de817bc86b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171000 Reviewed-by: Samuel Rawlins Commit-Queue: Paul Berry --- pkg/nnbd_migration/lib/migration_cli.dart | 44 ++++++----------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/pkg/nnbd_migration/lib/migration_cli.dart b/pkg/nnbd_migration/lib/migration_cli.dart index 8f0d07d5da9..3428443a491 100644 --- a/pkg/nnbd_migration/lib/migration_cli.dart +++ b/pkg/nnbd_migration/lib/migration_cli.dart @@ -99,10 +99,6 @@ class CommandLineOptions { static const previewPortOption = 'preview-port'; static const sdkPathOption = 'sdk-path'; static const skipImportCheckFlag = 'skip-import-check'; - - /// TODO(paulberry): remove this flag once internal sources have been updated. - @Deprecated('The migration tool no longer performs "pub outdated" checks') - static const skipPubOutdatedFlag = 'skip-pub-outdated'; static const summaryOption = 'summary'; static const verboseFlag = 'verbose'; static const webPreviewFlag = 'web-preview'; @@ -128,36 +124,16 @@ class CommandLineOptions { final bool webPreview; CommandLineOptions( - {@required - this.applyChanges, - @required - this.directory, - @required - this.ignoreErrors, - @required - this.ignoreExceptions, - @required - this.previewHostname, - @required - this.previewPort, - @required - this.sdkPath, - // TODO(paulberry): make this parameter required once internal sources - // have been updated. - bool skipImportCheck, - // TODO(paulberry): remove this flag once internal sources have been - // updated. - @Deprecated('The migration tool no longer performs "pub outdated" checks') - bool skipPubOutdated = false, - @required - this.summary, - @required - this.webPreview}) - // `skipImportCheck` has replaced `skipPubOutdated`, so if the caller - // specifies the latter but not the former, carry it over. - // TODO(paulberry): remove this logic once internal sources have been - // updated. - : skipImportCheck = skipImportCheck ?? skipPubOutdated; + {@required this.applyChanges, + @required this.directory, + @required this.ignoreErrors, + @required this.ignoreExceptions, + @required this.previewHostname, + @required this.previewPort, + @required this.sdkPath, + @required this.skipImportCheck, + @required this.summary, + @required this.webPreview}); } // TODO(devoncarew): Refactor so this class extends DartdevCommand.