Skip to content

Conversation

@GaryQian
Copy link
Contributor

@GaryQian GaryQian commented Apr 28, 2022

flutter migrate abandon subcommand.

This command deletes the migrate_working_directory if it exists, thus abandoning any ongoing migration.

Depends on #101937

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 28, 2022
@blasten
Copy link

blasten commented May 5, 2022

@GaryQian is it ready for review?

@GaryQian
Copy link
Contributor Author

GaryQian commented May 6, 2022

Yes, it is ready!

@GaryQian
Copy link
Contributor Author

GaryQian commented May 6, 2022

Although this won't run yet without the prerequisite prs landing first.

@GaryQian
Copy link
Contributor Author

Merged in with the landed Utils, tests should run and pass now. Ready for review :)

@GaryQian
Copy link
Contributor Author

@christopherfujino This one needs review as well. Any comments made in the other PRs that have equivalents here will be synced, so no need to duplicate suggestions

@GaryQian
Copy link
Contributor Author

@christopherfujino @blasten @zanderso Friendly ping for review :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag is called staging-directory but the variable is called workingDirectory, which is a bit confusing. Can the variable and constant also be stagingDirectory/kDefaultMigrateStagingDirectoryName?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the platform, deletion can be flaky, and recursive directory delete especially so. So, I'd suggest wrapping this in a try {} catch {} that handles FileSystemException and asks the user to manually delete it rather than crashing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm extra newline

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ nits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: include github issue link with TODO.

@fluttergithubbot fluttergithubbot merged commit e9a3cbf into flutter:master Jun 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 7, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants