这是indexloc提供的服务,不要输入任何密码
Skip to content

Add reloadMethod RPC #43725

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

Merged
merged 3 commits into from
Oct 29, 2019
Merged

Add reloadMethod RPC #43725

merged 3 commits into from
Oct 29, 2019

Conversation

jonahwilliams
Copy link
Contributor

Description

This method will allow the tool to replace hot reload with a more efficient implementation specifically for hot UI in the future. For now it delegates to reloadSources.

Note: removed unreachable type error checking

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 29, 2019
throw rpc.RpcException.invalidParams('Invalid \'isolateId\': $isolateId');
}
if (force is! bool) {
Copy link
Contributor

Choose a reason for hiding this comment

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

was this code intentionally removed? seems unrelated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is unreachable in dart 2 ... I couldn't bear to leave it in

Copy link
Contributor

Choose a reason for hiding this comment

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

ah yes :) fine to remove.
We must not be running any lints on this code.

// currently in the same way as hot reload, it leaves the tool free
// to change to a more efficient implementation in the future.
_peer.registerMethod('reloadMethod', (rpc.Parameters params) async {
final String isolateId = params['isolateId'].value;
Copy link
Contributor

Choose a reason for hiding this comment

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

throw invalid parameters on the parameters that are required so I know what to pass.

Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

a couple minor nits.

@jonahwilliams
Copy link
Contributor Author

Updated to require class, library, method, and methodBody parameters

@jonahwilliams jonahwilliams merged commit 331d19f into flutter:master Oct 29, 2019
@jonahwilliams jonahwilliams deleted the add_hot_ui branch October 29, 2019 20:21
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants