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

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.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 | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | 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.driver; 5 library analyzer_cli.src.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 580 }
581 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) { 581 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) {
582 exitCode = errorSeverity.ordinal; 582 exitCode = errorSeverity.ordinal;
583 } 583 }
584 return errorSeverity; 584 return errorSeverity;
585 } 585 }
586 586
587 void _setupSdk(CommandLineOptions options) { 587 void _setupSdk(CommandLineOptions options) {
588 if (sdk == null) { 588 if (sdk == null) {
589 if (options.dartSdkSummaryPath != null) { 589 if (options.dartSdkSummaryPath != null) {
590 sdk = new SummaryBasedDartSdk(options.dartSdkSummaryPath); 590 sdk = new SummaryBasedDartSdk(
591 options.dartSdkSummaryPath, options.strongMode);
591 } else { 592 } else {
592 String dartSdkPath = options.dartSdkPath; 593 String dartSdkPath = options.dartSdkPath;
593 DirectoryBasedDartSdk directorySdk = 594 DirectoryBasedDartSdk directorySdk =
594 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath)); 595 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath));
595 directorySdk.useSummary = 596 directorySdk.useSummary =
596 options.sourceFiles.every((String sourcePath) { 597 options.sourceFiles.every((String sourcePath) {
597 sourcePath = path.absolute(sourcePath); 598 sourcePath = path.absolute(sourcePath);
598 sourcePath = path.normalize(sourcePath); 599 sourcePath = path.normalize(sourcePath);
599 return !path.isWithin(dartSdkPath, sourcePath); 600 return !path.isWithin(dartSdkPath, sourcePath);
600 }); 601 });
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 for (var package in packages) { 793 for (var package in packages) {
793 var packageName = path.basename(package.path); 794 var packageName = path.basename(package.path);
794 var realPath = package.resolveSymbolicLinksSync(); 795 var realPath = package.resolveSymbolicLinksSync();
795 result[packageName] = [ 796 result[packageName] = [
796 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 797 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
797 ]; 798 ];
798 } 799 }
799 return result; 800 return result;
800 } 801 }
801 } 802 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698