-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Migrate abandon #102789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate abandon #102789
Conversation
|
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. |
|
@GaryQian is it ready for review? |
|
Yes, it is ready! |
|
Although this won't run yet without the prerequisite prs landing first. |
|
Merged in with the landed Utils, tests should run and pass now. Ready for review :) |
|
@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 |
|
@christopherfujino @blasten @zanderso Friendly ping for review :) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm extra newline
zanderso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm w/ nits.
packages/flutter_tools/test/commands.shard/permeable/migrate_abandon_test.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
flutter migrate abandonsubcommand.This command deletes the migrate_working_directory if it exists, thus abandoning any ongoing migration.
Depends on #101937