Unverified Commit 1efb3603 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] display message for current null safety mode (#70718)

parent a5519dc7
......@@ -418,7 +418,8 @@ class WindowsStdoutLogger extends StdoutLogger {
.replaceAll('🖼️', '')
.replaceAll('✗', 'X')
.replaceAll('✓', '√')
.replaceAll('🔨', '');
.replaceAll('🔨', '')
.replaceAll('💪', '');
_stdio.stdoutWrite(windowsMessage);
}
}
......
......@@ -723,7 +723,7 @@ class _ResidentWebRunner extends ResidentWebRunner {
?? debuggingOptions.buildInfo.packageConfig,
);
final Status devFSStatus = globals.logger.startProgress(
'Syncing files to device ${device.device.name}...',
'Waiting for connection from debug service on ${device.device.name}...',
);
final UpdateFSReport report = await device.devFS.update(
mainUri: await _generateEntrypoint(
......@@ -833,6 +833,18 @@ class _ResidentWebRunner extends ResidentWebRunner {
..writeAsStringSync(websocketUri.toString());
}
globals.printStatus('Debug service listening on $websocketUri');
globals.printStatus('');
if (debuggingOptions.buildInfo.nullSafetyMode == NullSafetyMode.sound) {
globals.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else {
globals.printStatus(
'Running with unsound null safety',
emphasis: true,
);
globals.printStatus(
'For more information see https://dart.dev/null-safety/unsound-null-safety',
);
}
}
appStartedCompleter?.complete();
connectionInfoCompleter?.complete(DebugConnectionInfo(wsUri: websocketUri));
......
......@@ -1219,15 +1219,8 @@ abstract class ResidentRunner {
ipv6: ipv6,
disableServiceAuthCodes: debuggingOptions.disableServiceAuthCodes
);
// This will wait for at least one flutter view before returning.
final Status status = globals.logger.startProgress(
'Waiting for ${device.device.name} to report its views...',
);
try {
await device.vmService.getFlutterViews();
} finally {
status.stop();
}
await device.vmService.getFlutterViews();
// This hooks up callbacks for when the connection stops in the future.
// We don't want to wait for them. We don't handle errors in those callbacks'
// futures either because they just print to logger and is not critical.
......
......@@ -1095,13 +1095,24 @@ class HotRunner extends ResidentRunner {
printHelpDetails();
}
for (final FlutterDevice device in flutterDevices) {
final String dname = device.device.name;
// Caution: This log line is parsed by device lab tests.
globals.printStatus(
'An Observatory debugger and profiler on $dname is available at: '
'An Observatory debugger and profiler on ${device.device.name} is available at: '
'${device.vmService.httpAddress}',
);
}
globals.printStatus('');
if (debuggingOptions.buildInfo.nullSafetyMode == NullSafetyMode.sound) {
globals.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else {
globals.printStatus(
'Running with unsound null safety',
emphasis: true,
);
globals.printStatus(
'For more information see https://dart.dev/null-safety/unsound-null-safety',
);
}
}
Future<void> _evictDirtyAssets() async {
......
......@@ -1510,6 +1510,7 @@ void main() {
commandHelp.P,
commandHelp.a,
'An Observatory debugger and profiler on null is available at: null',
'\n💪 Running with sound null safety 💪',
''
].join('\n')
));
......
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