diff --git a/pkg/compiler/lib/src/kernel/front_end_adapter.dart b/pkg/compiler/lib/src/kernel/front_end_adapter.dart index 2b00b6107d3..808404df514 100644 --- a/pkg/compiler/lib/src/kernel/front_end_adapter.dart +++ b/pkg/compiler/lib/src/kernel/front_end_adapter.dart @@ -96,9 +96,6 @@ void reportFrontEndMessage( case fe.Severity.warning: reporter.reportWarningMessage(span, kind, {'text': message.message}); break; - case fe.Severity.nit: - reporter.reportHintMessage(span, kind, {'text': message.message}); - break; case fe.Severity.context: reporter.reportInfo(span, kind, {'text': message.message}); break; diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart index c39a3980b33..dd5a2e787d4 100644 --- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart +++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart @@ -212,10 +212,4 @@ class CompilerOptions { /// /// Typically used by developers to debug internals of the compiler. bool throwOnWarningsForDebugging = false; - - /// Whether the compiler should throw as soon as it encounters a - /// compilation nit. - /// - /// Typically used by developers to debug internals of the compiler. - bool throwOnNitsForDebugging = false; } diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart index 08b60571d2c..adb0ca41b1f 100644 --- a/pkg/front_end/lib/src/base/processed_options.dart +++ b/pkg/front_end/lib/src/base/processed_options.dart @@ -170,8 +170,6 @@ class ProcessedOptions { bool get throwOnWarningsForDebugging => _raw.throwOnWarningsForDebugging; - bool get throwOnNitsForDebugging => _raw.throwOnNitsForDebugging; - /// The entry-points provided to the compiler. final List inputs; @@ -630,7 +628,6 @@ class ProcessedOptions { sb.writeln('throwOnErrorsForDebugging: ${throwOnErrorsForDebugging}'); sb.writeln('throwOnWarningsForDebugging: ${throwOnWarningsForDebugging}'); - sb.writeln('throwOnNitsForDebugging: ${throwOnNitsForDebugging}'); sb.writeln('exit on problem: ${setExitCodeOnProblem}'); sb.writeln('Embed sources: ${embedSourceText}'); sb.writeln('debugDump: ${debugDump}'); diff --git a/pkg/front_end/lib/src/fasta/command_line_reporting.dart b/pkg/front_end/lib/src/fasta/command_line_reporting.dart index fe28e9c8b0d..c7f93ee6298 100644 --- a/pkg/front_end/lib/src/fasta/command_line_reporting.dart +++ b/pkg/front_end/lib/src/fasta/command_line_reporting.dart @@ -12,7 +12,7 @@ import 'dart:io' show exitCode; import 'package:kernel/ast.dart' show Location; -import 'colors.dart' show cyan, green, magenta, red; +import 'colors.dart' show green, magenta, red; import 'compiler_context.dart' show CompilerContext; @@ -23,7 +23,7 @@ import 'fasta_codes.dart' show LocatedMessage; import 'messages.dart' show getLocation, getSourceLine, isVerbose; -import 'problems.dart' show unexpected; +import 'problems.dart' show unhandled; import 'severity.dart' show Severity; @@ -54,10 +54,6 @@ String format(LocatedMessage message, Severity severity, {Location location}) { text = red(text); break; - case Severity.nit: - text = cyan(text); - break; - case Severity.warning: text = magenta(text); break; @@ -67,7 +63,7 @@ String format(LocatedMessage message, Severity severity, {Location location}) { break; default: - return unexpected("$severity", "format", -1, null); + return unhandled("$severity", "format", -1, null); } } @@ -95,7 +91,7 @@ String format(LocatedMessage message, Severity severity, {Location location}) { sourceLine = "\n$sourceLine\n$pointer"; } String position = - location == null ? "" : ":${location.line}:${location.column}"; + location == null ? ":1" : ":${location.line}:${location.column}"; return "$path$position: $text$sourceLine"; } else { return text; @@ -117,14 +113,11 @@ bool isHidden(Severity severity) { case Severity.context: return false; - case Severity.nit: - return !isVerbose; - case Severity.warning: return hideWarnings; default: - return unexpected("$severity", "isHidden", -1, null); + return unhandled("$severity", "isHidden", -1, null); } } @@ -138,9 +131,6 @@ bool shouldThrowOn(Severity severity) { case Severity.internalProblem: return true; - case Severity.nit: - return CompilerContext.current.options.throwOnNitsForDebugging; - case Severity.warning: return CompilerContext.current.options.throwOnWarningsForDebugging; @@ -148,7 +138,7 @@ bool shouldThrowOn(Severity severity) { return false; default: - return unexpected("$severity", "shouldThrowOn", -1, null); + return unhandled("$severity", "shouldThrowOn", -1, null); } } @@ -161,9 +151,6 @@ String severityName(Severity severity, {bool capitalized: false}) { case Severity.internalProblem: return capitalized ? "Internal problem" : "internal problem"; - case Severity.nit: - return capitalized ? "Nit" : "nit"; - case Severity.warning: return capitalized ? "Warning" : "warning"; @@ -171,7 +158,7 @@ String severityName(Severity severity, {bool capitalized: false}) { return capitalized ? "Context" : "context"; default: - return unexpected("$severity", "severityName", -1, null); + return unhandled("$severity", "severityName", -1, null); } } @@ -208,12 +195,14 @@ bool isCompileTimeError(Severity severity) { case Severity.errorLegacyWarning: return CompilerContext.current.options.strongMode; - case Severity.nit: case Severity.warning: case Severity.context: return false; + + case Severity.ignored: + break; // Fall-through to unhandled below. } - return unexpected("$severity", "isCompileTimeError", -1, null); + return unhandled("$severity", "isCompileTimeError", -1, null); } /// Report [message] unless [severity] is suppressed (see [isHidden]). Throws diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart index 446f3fbab22..da2122ca67f 100644 --- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart +++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart @@ -1477,7 +1477,7 @@ const Code "DuplicatedExport", templateDuplicatedExport, analyzerCode: "AMBIGUOUS_EXPORT", dart2jsCode: "*ignored*", - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedExport(String name, Uri uri_, Uri uri2_) { @@ -1525,7 +1525,7 @@ const Code codeDuplicatedImport = const Code( "DuplicatedImport", templateDuplicatedImport, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsDuplicatedImport(String name, Uri uri_, Uri uri2_) { @@ -2133,7 +2133,7 @@ const Code codeExportHidesExport = const Code( "ExportHidesExport", templateExportHidesExport, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsExportHidesExport(String name, Uri uri_, Uri uri2_) { @@ -2433,7 +2433,6 @@ const MessageCode messageFastaUsageLong = --fatal=errors --fatal=warnings - --fatal=nits Makes messages of the given kinds fatal, that is, immediately stop the compiler with a non-zero exit-code. In --verbose mode, also display an internal stack trace from the compiler. Multiple kinds can be separated by @@ -2792,7 +2791,7 @@ const Code codeImportHidesImport = const Code( "ImportHidesImport", templateImportHidesImport, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsImportHidesImport(String name, Uri uri_, Uri uri2_) { @@ -3815,7 +3814,7 @@ const Template< const Code codeLoadLibraryHidesMember = const Code( "LoadLibraryHidesMember", templateLoadLibraryHidesMember, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLoadLibraryHidesMember(Uri uri_) { @@ -3850,7 +3849,7 @@ const Code codeLocalDefinitionHidesExport = const Code( "LocalDefinitionHidesExport", templateLocalDefinitionHidesExport, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLocalDefinitionHidesExport(String name, Uri uri_) { @@ -3873,7 +3872,7 @@ const Code codeLocalDefinitionHidesImport = const Code( "LocalDefinitionHidesImport", templateLocalDefinitionHidesImport, - severity: Severity.nit); + severity: Severity.ignored); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLocalDefinitionHidesImport(String name, Uri uri_) { diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart index 1a1ab4d8ff4..0e2a25e898b 100644 --- a/pkg/front_end/lib/src/fasta/loader.dart +++ b/pkg/front_end/lib/src/fasta/loader.dart @@ -237,6 +237,7 @@ abstract class Loader { bool addMessage(Message message, int charOffset, int length, Uri fileUri, Severity severity, {bool wasHandled: false, List context}) { + if (severity == Severity.ignored) return false; String trace = """ message: ${message.message} charOffset: $charOffset diff --git a/pkg/front_end/lib/src/fasta/severity.dart b/pkg/front_end/lib/src/fasta/severity.dart index fb1fb5a4e6e..9a29a74ccd5 100644 --- a/pkg/front_end/lib/src/fasta/severity.dart +++ b/pkg/front_end/lib/src/fasta/severity.dart @@ -8,8 +8,8 @@ enum Severity { context, error, errorLegacyWarning, + ignored, internalProblem, - nit, warning, } @@ -17,8 +17,8 @@ const Map severityEnumNames = const { 'CONTEXT': 'context', 'ERROR': 'error', 'ERROR_LEGACY_WARNING': 'errorLegacyWarning', + 'IGNORED': 'ignored', 'INTERNAL_PROBLEM': 'internalProblem', - 'NIT': 'nit', 'WARNING': 'warning', }; @@ -26,7 +26,7 @@ const Map severityEnumValues = const { 'CONTEXT': Severity.context, 'ERROR': Severity.error, 'ERROR_LEGACY_WARNING': Severity.errorLegacyWarning, + 'IGNORED': Severity.ignored, 'INTERNAL_PROBLEM': Severity.internalProblem, - 'NIT': Severity.nit, 'WARNING': Severity.warning, }; diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart index 7d6952a2af9..75dfd2f5088 100644 --- a/pkg/front_end/lib/src/fasta/source/source_loader.dart +++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart @@ -80,7 +80,7 @@ import '../parser/class_member_parser.dart' show ClassMemberParser; import '../parser.dart' show Parser, lengthForToken, offsetForToken; -import '../problems.dart' show internalProblem; +import '../problems.dart' show internalProblem, unhandled; import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan; @@ -862,8 +862,7 @@ class SourceLoader extends Loader { if (instrumentation == null) return; if (charOffset == -1 && - (severity == Severity.nit || - message.code == fasta_codes.codeConstConstructorWithBody || + (message.code == fasta_codes.codeConstConstructorWithBody || message.code == fasta_codes.codeConstructorNotFound || message.code == fasta_codes.codeSuperclassHasNoDefaultConstructor || message.code == fasta_codes.codeTypeArgumentsOnTypeVariable || @@ -883,10 +882,6 @@ class SourceLoader extends Loader { severityString = "internal problem"; break; - case Severity.nit: - severityString = "nit"; - break; - case Severity.warning: severityString = "warning"; break; @@ -900,6 +895,10 @@ class SourceLoader extends Loader { case Severity.context: severityString = "context"; break; + + case Severity.ignored: + unhandled("IGNORED", "recordMessage", charOffset, fileUri); + return; } instrumentation.record( fileUri, diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index f36d34b75ef..7c31f2a8911 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -1149,7 +1149,7 @@ LoadLibraryTakesNoArguments: LoadLibraryHidesMember: template: "The library '#uri' defines a top-level member named 'loadLibrary'. This member is hidden by the special member 'loadLibrary' that the language adds to support deferred loading." tip: "Try to rename or hide the member." - severity: NIT + severity: IGNORED TypeArgumentMismatch: template: "'#name' expects #count type arguments." @@ -1229,7 +1229,6 @@ FastaUsageLong: --fatal=errors --fatal=warnings - --fatal=nits Makes messages of the given kinds fatal, that is, immediately stop the compiler with a non-zero exit-code. In --verbose mode, also display an internal stack trace from the compiler. Multiple kinds can be separated by @@ -1343,19 +1342,19 @@ InternalVisitorUnsupportedDefault: LocalDefinitionHidesExport: template: "Local definition of '#name' hides export from '#uri'." - severity: NIT + severity: IGNORED LocalDefinitionHidesImport: template: "Local definition of '#name' hides import from '#uri'." - severity: NIT + severity: IGNORED ExportHidesExport: template: "Export of '#name' (from '#uri') hides export from '#uri2'." - severity: NIT + severity: IGNORED ImportHidesImport: template: "Import of '#name' (from '#uri') hides import from '#uri2'." - severity: NIT + severity: IGNORED MissingPrefixInDeferredImport: template: "Deferred imports should have a prefix." @@ -1396,7 +1395,7 @@ PrefixAfterCombinator: DuplicatedExport: template: "'#name' is exported from both '#uri' and '#uri2'." - severity: NIT + severity: IGNORED analyzerCode: AMBIGUOUS_EXPORT dart2jsCode: "*ignored*" @@ -1406,7 +1405,7 @@ DuplicatedExportInType: DuplicatedImport: template: "'#name' is imported from both '#uri' and '#uri2'." - severity: NIT + severity: IGNORED DuplicatedImportInType: template: "'#name' is imported from both '#uri' and '#uri2'." diff --git a/pkg/front_end/test/fasta/incremental_test.dart b/pkg/front_end/test/fasta/incremental_test.dart index d6e5f8dd567..3609b703764 100644 --- a/pkg/front_end/test/fasta/incremental_test.dart +++ b/pkg/front_end/test/fasta/incremental_test.dart @@ -220,8 +220,7 @@ Future createContext( ..fileSystem = fs ..sdkSummary = sdkSummary ..onError = (CompilationMessage message) { - if (message.severity != Severity.nit && - message.severity != Severity.warning) { + if (message.severity != Severity.warning) { errors.add(message); } }; diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.expect index 09a7e0c06e9..e72d620b3fa 100644 --- a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.expect +++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.expect @@ -19,7 +19,7 @@ class Fisk extends core::Object { for (final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: Can't assign to this, so it can't be used in a for-in loop. for (collection in x) { ^^^^^^^^^^" in x) { - core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart: Error: A library can't be used as an expression."); + core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:1: Error: A library can't be used as an expression."); } for (final dynamic #t4 in x) { let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const [], core::List::unmodifiable([#t4]), core::Map::unmodifiable(const {}))); @@ -50,7 +50,7 @@ static method main(dynamic arguments) → dynamic { for (final dynamic #t8 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: Can't assign to this, so it can't be used in a for-in loop. for (collection in arguments) { ^^^^^^^^^^" in arguments) { - core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart: Error: A library can't be used as an expression."); + core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:1: Error: A library can't be used as an expression."); } for (final dynamic #t9 in arguments) { let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const [], core::List::unmodifiable([#t9]), core::Map::unmodifiable(const {}))); diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.transformed.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.transformed.expect index 09a7e0c06e9..e72d620b3fa 100644 --- a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.transformed.expect +++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.direct.transformed.expect @@ -19,7 +19,7 @@ class Fisk extends core::Object { for (final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: Can't assign to this, so it can't be used in a for-in loop. for (collection in x) { ^^^^^^^^^^" in x) { - core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart: Error: A library can't be used as an expression."); + core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:1: Error: A library can't be used as an expression."); } for (final dynamic #t4 in x) { let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const [], core::List::unmodifiable([#t4]), core::Map::unmodifiable(const {}))); @@ -50,7 +50,7 @@ static method main(dynamic arguments) → dynamic { for (final dynamic #t8 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: Can't assign to this, so it can't be used in a for-in loop. for (collection in arguments) { ^^^^^^^^^^" in arguments) { - core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart: Error: A library can't be used as an expression."); + core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:1: Error: A library can't be used as an expression."); } for (final dynamic #t9 in arguments) { let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const [], core::List::unmodifiable([#t9]), core::Map::unmodifiable(const {}))); diff --git a/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.expect b/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.expect index bdc26f14a47..70737605eeb 100644 --- a/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.expect +++ b/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.expect @@ -2,5 +2,5 @@ library; import self as self; static method #main() → dynamic { - throw "dart:html: Error: Not found: dart:html."; + throw "dart:html:1: Error: Not found: dart:html."; } diff --git a/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.transformed.expect b/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.transformed.expect index bdc26f14a47..70737605eeb 100644 --- a/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.transformed.expect +++ b/pkg/front_end/testcases/rasta/unsupported_platform_library.dart.direct.transformed.expect @@ -2,5 +2,5 @@ library; import self as self; static method #main() → dynamic { - throw "dart:html: Error: Not found: dart:html."; + throw "dart:html:1: Error: Not found: dart:html."; } diff --git a/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect index 938769074b7..9fbedf891d5 100644 --- a/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect +++ b/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect @@ -8,7 +8,7 @@ class Typed extends core::Object { : super core::Object::•() ; } -static const field dynamic #errors = const ["pkg/front_end/testcases/regress/issue_31190.dart: Error: Can't use type arguments with type variable 'T'. +static const field dynamic #errors = const ["pkg/front_end/testcases/regress/issue_31190.dart:1: Error: Can't use type arguments with type variable 'T'. Try removing the type arguments.", "pkg/front_end/testcases/regress/issue_31190.dart:6:5: Error: 'U' isn't a type. T v; ^", "pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: 'T' expects 0 type arguments. diff --git a/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect index 938769074b7..9fbedf891d5 100644 --- a/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect @@ -8,7 +8,7 @@ class Typed extends core::Object { : super core::Object::•() ; } -static const field dynamic #errors = const ["pkg/front_end/testcases/regress/issue_31190.dart: Error: Can't use type arguments with type variable 'T'. +static const field dynamic #errors = const ["pkg/front_end/testcases/regress/issue_31190.dart:1: Error: Can't use type arguments with type variable 'T'. Try removing the type arguments.", "pkg/front_end/testcases/regress/issue_31190.dart:6:5: Error: 'U' isn't a type. T v; ^", "pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: 'T' expects 0 type arguments. diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart index b34bcdf8159..daceb3cde59 100644 --- a/pkg/front_end/tool/_fasta/command_line.dart +++ b/pkg/front_end/tool/_fasta/command_line.dart @@ -277,8 +277,6 @@ ProcessedOptions analyzeCommandLine( final bool warningsAreFatal = fatal.contains("warnings"); - final bool nitsAreFatal = fatal.contains("nits"); - final bool compileSdk = options.containsKey("--compile-sdk"); if (programName == "compile_platform") { @@ -305,7 +303,6 @@ ProcessedOptions analyzeCommandLine( ..target = target ..throwOnErrorsForDebugging = errorsAreFatal ..throwOnWarningsForDebugging = warningsAreFatal - ..throwOnNitsForDebugging = nitsAreFatal ..embedSourceText = !excludeSource ..debugDump = dumpIr ..verbose = verbose @@ -336,7 +333,6 @@ ProcessedOptions analyzeCommandLine( ..target = target ..throwOnErrorsForDebugging = errorsAreFatal ..throwOnWarningsForDebugging = warningsAreFatal - ..throwOnNitsForDebugging = nitsAreFatal ..embedSourceText = !excludeSource ..debugDump = dumpIr ..verbose = verbose diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart index 20ed01ceff7..eedfdee3ce7 100644 --- a/pkg/vm/bin/kernel_service.dart +++ b/pkg/vm/bin/kernel_service.dart @@ -109,14 +109,12 @@ abstract class Compiler { printMessage = false; // errors are printed by VM errors.add(message.formatted); break; - case Severity.nit: - printMessage = false; - break; case Severity.warning: printMessage = !suppressWarnings; break; case Severity.errorLegacyWarning: case Severity.context: + case Severity.ignored: throw "Unexpected severity: $severity"; } if (printMessage) { diff --git a/pkg/vm/lib/frontend_server.dart b/pkg/vm/lib/frontend_server.dart index dba6fbf07ca..e484146c767 100644 --- a/pkg/vm/lib/frontend_server.dart +++ b/pkg/vm/lib/frontend_server.dart @@ -263,14 +263,12 @@ class FrontendCompiler implements CompilerInterface { printMessage = true; errors.add(message.formatted); break; - case Severity.nit: - printMessage = false; - break; case Severity.warning: printMessage = true; break; case Severity.errorLegacyWarning: case Severity.context: + case Severity.ignored: throw 'Unexpected severity: $severity'; } if (printMessage) { diff --git a/utils/bazel/kernel_summary_worker.dart b/utils/bazel/kernel_summary_worker.dart index 2b1246b5ecd..9ac2ab97376 100644 --- a/utils/bazel/kernel_summary_worker.dart +++ b/utils/bazel/kernel_summary_worker.dart @@ -138,9 +138,7 @@ Future computeSummary(List args, for (fe.FormattedMessage message in context) { out.println(message.formatted); } - if (severity != fe.Severity.nit) { - succeeded = false; - } + succeeded = false; } var summary = await fe.compile(state, sources, onProblem);