Skip to content

Refactor FlutterStudioProjectOpenProcessor to improve openProjectAsync robustness with a project fallback mechanism, extracting helper methods, and adding a unit test.#8681

Merged
jwren merged 1 commit into
flutter:mainfrom
jwren:8661
Jan 7, 2026

Conversation

@jwren
Copy link
Copy Markdown
Member

@jwren jwren commented Jan 6, 2026

Follow up on: #8629
Related issue: #8661

…sync` robustness with a project fallback mechanism, extracting helper methods, and adding a unit test.

Follow up on: flutter#8629
Related issue: flutter#8661
@jwren jwren requested a review from pq January 6, 2026 17:18
@jwren jwren requested a review from helin24 January 6, 2026 17:18
if (newProject == null || newProject.isDisposed) {
return newProject
// Fallback to the original project if re-lookup fails.
if (project != null && !project.isDisposed) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we know why this might happen?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No unfortunately, we don't have steps to reproduce it. Just defensive programming :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Consider adding logging? it'd be great to know if this condition occurs and if it resolves issues folks are hitting in the wild. (We might consider analytics ultimately too.)

@jwren jwren merged commit 712e40d into flutter:main Jan 7, 2026
8 checks passed
@@ -0,0 +1,60 @@
package io.flutter.editor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Whoops... This never got a copyright header.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants