From b57499e704eb37a70bb511fbf897b1b4e6505ad3 Mon Sep 17 00:00:00 2001 From: Stanislav Baranov Date: Thu, 3 Jan 2019 16:18:36 -0800 Subject: [PATCH] Friendlier messages when using dynamic patching (#25863) --- packages/flutter_tools/lib/src/bundle.dart | 7 +++---- packages/flutter_tools/lib/src/resident_runner.dart | 4 ++-- packages/flutter_tools/lib/src/run_cold.dart | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/flutter_tools/lib/src/bundle.dart b/packages/flutter_tools/lib/src/bundle.dart index 268ea496dda..aff3f8294f7 100644 --- a/packages/flutter_tools/lib/src/bundle.dart +++ b/packages/flutter_tools/lib/src/bundle.dart @@ -80,18 +80,17 @@ Future build({ } else if (compilationTraceFilePath.isEmpty) { // Disable JIT snapshotting if flag is empty. - printStatus('JIT snapshot will be disabled for this build...'); + printStatus('Code snapshot will be disabled for this build.'); compilationTraceFilePath = null; } else if (!fs.file(compilationTraceFilePath).existsSync()) { // Be forgiving if compilation trace file is missing. - printError('Warning: Ignoring missing compiler training file $compilationTraceFilePath...'); - printStatus('JIT snapshot will not use compiler training...'); + printError('Warning: Ignoring missing compilation training file $compilationTraceFilePath.'); final File tmp = fs.systemTempDirectory.childFile('flutterEmptyCompilationTrace.txt'); compilationTraceFilePath = (tmp..createSync(recursive: true)).path; } else { - printStatus('JIT snapshot will use compiler training file $compilationTraceFilePath...'); + printStatus('Code snapshot will use compilation training file $compilationTraceFilePath.'); } } diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 0f3ce7d6d9d..e08ed5fb1bb 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -602,7 +602,7 @@ abstract class ResidentRunner { for (FlutterDevice device in flutterDevices) { for (FlutterView view in device.views) { final int index = device.views.indexOf(view); - printStatus('Saving compilation trace for ' + printStatus('Saving compilation training file for ' '${device.device.name}${index == 0 ? '' :'/Isolate$index'}...'); List buffer; @@ -619,7 +619,7 @@ abstract class ResidentRunner { outputFile.parent.createSync(recursive: true); outputFile.writeAsBytesSync(buffer); - printStatus('Compilation trace written to ${fs.path.relative(outputFile.path)}.'); + printStatus('Compilation training written to ${fs.path.relative(outputFile.path)}.'); } } } diff --git a/packages/flutter_tools/lib/src/run_cold.dart b/packages/flutter_tools/lib/src/run_cold.dart index f85a53f996e..f368de24b38 100644 --- a/packages/flutter_tools/lib/src/run_cold.dart +++ b/packages/flutter_tools/lib/src/run_cold.dart @@ -146,6 +146,9 @@ class ColdRunner extends ResidentRunner { } } if (haveDetails && !details) { + if (saveCompilationTrace) { + printStatus('Runtime compilation trace will be saved when flutter run quits...'); + } printStatus('For a more detailed help message, press "h". To quit, press "q".'); } else if (haveAnything) { printStatus('To repeat this help message, press "h". To quit, press "q".');