Update CFE compiler output for sound null safety in Dart 3

Fixes: https://github.com/dart-lang/sdk/issues/49924

Change-Id: I9ad951ce8ede57d295508bc6480d10b0204c2579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257642
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This commit is contained in:
Michael Thomsen 2022-09-08 10:09:23 +00:00 committed by Commit Bot
parent ac0138ccb6
commit 6a274e3fe1
5 changed files with 11 additions and 7 deletions

View file

@ -1074,7 +1074,7 @@ const Code<Null> codeCompilingWithSoundNullSafety =
const MessageCode messageCompilingWithSoundNullSafety = const MessageCode(
"CompilingWithSoundNullSafety",
severity: Severity.info,
problemMessage: r"""Compiling with sound null safety""");
problemMessage: r"""Compiling with sound null safety 💪""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeCompilingWithoutSoundNullSafety =
@ -1084,7 +1084,8 @@ const Code<Null> codeCompilingWithoutSoundNullSafety =
const MessageCode messageCompilingWithoutSoundNullSafety = const MessageCode(
"CompilingWithoutSoundNullSafety",
severity: Severity.info,
problemMessage: r"""Compiling without sound null safety""");
problemMessage: r"""Compiling without sound null safety ⚠️
Dart 3 will only support sound null safety, see https://dart.dev/null-safety""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<

View file

@ -16,7 +16,8 @@ void main() {
group('compile -', defineCompileTests, timeout: longTimeout);
}
const String soundNullSafetyMessage = 'Info: Compiling with sound null safety';
const String soundNullSafetyMessage =
'Info: Compiling with sound null safety 💪';
const String unsoundNullSafetyMessage =
'Info: Compiling without sound null safety';

View file

@ -13,7 +13,8 @@ import 'package:test/test.dart';
import '../utils.dart';
const String soundNullSafetyMessage = 'Info: Compiling with sound null safety';
const String soundNullSafetyMessage =
'Info: Compiling with sound null safety 💪';
const devToolsMessagePrefix =
'The Dart DevTools debugger and profiler is available at: http://127.0.0.1:';
const dartVMServiceMessagePrefix =

View file

@ -33,7 +33,8 @@ void main() {
expect(result.stderr, isNotEmpty);
expect(result.stderr, contains("Error when reading 'foo.dart':"));
expect(result.stdout, isNotEmpty);
expect(result.stdout, contains('Info: Compiling with sound null safety\n'));
expect(
result.stdout, contains('Info: Compiling with sound null safety 💪\n'));
expect(result.exitCode, 254);
});
}

View file

@ -5517,14 +5517,14 @@ UnexpectedModifierInNonNnbd:
late int x;
CompilingWithSoundNullSafety:
problemMessage: "Compiling with sound null safety"
problemMessage: "Compiling with sound null safety 💪"
configuration: nnbd-strong,compile
severity: INFO
script: |
main() {}
CompilingWithoutSoundNullSafety:
problemMessage: "Compiling without sound null safety"
problemMessage: "Compiling without sound null safety ⚠️\nDart 3 will only support sound null safety, see https://dart.dev/null-safety"
configuration: nnbd-weak,compile
severity: INFO
script: |