-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Add reloadMethod RPC #43725
Conversation
throw rpc.RpcException.invalidParams('Invalid \'isolateId\': $isolateId'); | ||
} | ||
if (force is! bool) { |
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.
was this code intentionally removed? seems unrelated.
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.
This is unreachable in dart 2 ... I couldn't bear to leave it in
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.
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; |
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.
throw invalid parameters on the parameters that are required so I know what to pass.
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.
a couple minor nits.
Updated to require class, library, method, and methodBody parameters |
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