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