| Index: pkg/front_end/lib/src/fasta/deprecated_problems.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/deprecated_problems.dart b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
|
| index 90897d9eeae9ec76da1194649b12facc80bcceed..00ab3370569f2ab25e060f30c5bca8a5ec37f6ff 100644
|
| --- a/pkg/front_end/lib/src/fasta/deprecated_problems.dart
|
| +++ b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
|
| @@ -26,6 +26,13 @@ bool hasCrashed = false;
|
| /// [resetCrashReporting].
|
| Uri firstSourceUri;
|
|
|
| +/// This flag is a temporary solution for preventing printing a lot
|
| +/// of information on the console. Analyzer starts using Fasta to generate
|
| +/// kernels to resynthesize its element models from it. We don't want to
|
| +/// see all these errors and warnings on the console, while running test or
|
| +/// in production. TODO(scheglov): remove this flag eventually.
|
| +bool temporaryUntilPrintsRemovedEnablePrinting = true;
|
| +
|
| /// Used to report an error in input.
|
| ///
|
| /// Avoid using this for reporting compile-time errors, instead use
|
| @@ -50,7 +57,9 @@ String deprecated_printUnexpected(Uri uri, int charOffset, String message) {
|
| if (isVerbose) print(StackTrace.current);
|
| throw new deprecated_InputError(uri, charOffset, message);
|
| }
|
| - print(formattedMessage);
|
| + if (temporaryUntilPrintsRemovedEnablePrinting) {
|
| + print(formattedMessage);
|
| + }
|
| return formattedMessage;
|
| }
|
|
|
|
|