Skip to content

Conversation

@speaking-in-code
Copy link
Contributor

@speaking-in-code speaking-in-code commented Jul 20, 2020

Description

Fixes #24703.
Fixes #30641
Fixes #30641

Flutter driver has problems when flutter apps use more than a single isolate. The other isolates don't start, so apps malfunction. This PR fixes the problem by listening for new isolates to become runnable, and automatically starting them.

Related Issues

#24703

Tests

  • Manually tested against an app that requires isolates.
  • Added checks in flutter_driver_test.dart to verify that all isolates have resume() invoked.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change.

@fluttergithubbot fluttergithubbot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Jul 20, 2020
@goderbauer
Copy link
Member

@speaking-in-code Can you rebase this to the latest master to fix the analyzer problems?

@dnfield Would you be up for reviewing this one since you're looking at e2e testing?

@dnfield
Copy link
Contributor

dnfield commented Jul 23, 2020

I suspect you've tried to do a rebase that has gotten git a bit confused.

Can you either open a new PR with just your changes, or fix up the history on this one?

@speaking-in-code
Copy link
Contributor Author

Fixed this PR, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: prefer not shadowing parameter names in the enclosing class, which can get confusing. I don't have a great idea for a name here.

This does make me wonder if there are other cases we should be explicitly passing the isolate reference around though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we're not just setting the outter isoalte to isolateRef.load() here?

Should we be asserting isolate == isolateRef.load() somehow?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh I see, this could be other isolates the application uses that also started paused, right?

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM with nit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Analyzer wants a type annotation on this array.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@Piinks
Copy link
Contributor

Piinks commented Jul 23, 2020

It looks like the checks are failing here due to a version solving error. Can you try to update your branch with the latest on master?

@christopherfujino
Copy link
Contributor

It looks like the checks are failing here due to a version solving error. Can you try to update your branch with the latest on master?

So upstream linux is actually broken with this version solving problem: #62146. That will have to be fixed first, then this PR rebased to make CI green.

@speaking-in-code
Copy link
Contributor Author

Looks like this is ready to go except for the flutter-build check. Anything I can do to help resolve that?

@dnfield
Copy link
Contributor

dnfield commented Jul 24, 2020

Added a label that will land this when those issues get resolved

Pragya007 pushed a commit to Pragya007/flutter that referenced this pull request Aug 11, 2020
Pragya007 pushed a commit to Pragya007/flutter that referenced this pull request Aug 11, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
speaking-in-code added a commit to speaking-in-code/flutter that referenced this pull request Sep 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

7 participants