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

Unified Diff: lib/src/server/server.dart

Issue 1778623002: DDC: remove dumpInfo flag (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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 | « lib/src/options.dart ('k') | lib/src/transformer/asset_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/server/server.dart
diff --git a/lib/src/server/server.dart b/lib/src/server/server.dart
index b23b8f000263902d1786770f9372603ab02d5186..2a826a22f70cc963b210eba6be7277eccfb4dd90 100644
--- a/lib/src/server/server.dart
+++ b/lib/src/server/server.dart
@@ -86,7 +86,6 @@ class ServerCompiler extends AbstractCompiler {
// dependency_graph.dart). Such failures should be reported back
// here so we can mark failure=true in the CheckerResults.
rebuild(_entryNode, _buildSource);
- _dumpInfoIfRequested();
clock.stop();
var time = (clock.elapsedMilliseconds / 1000).toStringAsFixed(2);
_log.fine('Compiled ${_libraries.length} libraries in ${time} s\n');
@@ -196,17 +195,17 @@ class ServerCompiler extends AbstractCompiler {
}
_dumpInfoIfRequested() {
+ var reporter = this.reporter;
if (reporter is HtmlReporter) {
- (reporter as HtmlReporter).finish(options);
- } else {
- if (!options.dumpInfo || reporter is! SummaryReporter) return;
- var result = (reporter as SummaryReporter).result;
- if (!options.serverMode) print(summaryToString(result));
- var filepath = options.serverMode
- ? path.join(outputDir, 'messages.json')
- : options.dumpInfoFile;
- if (filepath == null) return;
- new File(filepath).writeAsStringSync(JSON.encode(result.toJsonMap()));
+ reporter.finish(options);
+ } else if (reporter is SummaryReporter) {
+ var result = reporter.result;
+ if (outputDir != null) {
+ var filepath = path.join(outputDir, 'messages.json');
+ new File(filepath).writeAsStringSync(JSON.encode(result.toJsonMap()));
+ } else {
+ print(summaryToString(result));
+ }
}
}
}
« no previous file with comments | « lib/src/options.dart ('k') | lib/src/transformer/asset_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698