Skip to content
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

Merged
merged 1 commit into from
Mar 14, 2017
Merged

Adds initial support for hot reload for Fuchsia to flutter_tool. #8764

merged 1 commit into from
Mar 14, 2017

Conversation

zanderso
Copy link
Member

No description provided.

@override
Future<int> run({
Future<int> _run({
Copy link
Contributor

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

Copy link
Member Author

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".');
Copy link
Contributor

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?

Copy link
Member Author

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') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Member Author

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";
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

remoteFile -> remoteStdout

Copy link
Member Author

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";
Copy link
Contributor

Choose a reason for hiding this comment

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

localFile -> localStdout

Copy link
Member Author

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";
Copy link
Contributor

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).

Copy link
Member Author

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 {
Copy link
Contributor

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"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@zanderso
Copy link
Member Author

zanderso commented Mar 14, 2017

Lints fixed. PTAL

@johnmccutchan
Copy link
Contributor

LGTM

@zanderso zanderso merged commit b6ba37d into flutter:master Mar 14, 2017
@zanderso zanderso deleted the fuchsia-hot-reload branch March 14, 2017 18:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants