Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 1382143005: Limit hints on empty hide on package imports. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 1fc10e38df5a398ba7af21dd7064d84a2394e813..e515631bdb9163d8f06ebf1a796f860c2402b6ad 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -24,7 +24,8 @@ import 'common/tasks.dart' show
GenericTask;
import 'compiler.dart' as leg;
import 'diagnostics/diagnostic_listener.dart' show
- DiagnosticMessage;
+ DiagnosticMessage,
+ DiagnosticOptions;
import 'diagnostics/messages.dart';
import 'diagnostics/source_span.dart' show
SourceSpan;
@@ -97,22 +98,24 @@ class Compiler extends leg.Compiler {
verbose: hasOption(options, Flags.verbose),
sourceMapUri: extractUriOption(options, '--source-map='),
outputUri: extractUriOption(options, '--out='),
- terseDiagnostics: hasOption(options, Flags.terse),
deferredMapUri: extractUriOption(options, '--deferred-map='),
dumpInfo: hasOption(options, Flags.dumpInfo),
buildId: extractStringOption(
options, '--build-id=',
"build number could not be determined"),
- showPackageWarnings:
- hasOption(options, Flags.showPackageWarnings),
useContentSecurityPolicy:
hasOption(options, Flags.useContentSecurityPolicy),
useStartupEmitter: hasOption(options, Flags.fastStartup),
hasIncrementalSupport:
forceIncrementalSupport ||
hasOption(options, Flags.incrementalSupport),
- suppressWarnings: hasOption(options, Flags.suppressWarnings),
- fatalWarnings: hasOption(options, Flags.fatalWarnings),
+ diagnosticOptions: new DiagnosticOptions(
+ suppressWarnings: hasOption(options, Flags.suppressWarnings),
+ fatalWarnings: hasOption(options, Flags.fatalWarnings),
+ suppressHints: hasOption(options, Flags.suppressHints),
+ terseDiagnostics: hasOption(options, Flags.terse),
+ showPackageWarnings:
+ hasOption(options, Flags.showPackageWarnings)),
enableExperimentalMirrors:
hasOption(options, Flags.enableExperimentalMirrors),
enableAssertMessage:
@@ -477,9 +480,11 @@ class Compiler extends leg.Compiler {
void reportDiagnostic(DiagnosticMessage message,
List<DiagnosticMessage> infos,
api.Diagnostic kind) {
+ // TODO(johnniwinther): Move this to the [DiagnosticReporter]?
if (kind == api.Diagnostic.ERROR ||
kind == api.Diagnostic.CRASH ||
- (fatalWarnings && kind == api.Diagnostic.WARNING)) {
+ (reporter.options.fatalWarnings &&
+ kind == api.Diagnostic.WARNING)) {
compilationFailed = true;
}
_reportDiagnosticMessage(message, kind);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698