Skip to content

Return void from project migrate()#112897

Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom
jmagman:migrate-bool
Oct 5, 2022
Merged

Return void from project migrate()#112897
auto-submit[bot] merged 1 commit intoflutter:masterfrom
jmagman:migrate-bool

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Oct 5, 2022

migrate() was set up to return whether the project migration succeeded, and fail the build if the migration failed. But all the migrations always returned true (except in one file deletion case that shouldn't have failed the build).

Change signature to void migration()

Follow up from #112828 (comment)

@jmagman jmagman added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 5, 2022
@jmagman jmagman self-assigned this Oct 5, 2022
@flutter-dashboard flutter-dashboard bot added the platform-ios iOS applications specifically label Oct 5, 2022
final File gitignore = _project.parent.directory.childFile('.gitignore');

if (!removeFile(registrant)) {
return false;
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the only migration that ever returned false. We already have the error io file deletion fallbacks, and I'd argue failing to delete this file shouldn't be catastrophic and fail the web build.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 5, 2022
@auto-submit auto-submit bot merged commit b82cf76 into flutter:master Oct 5, 2022
@jmagman jmagman deleted the migrate-bool branch October 5, 2022 21:10
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants