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

Side by Side Diff: pkg/analyzer/tool/summary/build_sdk_summaries.dart

Issue 2242853002: Deprecate DirectoryBasedDartSdk and transition existing uses to the new API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 import 'dart:io'; 1 import 'dart:io';
2 2
3 import 'package:analyzer/src/generated/sdk_io.dart'; 3 import 'package:analyzer/file_system/physical_file_system.dart';
4 import 'package:analyzer/src/dart/sdk/sdk.dart';
4 import 'package:analyzer/src/summary/flat_buffers.dart' as fb; 5 import 'package:analyzer/src/summary/flat_buffers.dart' as fb;
5 import 'package:analyzer/src/summary/summary_file_builder.dart'; 6 import 'package:analyzer/src/summary/summary_file_builder.dart';
6 7
7 main(List<String> args) { 8 main(List<String> args) {
8 if (args.length < 1) { 9 if (args.length < 1) {
9 _printUsage(); 10 _printUsage();
10 exitCode = 1; 11 exitCode = 1;
11 return; 12 return;
12 } 13 }
13 String command = args[0]; 14 String command = args[0];
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // 92 //
92 // Validate the SDK path. 93 // Validate the SDK path.
93 // 94 //
94 if (sdkPath != null) { 95 if (sdkPath != null) {
95 if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) { 96 if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) {
96 print("'$sdkPath/lib' does not exist."); 97 print("'$sdkPath/lib' does not exist.");
97 _printUsage(); 98 _printUsage();
98 return null; 99 return null;
99 } 100 }
100 } else { 101 } else {
101 sdkPath = DirectoryBasedDartSdk.defaultSdkDirectory.getAbsolutePath(); 102 sdkPath = FolderBasedDartSdk
103 .defaultSdkDirectory(PhysicalResourceProvider.INSTANCE)
104 .path;
102 } 105 }
103 106
104 // 107 //
105 // Build spec and strong outputs. 108 // Build spec and strong outputs.
106 // 109 //
107 BuilderOutput spec = includeSpec ? _buildOutput(sdkPath, false) : null; 110 BuilderOutput spec = includeSpec ? _buildOutput(sdkPath, false) : null;
108 BuilderOutput strong = _buildOutput(sdkPath, true); 111 BuilderOutput strong = _buildOutput(sdkPath, true);
109 return new SummaryOutput(spec, strong); 112 return new SummaryOutput(spec, strong);
110 } 113 }
111 114
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 print(' Generate a single file with summary and index.'); 150 print(' Generate a single file with summary and index.');
148 print(' extract-spec-sum input_file output_file'); 151 print(' extract-spec-sum input_file output_file');
149 print(' Extract the spec-mode summary file.'); 152 print(' Extract the spec-mode summary file.');
150 print(' extract-strong-sum input_file output_file'); 153 print(' extract-strong-sum input_file output_file');
151 print(' Extract the strong-mode summary file.'); 154 print(' Extract the strong-mode summary file.');
152 print(' extract-spec-index input_file output_file'); 155 print(' extract-spec-index input_file output_file');
153 print(' Extract the spec-mode index file.'); 156 print(' Extract the spec-mode index file.');
154 print(' extract-strong-index input_file output_file'); 157 print(' extract-strong-index input_file output_file');
155 print(' Extract the strong-mode index file.'); 158 print(' Extract the strong-mode index file.');
156 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698