Unverified Commit c8c86214 authored by Michael Thomsen's avatar Michael Thomsen Committed by GitHub

Clean up null safety messages (#120350)

parent 3fdd6ee4
......@@ -110,13 +110,8 @@ abstract class BuildSubCommand extends FlutterCommand {
/// This is similar to the run message in run_hot.dart
@protected
void displayNullSafetyMode(BuildInfo buildInfo) {
if (buildInfo.nullSafetyMode != NullSafetyMode.sound) {
_logger.printStatus('');
if (buildInfo.nullSafetyMode == NullSafetyMode.sound) {
_logger.printStatus(
'💪 Building with sound null safety 💪',
emphasis: true,
);
} else {
_logger.printStatus(
'Building without sound null safety ⚠️',
emphasis: true,
......
......@@ -608,10 +608,8 @@ class ResidentWebRunner extends ResidentRunner {
..writeAsStringSync(websocketUri.toString());
}
_logger.printStatus('Debug service listening on $websocketUri');
if (debuggingOptions.buildInfo.nullSafetyMode != NullSafetyMode.sound) {
_logger.printStatus('');
if (debuggingOptions.buildInfo.nullSafetyMode == NullSafetyMode.sound) {
_logger.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else {
_logger.printStatus(
'Running without sound null safety ⚠️',
emphasis: true,
......
......@@ -1029,10 +1029,8 @@ class HotRunner extends ResidentRunner {
}
commandHelp.c.print();
commandHelp.q.print();
if (debuggingOptions.buildInfo.nullSafetyMode != NullSafetyMode.sound) {
globals.printStatus('');
if (debuggingOptions.buildInfo.nullSafetyMode == NullSafetyMode.sound) {
globals.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else {
globals.printStatus(
'Running without sound null safety ⚠️',
emphasis: true,
......
......@@ -105,21 +105,11 @@ void main() {
nullSafetyMode: NullSafetyMode.unsound,
treeShakeIcons: false,
);
const BuildInfo sound = BuildInfo(
BuildMode.debug,
'',
treeShakeIcons: false,
);
final BufferLogger logger = BufferLogger.test();
FakeBuildSubCommand(logger).test(unsound);
expect(logger.statusText,
contains('Building without sound null safety ⚠️'));
logger.clear();
FakeBuildSubCommand(logger).test(sound);
expect(logger.statusText,
contains('💪 Building with sound null safety 💪'));
});
testUsingContext('Include only supported sub commands', () {
......
......@@ -1492,8 +1492,6 @@ flutter:
commandHelp.c,
commandHelp.q,
'',
'💪 Running with sound null safety 💪',
'',
'An Observatory debugger and profiler on FakeDevice is available at: null',
'',
].join('\n')
......@@ -1523,8 +1521,6 @@ flutter:
commandHelp.c,
commandHelp.q,
'',
'💪 Running with sound null safety 💪',
'',
'An Observatory debugger and profiler on FakeDevice is available at: null',
'',
].join('\n')
......
......@@ -547,8 +547,6 @@ void main() {
'Waiting for connection from debug service on FakeDevice...\n'
'Debug service listening on ws://127.0.0.1/abcd/\n'
'\n'
'💪 Running with sound null safety 💪\n'
'\n'
'first\n'
'\n'
'second\n'
......
......@@ -591,8 +591,6 @@ void main() {
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
contains('Running with sound null safety'),
'',
startsWith('An Observatory debugger and profiler on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
......@@ -620,8 +618,6 @@ void main() {
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
contains('Running with sound null safety'),
'',
startsWith('An Observatory debugger and profiler on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
......
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