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

Commit 8c21692

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Remove transitional method MigrationCliRunner.shouldBeMigrated2
Now that `MigrationCliRunner.shouldBeMigrated` has the correct signature and internal clients no longer use `MigrationCliRunner.shouldBeMigrated2`, we can remove `MigrationCliRunner.shouldBeMigrated2`. Change-Id: I33bdc78a603c859dd8bf1928f2dbc23233ae5e7c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178763 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
1 parent df8c809 commit 8c21692

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

pkg/nnbd_migration/lib/migration_cli.dart

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -813,25 +813,7 @@ sources' action.
813813
/// return additional paths that aren't inside the user's project, but doesn't
814814
/// override this method, then those additional paths will be analyzed but not
815815
/// migrated.
816-
bool shouldBeMigrated(String path) => shouldBeMigrated2(path);
817-
818-
/// Determines whether a migrated version of the file at [path] should be
819-
/// output by the migration too. May be overridden by a derived class.
820-
///
821-
/// This method should return `false` for files that are being considered by
822-
/// the migration tool for information only (for example generated files, or
823-
/// usages of the code-to-be-migrated by one one of its clients).
824-
///
825-
/// By default returns `true` if the file is contained within the context
826-
/// root. This means that if a client overrides [computePathsToProcess] to
827-
/// return additional paths that aren't inside the user's project, but doesn't
828-
/// override this method, then those additional paths will be analyzed but not
829-
/// migrated.
830-
///
831-
/// Note: in a future version of the code, this method will be removed;
832-
/// clients that are overriding this method should switch to overriding
833-
/// [shouldBeMigrated] instead.
834-
bool shouldBeMigrated2(String path) {
816+
bool shouldBeMigrated(String path) {
835817
return analysisContext.contextRoot.isAnalyzed(path);
836818
}
837819

pkg/nnbd_migration/test/migration_cli_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ class _MigrationCliRunner extends MigrationCliRunner {
185185
}
186186

187187
@override
188-
bool shouldBeMigrated2(String path) =>
188+
bool shouldBeMigrated(String path) =>
189189
cli._test.overrideShouldBeMigrated?.call(path) ??
190-
super.shouldBeMigrated2(path);
190+
super.shouldBeMigrated(path);
191191

192192
/// Sorts the paths in [paths] for repeatability of migration tests.
193193
Set<String> _sortPaths(Set<String> paths) {

0 commit comments

Comments
 (0)