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

Unified Diff: tools/patch_sdk.dart

Issue 2711963002: Temporarily suppress fasta compiler hints/warnings/errors during compiling platform.dill file for t… (Closed)
Patch Set: Capture lines and report them in case an exception occurs Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/patch_sdk.dart
diff --git a/tools/patch_sdk.dart b/tools/patch_sdk.dart
index 394d5688fb1d9a87010ece60fdc18acf72ee3d90..c5509ecd588b0d8e898440f73d5b76b5f8bf5b2e 100644
--- a/tools/patch_sdk.dart
+++ b/tools/patch_sdk.dart
@@ -7,6 +7,7 @@
/// This is currently designed as an offline tool, but we could automate it.
import 'dart:io';
+import 'dart:async';
import 'dart:math' as math;
import 'package:analyzer/analyzer.dart';
@@ -194,12 +195,28 @@ Future main(List<String> argv) async {
}
}
- await compile_platform.main(<String>[
- '--packages',
- new Uri.file(packagesFile).toString(),
- sdkOut,
- path.join(sdkOut, 'platform.dill')
- ]);
+ // TODO(kustermann): We suppress compiler hints/warnings/errors temporarily
+ // because everyone building the `runtime` target will get these now.
+ // We should remove the suppression again once the underlying issues have
+ // been fixed (either in fasta or the dart files in the patched_sdk).
+ final capturedLines = <String>[];
+ try {
+ await runZoned(() async {
+ await compile_platform.main(<String>[
+ '--packages',
+ new Uri.file(packagesFile).toString(),
+ sdkOut,
+ path.join(sdkOut, 'platform.dill')
+ ]);
+ }, zoneSpecification: new ZoneSpecification(print: (_, _2, _3, line) {
+ capturedLines.add(line);
+ }));
+ } catch (_) {
+ for (final line in capturedLines) {
+ print(line);
+ }
+ rethrow;
+ }
}
/// Writes a file, creating the directory if needed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698