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

Unified Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 1830733004: Add --build-summary-only-diet option. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/options.dart
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index bf1aa686fe122261372ee6f1390f2ad2c1be1eb4..d6e78fc53e2a43e44b2eb06130bf2328a114ef0d 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -45,6 +45,10 @@ class CommandLineOptions {
/// Whether to skip analysis when creating summaries in build mode.
final bool buildSummaryOnly;
+ /// Whether to use diet parsing, i.e. skip function bodies. We don't need to
+ /// analyze function bodies to use summaries during future compilation steps.
+ final bool buildSummaryOnlyDiet;
+
/// The path to output the summary when creating summaries in build mode.
final String buildSummaryOutput;
@@ -133,6 +137,7 @@ class CommandLineOptions {
buildMode = args['build-mode'],
buildSummaryInputs = args['build-summary-input'],
buildSummaryOnly = args['build-summary-only'],
+ buildSummaryOnlyDiet = args['build-summary-only-diet'],
buildSummaryOutput = args['build-summary-output'],
buildSuppressExitCode = args['build-suppress-exit-code'],
dartSdkPath = args['dart-sdk'],
@@ -209,6 +214,12 @@ class CommandLineOptions {
"Null aware operators are supported by default.");
}
+ // Build mode.
+ if (options.buildSummaryOnlyDiet && !options.buildSummaryOnly) {
+ printAndFail('The option --build-summary-only-diet can be used only '
+ 'together with --build-summary-only.');
+ }
+
return options;
}
@@ -330,6 +341,11 @@ class CommandLineOptions {
defaultsTo: false,
negatable: false,
hide: true)
+ ..addFlag('build-summary-only-diet',
+ help: 'Diet parse function bodies.',
+ defaultsTo: false,
+ negatable: false,
+ hide: true)
..addFlag('build-suppress-exit-code',
help: 'Exit with code 0 even if errors are found.',
defaultsTo: false,
« 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