-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Reverse dependency between services and scheduler #54212
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
Conversation
@@ -6,7 +6,7 @@ import 'dart:async'; | |||
import 'dart:convert' show json; | |||
import 'dart:developer' as developer; | |||
import 'dart:io' show exit; | |||
import 'dart:ui' as ui show saveCompilationTrace, Window, window; | |||
import 'dart:ui' as ui show AppLifecycleState, saveCompilationTrace, Window, window; |
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.
Changes in this file will be reverted once customers are migrated.
Migration guide has been posted for review: flutter/website#3918 |
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
Seems reasonable. |
Note to reviewers: This PR contains two commits. The first commit ( 4399765) shows what the world will look like once the migration is done. The second commit on top of that (0089896) is a temporary change that allows us to migrate customers over to the new world. Once all customers are migrated, the second commit will be reverted. I recommend reviewing the commits separately.
Description
This PR reverses the dependency between the services and scheduler layer. Prior to this PR, scheduler was depending on services. With this change it is the other way around: This allows the service layers to schedule tasks via the scheduler layer.
This work is in preparation of #6827: It will allow us to implement the state restoration manager in the service layer (the restoration manage needs access to the task scheduling API of the scheduling layer).
Breaking change: This change is expected to only break people that have custom bindings (rare). In those custom bindings, the order of SchedulerBinding and ServicesBinding will have to be switched around.
Related Issues
Pre-work for #6827.
Supersedes #54211, #54202, and #54151.
Tests
I added the following tests:
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.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.