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

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

Issue 1979193010: Fix for analyzer-cli and the new SummaryBasedDartSdk 'strongMode' parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/driver.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/ast/ast.dart' show CompilationUnit; 10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return maxSeverity; 238 return maxSeverity;
239 } 239 }
240 240
241 void _createContext() { 241 void _createContext() {
242 // Read the summaries. 242 // Read the summaries.
243 summaryDataStore = new SummaryDataStore(options.buildSummaryInputs); 243 summaryDataStore = new SummaryDataStore(options.buildSummaryInputs);
244 244
245 DartSdk sdk; 245 DartSdk sdk;
246 PackageBundle sdkBundle; 246 PackageBundle sdkBundle;
247 if (options.dartSdkSummaryPath != null) { 247 if (options.dartSdkSummaryPath != null) {
248 SummaryBasedDartSdk summarySdk = 248 SummaryBasedDartSdk summarySdk = new SummaryBasedDartSdk(
249 new SummaryBasedDartSdk(options.dartSdkSummaryPath); 249 options.dartSdkSummaryPath, options.strongMode);
250 sdk = summarySdk; 250 sdk = summarySdk;
251 sdkBundle = summarySdk.bundle; 251 sdkBundle = summarySdk.bundle;
252 } else { 252 } else {
253 DirectoryBasedDartSdk directorySdk = 253 DirectoryBasedDartSdk directorySdk =
254 new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); 254 new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
255 directorySdk.analysisOptions = 255 directorySdk.analysisOptions =
256 Driver.createAnalysisOptionsForCommandLineOptions(options); 256 Driver.createAnalysisOptionsForCommandLineOptions(options);
257 directorySdk.useSummary = !options.buildSummaryOnlyAst; 257 directorySdk.useSummary = !options.buildSummaryOnlyAst;
258 sdk = directorySdk; 258 sdk = directorySdk;
259 sdkBundle = directorySdk.getSummarySdkBundle(); 259 sdkBundle = directorySdk.getSummarySdkBundle();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 'Illegal input file (must be "\$uri|\$path"): $sourceFile'); 370 'Illegal input file (must be "\$uri|\$path"): $sourceFile');
371 return null; 371 return null;
372 } 372 }
373 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex)); 373 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex));
374 String path = sourceFile.substring(pipeIndex + 1); 374 String path = sourceFile.substring(pipeIndex + 1);
375 uriToFileMap[uri] = new JavaFile(path); 375 uriToFileMap[uri] = new JavaFile(path);
376 } 376 }
377 return uriToFileMap; 377 return uriToFileMap;
378 } 378 }
379 } 379 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698