Friendlier messages when using dynamic patching (#25863)

This commit is contained in:
Stanislav Baranov 2019-01-03 16:18:36 -08:00 committed by GitHub
parent e4515824a1
commit b57499e704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -80,18 +80,17 @@ Future<void> 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.');
}
}

View file

@ -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<int> 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)}.');
}
}
}

View file

@ -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".');