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

Side by Side Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 2709633006: Remove some unused flags for the analyzer cli's build mode. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer_cli.src.build_mode; 5 library analyzer_cli.src.build_mode;
6 6
7 import 'dart:core'; 7 import 'dart:core';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 9
10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; 10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Perform full analysis. 181 // Perform full analysis.
182 while (true) { 182 while (true) {
183 AnalysisResult analysisResult = context.performAnalysisTask(); 183 AnalysisResult analysisResult = context.performAnalysisTask();
184 if (!analysisResult.hasMoreWork) { 184 if (!analysisResult.hasMoreWork) {
185 break; 185 break;
186 } 186 }
187 } 187 }
188 } 188 }
189 189
190 // Write summary. 190 // Write summary.
191 assembler = new PackageBundleAssembler( 191 assembler = new PackageBundleAssembler();
192 excludeHashes: options.buildSummaryExcludeInformative &&
193 options.buildSummaryOutputSemantic == null);
194 if (_shouldOutputSummary) { 192 if (_shouldOutputSummary) {
195 _serializeAstBasedSummary(explicitSources); 193 _serializeAstBasedSummary(explicitSources);
196 // Write the whole package bundle. 194 // Write the whole package bundle.
197 assembler.recordDependencies(summaryDataStore); 195 assembler.recordDependencies(summaryDataStore);
198 PackageBundleBuilder bundle = assembler.assemble(); 196 PackageBundleBuilder bundle = assembler.assemble();
199 if (options.buildSummaryExcludeInformative) {
200 bundle.flushInformative();
201 }
202 if (options.buildSummaryOutput != null) { 197 if (options.buildSummaryOutput != null) {
203 io.File file = new io.File(options.buildSummaryOutput); 198 io.File file = new io.File(options.buildSummaryOutput);
204 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY); 199 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
205 } 200 }
206 if (options.buildSummaryOutputSemantic != null) { 201 if (options.buildSummaryOutputSemantic != null) {
207 bundle.flushInformative(); 202 bundle.flushInformative();
208 io.File file = new io.File(options.buildSummaryOutputSemantic); 203 io.File file = new io.File(options.buildSummaryOutputSemantic);
209 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY); 204 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
210 } 205 }
211 } 206 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 * Build the inverse mapping of [uriToSourceMap]. 411 * Build the inverse mapping of [uriToSourceMap].
417 */ 412 */
418 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) { 413 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) {
419 Map<String, Uri> pathToUriMap = <String, Uri>{}; 414 Map<String, Uri> pathToUriMap = <String, Uri>{};
420 uriToSourceMap.forEach((Uri uri, File file) { 415 uriToSourceMap.forEach((Uri uri, File file) {
421 pathToUriMap[file.path] = uri; 416 pathToUriMap[file.path] = uri;
422 }); 417 });
423 return pathToUriMap; 418 return pathToUriMap;
424 } 419 }
425 } 420 }
OLDNEW
« 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