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

Unified Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 2104003004: Add option "--build-summary-output-semantic" to analyzer_cli. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/build_mode.dart
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 879ec69787978c60890d288998a0181102681244..f79e4012f324a6699eb51b73a3a6af328f237e6f 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -184,8 +184,10 @@ class BuildMode {
// Write summary.
assembler = new PackageBundleAssembler(
- excludeHashes: options.buildSummaryExcludeInformative);
- if (options.buildSummaryOutput != null) {
+ excludeHashes: options.buildSummaryExcludeInformative &&
+ options.buildSummaryOutputSemantic == null);
+ if (options.buildSummaryOutput != null ||
+ options.buildSummaryOutputSemantic != null) {
if (options.buildSummaryOnlyAst && !options.buildSummaryFallback) {
_serializeAstBasedSummary(explicitSources);
} else {
@@ -209,8 +211,17 @@ class BuildMode {
if (options.buildSummaryExcludeInformative) {
sdkBundle.flushInformative();
}
- io.File file = new io.File(options.buildSummaryOutput);
- file.writeAsBytesSync(sdkBundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
+ if (options.buildSummaryOutput != null) {
+ io.File file = new io.File(options.buildSummaryOutput);
+ file.writeAsBytesSync(sdkBundle.toBuffer(),
+ mode: io.FileMode.WRITE_ONLY);
+ }
+ if (options.buildSummaryOutputSemantic != null) {
+ sdkBundle.flushInformative();
+ io.File file = new io.File(options.buildSummaryOutputSemantic);
+ file.writeAsBytesSync(sdkBundle.toBuffer(),
+ mode: io.FileMode.WRITE_ONLY);
+ }
}
if (options.buildSummaryOnly) {
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698