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

Unified Diff: lib/dwc.dart

Issue 11450020: (Fix #215) better error printing in editor & extension, adds mapping for editor (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years 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
Index: lib/dwc.dart
diff --git a/lib/dwc.dart b/lib/dwc.dart
index dfa89ad87618a2af66f4bcbd83ed5a83dab3e426..d0e791ece9653de90b6e66d5daad3a4629eaa7b9 100755
--- a/lib/dwc.dart
+++ b/lib/dwc.dart
@@ -72,7 +72,10 @@ Future<CompilerResult> run(List<String> args) {
.transform((_) => (res = new CompilerResult._(messages, compiler.output)))
.chain((_) => symlinkPubPackages(res, options))
.chain((_) => emitFiles(compiler.output, options.clean))
- .transform((_) => res);
+ .transform((_) {
+ _printMessages(messages, options);
Jennifer Messerly 2012/12/06 04:00:08 Messages should be printed as we emit them, not al
Siggi Cherem (dart-lang) 2012/12/06 18:46:42 I don't necessarily agree, but I think I might be
+ return res;
+ });
}, printTime: true, useColors: options.useColors);
}
@@ -102,6 +105,16 @@ void _createIfNeeded(Path outdir) {
}
}
+void _printMessages(Messages messages, CompilerOptions options) {
+ for (var message in messages.messages) {
Jennifer Messerly 2012/12/06 04:00:08 verbose messages are always printed now?
Siggi Cherem (dart-lang) 2012/12/06 18:46:42 Fixed.
+ if (options.jsonFormat) {
+ print(message.toJson());
+ } else {
+ print(message);
+ }
+ }
+}
+
/**
* Creates a symlink to the pub packages directory in the output location. The
* returned future completes when the symlink was created (or immediately if it

Powered by Google App Engine
This is Rietveld 408576698