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

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

Issue 2356523002: Remove fallback mode and corresponding cli flag. (Closed)
Patch Set: Created 4 years, 3 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
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 && 192 excludeHashes: options.buildSummaryExcludeInformative &&
193 options.buildSummaryOutputSemantic == null); 193 options.buildSummaryOutputSemantic == null);
194 if (_shouldOutputSummary) { 194 if (_shouldOutputSummary) {
195 if (!options.buildSummaryFallback) { 195 _serializeAstBasedSummary(explicitSources);
196 _serializeAstBasedSummary(explicitSources);
197 } else {
198 for (Source source in explicitSources) {
199 assembler.addFallbackUnit(source);
200 }
201 }
202 // Write the whole package bundle. 196 // Write the whole package bundle.
203 assembler.recordDependencies(summaryDataStore); 197 assembler.recordDependencies(summaryDataStore);
204 PackageBundleBuilder bundle = assembler.assemble(); 198 PackageBundleBuilder bundle = assembler.assemble();
205 if (options.buildSummaryExcludeInformative) { 199 if (options.buildSummaryExcludeInformative) {
206 bundle.flushInformative(); 200 bundle.flushInformative();
207 } 201 }
208 if (options.buildSummaryOutput != null) { 202 if (options.buildSummaryOutput != null) {
209 io.File file = new io.File(options.buildSummaryOutput); 203 io.File file = new io.File(options.buildSummaryOutput);
210 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY); 204 file.writeAsBytesSync(bundle.toBuffer(), mode: io.FileMode.WRITE_ONLY);
211 } 205 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 * Build the inverse mapping of [uriToSourceMap]. 408 * Build the inverse mapping of [uriToSourceMap].
415 */ 409 */
416 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) { 410 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) {
417 Map<String, Uri> pathToUriMap = <String, Uri>{}; 411 Map<String, Uri> pathToUriMap = <String, Uri>{};
418 uriToSourceMap.forEach((Uri uri, File file) { 412 uriToSourceMap.forEach((Uri uri, File file) {
419 pathToUriMap[file.path] = uri; 413 pathToUriMap[file.path] = uri;
420 }); 414 });
421 return pathToUriMap; 415 return pathToUriMap;
422 } 416 }
423 } 417 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698