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

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

Issue 1988853002: When in strong mode, analyze with dart2js paths. (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 | 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 return errorSeverity; 610 return errorSeverity;
611 } 611 }
612 612
613 void _setupSdk(CommandLineOptions options, bool hasEmbedder) { 613 void _setupSdk(CommandLineOptions options, bool hasEmbedder) {
614 if (sdk == null) { 614 if (sdk == null) {
615 if (options.dartSdkSummaryPath != null) { 615 if (options.dartSdkSummaryPath != null) {
616 sdk = new SummaryBasedDartSdk( 616 sdk = new SummaryBasedDartSdk(
617 options.dartSdkSummaryPath, options.strongMode); 617 options.dartSdkSummaryPath, options.strongMode);
618 } else { 618 } else {
619 String dartSdkPath = options.dartSdkPath; 619 String dartSdkPath = options.dartSdkPath;
620 DirectoryBasedDartSdk directorySdk = 620 DirectoryBasedDartSdk directorySdk = new DirectoryBasedDartSdk(
621 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath)); 621 new JavaFile(dartSdkPath), options.strongMode);
622 // Summaries are disabled in the presence of embedders. 622 // Summaries are disabled in the presence of embedders.
623 if (hasEmbedder) { 623 if (hasEmbedder) {
624 directorySdk.useSummary = false; 624 directorySdk.useSummary = false;
625 } else { 625 } else {
626 directorySdk.useSummary = 626 directorySdk.useSummary =
627 options.sourceFiles.every((String sourcePath) { 627 options.sourceFiles.every((String sourcePath) {
628 sourcePath = path.absolute(sourcePath); 628 sourcePath = path.absolute(sourcePath);
629 sourcePath = path.normalize(sourcePath); 629 sourcePath = path.normalize(sourcePath);
630 return !path.isWithin(dartSdkPath, sourcePath); 630 return !path.isWithin(dartSdkPath, sourcePath);
631 }); 631 });
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 for (var package in packages) { 830 for (var package in packages) {
831 var packageName = path.basename(package.path); 831 var packageName = path.basename(package.path);
832 var realPath = package.resolveSymbolicLinksSync(); 832 var realPath = package.resolveSymbolicLinksSync();
833 result[packageName] = [ 833 result[packageName] = [
834 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 834 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
835 ]; 835 ];
836 } 836 }
837 return result; 837 return result;
838 } 838 }
839 } 839 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698