Commit 4f9e329f authored by Devon Carew's avatar Devon Carew Committed by GitHub

tweaks to the hot reload messages (#5298)

parent 4c1dde8d
...@@ -254,12 +254,15 @@ class HotRunner extends ResidentRunner { ...@@ -254,12 +254,15 @@ class HotRunner extends ResidentRunner {
await bundle.build(); await bundle.build();
bundleStatus.stop(showElapsedTime: true); bundleStatus.stop(showElapsedTime: true);
} }
Status devFSStatus = logger.startProgress('Syncing files on device...'); Status devFSStatus = logger.startProgress('Syncing files to device...');
await _devFS.update(progressReporter: progressReporter, await _devFS.update(progressReporter: progressReporter,
bundle: bundle, bundle: bundle,
bundleDirty: rebuildBundle); bundleDirty: rebuildBundle);
devFSStatus.stop(showElapsedTime: true); devFSStatus.stop(showElapsedTime: true);
printStatus('Synced ${getSizeAsMB(_devFS.bytes)} MB'); if (progressReporter != null)
printStatus('Synced ${getSizeAsMB(_devFS.bytes)}.');
else
printTrace('Synced ${getSizeAsMB(_devFS.bytes)}.');
return true; return true;
} }
...@@ -339,14 +342,13 @@ class HotRunner extends ResidentRunner { ...@@ -339,14 +342,13 @@ class HotRunner extends ResidentRunner {
bool _printReloadReport(Map<String, dynamic> reloadReport) { bool _printReloadReport(Map<String, dynamic> reloadReport) {
if (!reloadReport['success']) { if (!reloadReport['success']) {
printError('Hot reload was rejected:'); printError('Hot reload was rejected:');
for (Map<String, dynamic> notice in reloadReport['details']['notices']) { for (Map<String, dynamic> notice in reloadReport['details']['notices'])
printError('${notice['message']}'); printError('${notice['message']}');
}
return false; return false;
} }
int loadedLibraryCount = reloadReport['details']['loadedLibraryCount']; int loadedLibraryCount = reloadReport['details']['loadedLibraryCount'];
int finalLibraryCount = reloadReport['details']['finalLibraryCount']; int finalLibraryCount = reloadReport['details']['finalLibraryCount'];
printStatus('Reloaded $loadedLibraryCount out of $finalLibraryCount libraries.'); printStatus('Reloaded $loadedLibraryCount of $finalLibraryCount libraries.');
return true; return true;
} }
...@@ -358,7 +360,7 @@ class HotRunner extends ResidentRunner { ...@@ -358,7 +360,7 @@ class HotRunner extends ResidentRunner {
throw 'Application isolate not found'; throw 'Application isolate not found';
if (_devFS != null) if (_devFS != null)
await _updateDevFS(); await _updateDevFS();
Status reloadStatus = logger.startProgress('Performing hot reload'); Status reloadStatus = logger.startProgress('Performing hot reload...');
try { try {
Map<String, dynamic> reloadReport = Map<String, dynamic> reloadReport =
await serviceProtocol.reloadSources(serviceProtocol.firstIsolateId); await serviceProtocol.reloadSources(serviceProtocol.firstIsolateId);
...@@ -373,7 +375,7 @@ class HotRunner extends ResidentRunner { ...@@ -373,7 +375,7 @@ class HotRunner extends ResidentRunner {
return false; return false;
} }
Status reassembleStatus = Status reassembleStatus =
logger.startProgress('Reassembling application'); logger.startProgress('Reassembling application...');
try { try {
await serviceProtocol.flutterReassemble(serviceProtocol.firstIsolateId); await serviceProtocol.flutterReassemble(serviceProtocol.firstIsolateId);
} catch (_) { } catch (_) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment