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

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

Issue 1830733004: Add --build-summary-only-diet option. (Closed) Base URL: git@github.com:dart-lang/sdk.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 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' hide Resource; 7 import 'dart:core' hide Resource;
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 9
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Create the context. 138 // Create the context.
139 context = AnalysisEngine.instance.createAnalysisContext(); 139 context = AnalysisEngine.instance.createAnalysisContext();
140 context.sourceFactory = new SourceFactory(<UriResolver>[ 140 context.sourceFactory = new SourceFactory(<UriResolver>[
141 new DartUriResolver(sdk), 141 new DartUriResolver(sdk),
142 new InSummaryPackageUriResolver(summaryDataStore), 142 new InSummaryPackageUriResolver(summaryDataStore),
143 new ExplicitSourceResolver(uriToFileMap) 143 new ExplicitSourceResolver(uriToFileMap)
144 ]); 144 ]);
145 145
146 // Set context options. 146 // Set context options.
147 Driver.setAnalysisContextOptions( 147 Driver.setAnalysisContextOptions(
148 context, options, (AnalysisOptionsImpl contextOptions) {}); 148 context, options, (AnalysisOptionsImpl contextOptions) {
149 if (options.buildSummaryOnlyDiet) {
150 contextOptions.analyzeFunctionBodies = false;
151 }
152 });
149 153
150 // Configure using summaries. 154 // Configure using summaries.
151 context.typeProvider = sdk.context.typeProvider; 155 context.typeProvider = sdk.context.typeProvider;
152 context.resultProvider = 156 context.resultProvider =
153 new InputPackagesResultProvider(context, summaryDataStore); 157 new InputPackagesResultProvider(context, summaryDataStore);
154 } 158 }
155 159
156 /** 160 /**
157 * Print errors for all explicit sources. If [outputPath] is supplied, output 161 * Print errors for all explicit sources. If [outputPath] is supplied, output
158 * is sent to a new file at that path. 162 * is sent to a new file at that path.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 'Illegal input file (must be "\$uri|\$path"): $sourceFile'); 199 'Illegal input file (must be "\$uri|\$path"): $sourceFile');
196 return null; 200 return null;
197 } 201 }
198 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex)); 202 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex));
199 String path = sourceFile.substring(pipeIndex + 1); 203 String path = sourceFile.substring(pipeIndex + 1);
200 uriToFileMap[uri] = new JavaFile(path); 204 uriToFileMap[uri] = new JavaFile(path);
201 } 205 }
202 return uriToFileMap; 206 return uriToFileMap;
203 } 207 }
204 } 208 }
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