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

Unified Diff: pkg/analyzer/tool/summary/build_sdk_summaries.dart

Issue 1979333002: Add a `strong-outputs` mode to build_sdk_summaries.dart. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/build_sdk_summaries.dart
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 8a9adb81263b9089647317a443a449cb1efdce40..9d1c34b590c46f341a2a6fee2a8787a8653d01f2 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -19,7 +19,10 @@ main(List<String> args) {
return;
}
String command = args[0];
- if (command == 'multiple-outputs' && args.length >= 2 && args.length <= 3) {
+ if ((command == 'multiple-outputs' || command == 'strong-outputs') &&
+ args.length >= 2 &&
+ args.length <= 3) {
+ bool includeSpec = command != 'strong-outputs';
//
// Prepare the output path.
//
@@ -34,7 +37,7 @@ main(List<String> args) {
// Prepare results.
//
String sdkPath = args.length > 2 ? args[2] : null;
- _Output output = _buildMultipleOutputs(sdkPath);
+ _Output output = _buildMultipleOutputs(sdkPath, includeSpec);
if (output == null) {
exitCode = 1;
return;
@@ -42,7 +45,9 @@ main(List<String> args) {
//
// Write results.
//
- output.spec.writeMultiple(outputDirectoryPath, 'spec');
+ if (includeSpec) {
+ output.spec.writeMultiple(outputDirectoryPath, 'spec');
+ }
output.strong.writeMultiple(outputDirectoryPath, 'strong');
} else if (command == 'single-output' &&
args.length >= 2 &&
@@ -52,7 +57,7 @@ main(List<String> args) {
//
// Prepare results.
//
- _Output output = _buildMultipleOutputs(sdkPath);
+ _Output output = _buildMultipleOutputs(sdkPath, true);
if (output == null) {
exitCode = 1;
return;
@@ -106,7 +111,7 @@ const int _FIELD_SPEC_SUM = 0;
const int _FIELD_STRONG_INDEX = 3;
const int _FIELD_STRONG_SUM = 2;
-_Output _buildMultipleOutputs(String sdkPath) {
+_Output _buildMultipleOutputs(String sdkPath, bool includeSpec) {
//
// Validate the SDK path.
//
@@ -122,7 +127,8 @@ _Output _buildMultipleOutputs(String sdkPath) {
//
// Build spec and strong outputs.
//
- _BuilderOutput spec = new _Builder(sdkPath, false).build();
+ _BuilderOutput spec =
+ includeSpec ? new _Builder(sdkPath, false).build() : null;
_BuilderOutput strong = new _Builder(sdkPath, true).build();
return new _Output(spec, strong);
}
@@ -148,6 +154,8 @@ void _printUsage() {
print('Where command can be one of the following:');
print(' multiple-outputs output_directory_path [sdk_path]');
print(' Generate separate summary and index files.');
+ print(' strong-outputs output_directory_path [sdk_path]');
+ print(' Generate separate summary and index files (strong mode only).');
print(' single-output output_file_path [sdk_path]');
print(' Generate a single file with summary and index.');
print(' extract-spec-sum input_file output_file');
« 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