Skip to content

Move try/catch to processFileLines_#185646

Merged
auto-submit[bot] merged 7 commits into
flutter:masterfrom
mboetger:wrap-project-184595
Apr 29, 2026
Merged

Move try/catch to processFileLines_#185646
auto-submit[bot] merged 7 commits into
flutter:masterfrom
mboetger:wrap-project-184595

Conversation

@mboetger

Copy link
Copy Markdown
Contributor

Move try/catch to base implementation of processFileLines_

Fixes: #184595

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@mboetger mboetger requested a review from a team as a code owner April 27, 2026 19:44
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@mboetger mboetger requested a review from jesswrd April 27, 2026 19:44
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 27, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors project migration logic by moving error handling from specific migration subclasses to the ProjectMigrator base class. The review feedback points out that this move results in a regression, as the try/catch block now only covers file write operations, leaving file reads unprotected.

Comment thread packages/flutter_tools/lib/src/base/project_migrator.dart

@gmackall gmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the gemini comment here is good. We should be treating both reads and writes as unsafe (and processFileLines does both)

@mboetger

Copy link
Copy Markdown
Contributor Author

I think the gemini comment here is good. We should be treating both reads and writes as unsafe (and processFileLines does both)

Done. This was a test using gemini to tackle backlog issues and I wish the local gemini caught this :(

@mboetger mboetger requested a review from gmackall April 27, 2026 22:45
@mboetger mboetger added the CICD Run CI/CD label Apr 27, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 27, 2026
gmackall
gmackall previously approved these changes Apr 27, 2026

@gmackall gmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment thread packages/flutter_tools/lib/src/base/project_migrator.dart Outdated
@mboetger mboetger requested a review from gmackall April 27, 2026 23:04
@mboetger mboetger added the CICD Run CI/CD label Apr 27, 2026
gmackall
gmackall previously approved these changes Apr 27, 2026

@gmackall gmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

alas, still lgtm

@mboetger mboetger added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 27, 2026
@auto-submit

auto-submit Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185646, because - The status or check suite Mac tool_tests_general has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux tool_tests_general has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 27, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 28, 2026
@gmackall

Copy link
Copy Markdown
Member

I think the test failures may have been real by the way (at least, in the sense that mocking updates are needed and they won't go away w/ retry).

See
https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20tool_tests_general/65512/overview

@mboetger mboetger added the CICD Run CI/CD label Apr 28, 2026
@github-actions github-actions Bot added team-android Owned by Android platform team CICD Run CI/CD labels Apr 28, 2026
@mboetger mboetger added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 28, 2026
@auto-submit

auto-submit Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185646, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrap write call with try/catch in processFile()

2 participants