-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Adds initial support for hot reload for Fuchsia to flutter_tool. #8764
Conversation
@override | ||
Future<int> run({ | ||
Future<int> _run({ |
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.
I believe this is a bad merge and it should be run
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.
Yah. Done.
@@ -366,6 +375,7 @@ abstract class ResidentRunner { | |||
|
|||
void printHelpDetails() { | |||
if (supportsServiceProtocol) { | |||
printStatus('To detach from the application without ending it, press "d".'); |
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.
I'm not sure we want to show this to every Flutter developer. Maybe make this line optional depending on Fuchsia?
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.
Removed.
@@ -273,6 +279,9 @@ abstract class ResidentRunner { | |||
// F10, exit | |||
await stop(); | |||
return true; | |||
} else if (lower == 'd') { |
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.
Why is this needed?
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.
Apps on Fuchsia don't shut down cleanly after a 'q'. This is useful maybe only until I track that down and/or while bringing up hot reload for Fuchsia. I'll leave this here and remove the help message.
int tag = _rng.nextInt(999999); | ||
String netruncmd = "$_fuchsiaRoot/out/build-magenta/tools/netruncmd"; | ||
String netcp = "$_fuchsiaRoot/out/build-magenta/tools/netcp"; | ||
String remoteFile = "/tmp/netruncmd.$tag"; |
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.
you need to use final for all of these variables
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.
remoteFile -> remoteStdout
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.
Done.
String netruncmd = "$_fuchsiaRoot/out/build-magenta/tools/netruncmd"; | ||
String netcp = "$_fuchsiaRoot/out/build-magenta/tools/netcp"; | ||
String remoteFile = "/tmp/netruncmd.$tag"; | ||
String localFile = "${Directory.systemTemp.path}/netruncmd.$tag"; |
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.
localFile -> localStdout
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.
Done.
|
||
Future<List<String>> run(String command) async { | ||
int tag = _rng.nextInt(999999); | ||
String netruncmd = "$_fuchsiaRoot/out/build-magenta/tools/netruncmd"; |
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.
here and below:
kNetRunCommand = 'out/build-magenta/tools/netruncmd';
fs.path.join(_fuchsiaRoot, kNetRunCommand).
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.
Done.
|
||
|
||
// TODO(zra): When Fuchsia has ssh, this should be changed to use that instead. | ||
class FuchsiaCommandRunner { |
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.
maybe rename this class to be "FuchsiaDeviceCommandRunner"
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.
Done.
Lints fixed. PTAL |
LGTM |
No description provided.