aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java34
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java14
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java77
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java32
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java39
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java90
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java67
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java14
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java98
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java19
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/mobileinstall/MobileInstallCommand.java75
14 files changed, 394 insertions, 181 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java
index a8ade4e882..187aa12e23 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java
@@ -20,8 +20,10 @@ import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.common.options.EnumConverter;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
@@ -61,6 +63,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "show_progress",
defaultValue = "true",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Display progress messages during a build."
)
public boolean showProgress;
@@ -69,6 +73,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "show_task_finish",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Display progress messages when tasks complete, not just when they start."
)
public boolean showTaskFinish;
@@ -77,6 +83,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "show_progress_rate_limit",
defaultValue = "0.03", // A nice middle ground; snappy but not too spammy in logs.
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Minimum number of seconds between progress messages in the output."
)
public double showProgressRateLimit;
@@ -86,6 +94,8 @@ public class BlazeCommandEventHandler implements EventHandler {
defaultValue = "auto",
converter = UseColorConverter.class,
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Use terminal controls to colorize output."
)
public UseColor useColorEnum;
@@ -95,6 +105,8 @@ public class BlazeCommandEventHandler implements EventHandler {
defaultValue = "auto",
converter = UseCursesConverter.class,
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Use terminal cursor controls to minimize scrolling output"
)
public UseCurses useCursesEnum;
@@ -103,6 +115,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "terminal_columns",
defaultValue = "80",
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "A system-generated parameter which specifies the terminal width in columns."
)
public int terminalColumns;
@@ -111,6 +125,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "isatty",
defaultValue = "false",
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"A system-generated parameter which is used to notify the "
+ "server whether this client is running in a terminal. "
@@ -126,6 +142,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "emacs",
defaultValue = "false",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"A system-generated parameter which is true iff EMACS=t or INSIDE_EMACS is set "
+ "in the environment of the client. This option controls certain display "
@@ -137,6 +155,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "show_timestamps",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Include timestamps in messages"
)
public boolean showTimestamp;
@@ -145,6 +165,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "progress_in_terminal_title",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Show the command progress in the terminal title. "
+ "Useful to see what blaze is doing when having multiple terminal tabs."
@@ -155,6 +177,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "experimental_external_repositories",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Use external repositories for improved stability and speed when available."
)
public boolean externalRepositories;
@@ -163,6 +187,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "force_experimental_external_repositories",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Forces --experimental_external_repositories."
)
public boolean forceExternalRepositories;
@@ -171,6 +197,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "experimental_ui",
defaultValue = "false",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Switches to an alternative progress bar that more explicitly shows progress, such "
+ "as loaded packages and executed actions."
@@ -181,6 +209,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "experimental_ui_debug_all_events",
defaultValue = "false",
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Report all events known to the experimental new Bazel UI."
)
public boolean experimentalUiDebugAllEvents;
@@ -189,6 +219,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "experimental_ui_actions_shown",
defaultValue = "3",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Number of concurrent actions shown in the alternative progress bar; each "
+ "action is shown on a separate line. The alternative progress bar always shows "
@@ -201,6 +233,8 @@ public class BlazeCommandEventHandler implements EventHandler {
name = "experimental_ui_limit_console_output",
defaultValue = "0",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Number of bytes to which the experimental UI will limit its output (non-positive "
+ "values indicate unlimited). Once the limit is approaching, the experimental UI "
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
index 8e242f012d..17fb032ac5 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
@@ -298,6 +298,7 @@ public class BlazeServerStartupOptions extends OptionsBase {
@Option(
name = "fatal_event_bus_exceptions",
defaultValue = "false", // NOTE: purely decorative!
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
effectTags = {OptionEffectTag.EAGERNESS_TO_EXIT, OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Whether or not to exit if an exception is thrown by an internal EventBus handler."
@@ -322,6 +323,7 @@ public class BlazeServerStartupOptions extends OptionsBase {
defaultValue = "false",
category = "server startup",
documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
+ effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = OptionMetadataTag.DEPRECATED,
help =
"If true, %{product} tries to use the operating system's file watch service for local "
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index bb784a8b06..110ef96b95 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -105,6 +105,7 @@ public class CommonCommandOptions extends OptionsBase {
name = "all_incompatible_changes",
defaultValue = "null",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
expansionFunction = AllIncompatibleChangesExpansion.class,
@@ -118,6 +119,7 @@ public class CommonCommandOptions extends OptionsBase {
name = "config",
defaultValue = "",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
allowMultiple = true,
help =
@@ -144,6 +146,7 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "client_env",
defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
converter = Converters.AssignmentConverter.class,
@@ -156,7 +159,9 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "ignore_client_env",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
+ effectTags = {OptionEffectTag.NO_OP},
metadataTags = OptionMetadataTag.DEPRECATED,
deprecationWarning = "Deprecated, no-op.",
help = "Deprecated, no-op."
@@ -168,6 +173,7 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "client_cwd",
defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
converter = OptionsUtils.PathFragmentConverter.class,
@@ -194,6 +200,7 @@ public class CommonCommandOptions extends OptionsBase {
name = "default_override",
defaultValue = "",
allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
converter = OptionOverrideConverter.class,
@@ -206,6 +213,7 @@ public class CommonCommandOptions extends OptionsBase {
name = "rc_source",
defaultValue = "",
allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
help = ""
@@ -215,6 +223,7 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "always_profile_slow_operations",
defaultValue = "true",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
help = "Whether profiling slow operations is always turned on"
@@ -225,6 +234,7 @@ public class CommonCommandOptions extends OptionsBase {
name = "allow_undefined_configs",
defaultValue = "true",
category = "flags",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.EAGERNESS_TO_EXIT},
help = "Do not throw an error when the config is not defined."
)
@@ -272,6 +282,8 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "gc_watchdog",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
metadataTags = {OptionMetadataTag.DEPRECATED},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
deprecationWarning = "Ignoring: this option is no longer supported",
@@ -342,6 +354,7 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "experimental_allow_project_files",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
@@ -352,6 +365,7 @@ public class CommonCommandOptions extends OptionsBase {
@Option(
name = "block_for_lock",
defaultValue = "true",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
optionUsageRestrictions = OptionUsageRestrictions.HIDDEN,
help =
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
index 158b661d36..3661b1ecc0 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
@@ -15,8 +15,9 @@
package com.google.devtools.build.lib.runtime;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
-
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.List;
/**
@@ -28,39 +29,57 @@ import java.util.List;
*/
public class HostJvmStartupOptions extends OptionsBase {
- @Option(name = "host_javabase",
- defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
- category = "host jvm startup",
- valueHelp = "<jvm path>",
- help = "Path to the JVM used to execute Blaze itself.")
+ @Option(
+ name = "host_javabase",
+ defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
+ category = "host jvm startup",
+ valueHelp = "<jvm path>",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Path to the JVM used to execute Blaze itself."
+ )
public String hostJavabase;
- @Option(name = "host_jvm_args",
- defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
- category = "host jvm startup",
- allowMultiple = true,
- valueHelp = "<jvm_arg>",
- help = "Flags to pass to the JVM executing Blaze.")
+ @Option(
+ name = "host_jvm_args",
+ defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
+ category = "host jvm startup",
+ allowMultiple = true,
+ valueHelp = "<jvm_arg>",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Flags to pass to the JVM executing Blaze."
+ )
public List<String> hostJvmArgs;
- @Option(name = "host_jvm_profile",
- defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
- category = "host jvm startup",
- valueHelp = "<profiler_name>",
- help = "Convenience option to add some profiler/debugger-specific JVM startup flags. "
- + "Blaze has a list of known values that it maps to hard-coded JVM startup flags, "
- + "possibly searching some hardcoded paths for certain files.")
+ @Option(
+ name = "host_jvm_profile",
+ defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
+ category = "host jvm startup",
+ valueHelp = "<profiler_name>",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Convenience option to add some profiler/debugger-specific JVM startup flags. "
+ + "Blaze has a list of known values that it maps to hard-coded JVM startup flags, "
+ + "possibly searching some hardcoded paths for certain files."
+ )
public String hostJvmProfile;
- @Option(name = "host_jvm_debug",
- defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions.
- category = "host jvm startup",
- help = "Convenience option to add some additional JVM startup flags, which cause "
- + "the JVM to wait during startup until you connect from a JDWP-compliant debugger "
- + "(like Eclipse) to port 5005.",
- expansion = {
- "--host_jvm_args=-Xdebug",
- "--host_jvm_args=-Xrunjdwp:transport=dt_socket,server=y,address=5005",
- })
+ @Option(
+ name = "host_jvm_debug",
+ defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions.
+ category = "host jvm startup",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Convenience option to add some additional JVM startup flags, which cause "
+ + "the JVM to wait during startup until you connect from a JDWP-compliant debugger "
+ + "(like Eclipse) to port 5005.",
+ expansion = {
+ "--host_jvm_args=-Xdebug",
+ "--host_jvm_args=-Xrunjdwp:transport=dt_socket,server=y,address=5005",
+ }
+ )
public Void hostJvmDebug;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java b/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java
index 36c2bfc7c4..7624c757b6 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java
@@ -22,8 +22,10 @@ import com.google.devtools.build.lib.util.StringUtil;
import com.google.devtools.build.lib.util.io.AnsiTerminalPrinter;
import com.google.devtools.build.lib.view.test.TestStatus.BlazeTestStatus;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -48,18 +50,28 @@ public class TerminalTestResultNotifier implements TestResultNotifier {
* Flags specific to test summary reporting.
*/
public static class TestSummaryOptions extends OptionsBase {
- @Option(name = "verbose_test_summary",
- defaultValue = "true",
- category = "verbosity",
- help = "If true, print additional information (timing, number of failed runs, etc) in the"
- + " test summary.")
+ @Option(
+ name = "verbose_test_summary",
+ defaultValue = "true",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "If true, print additional information (timing, number of failed runs, etc) in the"
+ + " test summary."
+ )
public boolean verboseSummary;
- @Option(name = "test_verbose_timeout_warnings",
- defaultValue = "false",
- category = "verbosity",
- help = "If true, print additional warnings when the actual test execution time does not " +
- "match the timeout defined by the test (whether implied or explicit).")
+ @Option(
+ name = "test_verbose_timeout_warnings",
+ defaultValue = "false",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "If true, print additional warnings when the actual test execution time does not "
+ + "match the timeout defined by the test (whether implied or explicit)."
+ )
public boolean testVerboseTimeoutWarnings;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
index d2d3f5a58b..18455b17e5 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
@@ -27,25 +27,28 @@ import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.common.options.InvocationPolicyEnforcer;
import com.google.devtools.common.options.InvocationPolicyParser;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
import com.google.devtools.common.options.OptionsParsingException;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.Collection;
import java.util.List;
-/**
- * The 'blaze canonicalize-flags' command.
- */
-@Command(name = "canonicalize-flags",
- options = { CanonicalizeCommand.Options.class },
- allowResidue = true,
- mustRunInWorkspace = false,
- shortDescription = "Canonicalizes a list of %{product} options.",
- help = "This command canonicalizes a list of %{product} options. Don't forget to prepend "
- + " '--' to end option parsing before the flags to canonicalize.\n"
- + "%{options}")
+/** The 'blaze canonicalize-flags' command. */
+@Command(
+ name = "canonicalize-flags",
+ options = {CanonicalizeCommand.Options.class},
+ allowResidue = true,
+ mustRunInWorkspace = false,
+ shortDescription = "Canonicalizes a list of %{product} options.",
+ help =
+ "This command canonicalizes a list of %{product} options. Don't forget to prepend "
+ + " '--' to end option parsing before the flags to canonicalize.\n"
+ + "%{options}"
+)
public final class CanonicalizeCommand implements BlazeCommand {
public static class Options extends OptionsBase {
@@ -53,6 +56,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
name = "for_command",
defaultValue = "build",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "The command for which the options should be canonicalized."
)
public String forCommand;
@@ -60,6 +65,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "invocation_policy",
defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Applies an invocation policy to the options to be canonicalized."
)
public String invocationPolicy;
@@ -67,6 +74,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "canonicalize_policy",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Output the canonical policy, after expansion and filtering. To keep the output "
+ "clean, the canonicalized command arguments will NOT be shown when this option is "
@@ -78,6 +87,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "show_warnings",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Output parser warnings to standard error (e.g. for conflicting flag options)."
)
public boolean showWarnings;
@@ -92,6 +103,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "flag_clash_canary",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED
)
public boolean flagClashCanary;
@@ -99,6 +112,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "flag_clash_canary_expander1",
defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
expansion = {"--flag_clash_canary=1"}
)
@@ -107,6 +122,8 @@ public final class CanonicalizeCommand implements BlazeCommand {
@Option(
name = "flag_clash_canary_expander2",
defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
expansion = {"--flag_clash_canary=0"}
)
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
index ef107885dd..375a581e7f 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
@@ -31,9 +31,11 @@ import com.google.devtools.build.lib.util.ShellEscaper;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -60,6 +62,8 @@ public final class CleanCommand implements BlazeCommand {
name = "clean_style",
defaultValue = "",
category = "clean",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Can be 'expunge', 'expunge_async', or 'async'."
)
public String cleanStyle;
@@ -69,6 +73,8 @@ public final class CleanCommand implements BlazeCommand {
defaultValue = "null",
category = "clean",
expansion = "--clean_style=expunge",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If specified, clean removes the entire working tree for this %{product} "
+ "instance, which includes all %{product}-created temporary and build output "
@@ -81,6 +87,8 @@ public final class CleanCommand implements BlazeCommand {
defaultValue = "null",
category = "clean",
expansion = "--clean_style=expunge_async",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If specified, clean asynchronously removes the entire working tree for "
+ "this %{product} instance, which includes all %{product}-created temporary and "
@@ -95,6 +103,8 @@ public final class CleanCommand implements BlazeCommand {
defaultValue = "null",
category = "clean",
expansion = "--clean_style=async",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If specified, clean asynchronously removes the entire working tree for "
+ "this %{product} instance, which includes all %{product}-created temporary and "
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
index 0e7965ea2d..68b6153217 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
@@ -28,10 +28,11 @@ import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.common.options.EnumConverter;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
-
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
@@ -41,18 +42,19 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-/**
- * Implementation of the dump command.
- */
-@Command(allowResidue = false,
- mustRunInWorkspace = false,
- options = { DumpCommand.DumpOptions.class },
- help = "Usage: %{product} dump <options>\n"
- + "Dumps the internal state of the %{product} server process. This command is provided "
- + "as an aid to debugging, not as a stable interface, so users should not try to "
- + "parse the output; instead, use 'query' or 'info' for this purpose.\n%{options}",
- name = "dump",
- shortDescription = "Dumps the internal state of the %{product} server process.")
+/** Implementation of the dump command. */
+@Command(
+ allowResidue = false,
+ mustRunInWorkspace = false,
+ options = {DumpCommand.DumpOptions.class},
+ help =
+ "Usage: %{product} dump <options>\n"
+ + "Dumps the internal state of the %{product} server process. This command is provided "
+ + "as an aid to debugging, not as a stable interface, so users should not try to "
+ + "parse the output; instead, use 'query' or 'info' for this purpose.\n%{options}",
+ name = "dump",
+ shortDescription = "Dumps the internal state of the %{product} server process."
+)
public class DumpCommand implements BlazeCommand {
/**
@@ -61,35 +63,55 @@ public class DumpCommand implements BlazeCommand {
*/
public static class DumpOptions extends OptionsBase {
- @Option(name = "packages",
- defaultValue = "false",
- category = "verbosity",
- help = "Dump package cache content.")
+ @Option(
+ name = "packages",
+ defaultValue = "false",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Dump package cache content."
+ )
public boolean dumpPackages;
- @Option(name = "vfs",
- defaultValue = "false",
- category = "verbosity",
- help = "Dump virtual filesystem cache content.")
+ @Option(
+ name = "vfs",
+ defaultValue = "false",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Dump virtual filesystem cache content."
+ )
public boolean dumpVfs;
- @Option(name = "action_cache",
- defaultValue = "false",
- category = "verbosity",
- help = "Dump action cache content.")
+ @Option(
+ name = "action_cache",
+ defaultValue = "false",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Dump action cache content."
+ )
public boolean dumpActionCache;
- @Option(name = "rule_classes",
- defaultValue = "false",
- category = "verbosity",
- help = "Dump rule classes.")
+ @Option(
+ name = "rule_classes",
+ defaultValue = "false",
+ category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Dump rule classes."
+ )
public boolean dumpRuleClasses;
- @Option(name = "skyframe",
- defaultValue = "off",
- category = "verbosity",
- converter = SkyframeDumpEnumConverter.class,
- help = "Dump Skyframe graph: 'off', 'summary', or 'detailed'.")
+ @Option(
+ name = "skyframe",
+ defaultValue = "off",
+ category = "verbosity",
+ converter = SkyframeDumpEnumConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Dump Skyframe graph: 'off', 'summary', or 'detailed'."
+ )
public SkyframeDumpOption dumpSkyframe;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java
index 9790984923..ed64a4f088 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java
@@ -37,9 +37,11 @@ import com.google.devtools.build.lib.util.StringUtil;
import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.common.options.Converters;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@@ -48,17 +50,16 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
-/**
- * The 'blaze help' command, which prints all available commands as well as
- * specific help pages.
- */
-@Command(name = "help",
- options = { HelpCommand.Options.class },
- allowResidue = true,
- mustRunInWorkspace = false,
- shortDescription = "Prints help for commands, or the index.",
- completion = "command|{startup_options,target-syntax,info-keys}",
- help = "resource:help.txt")
+/** The 'blaze help' command, which prints all available commands as well as specific help pages. */
+@Command(
+ name = "help",
+ options = {HelpCommand.Options.class},
+ allowResidue = true,
+ mustRunInWorkspace = false,
+ shortDescription = "Prints help for commands, or the index.",
+ completion = "command|{startup_options,target-syntax,info-keys}",
+ help = "resource:help.txt"
+)
public final class HelpCommand implements BlazeCommand {
private static final Joiner SPACE_JOINER = Joiner.on(" ");
@@ -70,26 +71,38 @@ public final class HelpCommand implements BlazeCommand {
public static class Options extends OptionsBase {
- @Option(name = "help_verbosity",
- category = "help",
- defaultValue = "medium",
- converter = Converters.HelpVerbosityConverter.class,
- help = "Select the verbosity of the help command.")
+ @Option(
+ name = "help_verbosity",
+ category = "help",
+ defaultValue = "medium",
+ converter = Converters.HelpVerbosityConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Select the verbosity of the help command."
+ )
public OptionsParser.HelpVerbosity helpVerbosity;
- @Option(name = "long",
- abbrev = 'l',
- defaultValue = "null",
- category = "help",
- expansion = {"--help_verbosity=long"},
- help = "Show full description of each option, instead of just its name.")
+ @Option(
+ name = "long",
+ abbrev = 'l',
+ defaultValue = "null",
+ category = "help",
+ expansion = {"--help_verbosity=long"},
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Show full description of each option, instead of just its name."
+ )
public Void showLongFormOptions;
- @Option(name = "short",
- defaultValue = "null",
- category = "help",
- expansion = {"--help_verbosity=short"},
- help = "Show only the names of the options, not their types or meanings.")
+ @Option(
+ name = "short",
+ defaultValue = "null",
+ category = "help",
+ expansion = {"--help_verbosity=short"},
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Show only the names of the options, not their types or meanings."
+ )
public Void showShortFormOptions;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
index 27eb32c3fc..802d18c1d9 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java
@@ -28,9 +28,11 @@ import com.google.devtools.build.lib.util.AbruptExitException;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
@@ -61,10 +63,14 @@ import java.util.TreeMap;
public class InfoCommand implements BlazeCommand {
public static class Options extends OptionsBase {
- @Option(name = "show_make_env",
- defaultValue = "false",
- category = "misc",
- help = "Include the \"Make\" environment in the output.")
+ @Option(
+ name = "show_make_env",
+ defaultValue = "false",
+ category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Include the \"Make\" environment in the output."
+ )
public boolean showMakeEnvironment;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java
index 91c4c99d77..7211a87679 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java
@@ -38,26 +38,27 @@ import com.google.devtools.build.lib.util.TimeUtilities;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.common.options.Converters;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
-
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.EnumMap;
import java.util.regex.Pattern;
-/**
- * Command line wrapper for analyzing Blaze build profiles.
- */
-@Command(name = "analyze-profile",
- options = { ProfileCommand.ProfileOptions.class },
- shortDescription = "Analyzes build profile data.",
- help = "resource:analyze-profile.txt",
- allowResidue = true,
- completion = "path",
- mustRunInWorkspace = false)
+/** Command line wrapper for analyzing Blaze build profiles. */
+@Command(
+ name = "analyze-profile",
+ options = {ProfileCommand.ProfileOptions.class},
+ shortDescription = "Analyzes build profile data.",
+ help = "resource:analyze-profile.txt",
+ allowResidue = true,
+ completion = "path",
+ mustRunInWorkspace = false
+)
public final class ProfileCommand implements BlazeCommand {
public static class DumpConverter extends Converters.StringSetConverter {
@@ -70,6 +71,8 @@ public final class ProfileCommand implements BlazeCommand {
@Option(
name = "chart",
defaultValue = "true",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If --nochart is present, do not include the task chart with --html_details."
+ " The default is --chart."
@@ -79,6 +82,8 @@ public final class ProfileCommand implements BlazeCommand {
@Option(
name = "combine",
defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If present, the statistics of all given profile files will be combined and output"
+ " in text/--html format to the file named in the argument. Does not output HTML"
@@ -86,29 +91,46 @@ public final class ProfileCommand implements BlazeCommand {
)
public String combine;
- @Option(name = "dump",
- abbrev='d',
- converter = DumpConverter.class,
- defaultValue = "null",
- help = "output full profile data dump either in human-readable 'text' format or"
- + " script-friendly 'raw' format, either sorted or unsorted.")
+ @Option(
+ name = "dump",
+ abbrev = 'd',
+ converter = DumpConverter.class,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "output full profile data dump either in human-readable 'text' format or"
+ + " script-friendly 'raw' format, either sorted or unsorted."
+ )
public String dumpMode;
- @Option(name = "html",
- defaultValue = "false",
- help = "If present, an HTML file visualizing the tasks of the profiled build is created. "
- + "The name of the html file is the name of the profile file plus '.html'.")
+ @Option(
+ name = "html",
+ defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "If present, an HTML file visualizing the tasks of the profiled build is created. "
+ + "The name of the html file is the name of the profile file plus '.html'."
+ )
public boolean html;
- @Option(name = "html_pixels_per_second",
- defaultValue = "50",
- help = "Defines the scale of the time axis of the task diagram. The unit is "
- + "pixels per second. Default is 50 pixels per second. ")
+ @Option(
+ name = "html_pixels_per_second",
+ defaultValue = "50",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Defines the scale of the time axis of the task diagram. The unit is "
+ + "pixels per second. Default is 50 pixels per second. "
+ )
public int htmlPixelsPerSecond;
@Option(
name = "html_details",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If --html_details is present, the task diagram contains all tasks of the profile "
+ " and performance statistics on user-defined and built-in Skylark functions. "
@@ -120,6 +142,8 @@ public final class ProfileCommand implements BlazeCommand {
@Option(
name = "html_histograms",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If --html_histograms and --html_details is present, the HTML output will display"
+ " histograms for Skylark functions clicked in the statistics table. This will"
@@ -131,6 +155,8 @@ public final class ProfileCommand implements BlazeCommand {
name = "task_tree",
defaultValue = "null",
converter = Converters.RegexPatternConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Print the tree of profiler tasks from all tasks matching the given regular expression."
)
@@ -139,20 +165,30 @@ public final class ProfileCommand implements BlazeCommand {
@Option(
name = "task_tree_threshold",
defaultValue = "50",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"When printing a task tree, will skip tasks with a duration that is less than the"
+ " given threshold in milliseconds."
)
public long taskTreeThreshold;
- @Option(name = "vfs_stats",
- defaultValue = "false",
- help = "If present, include VFS path statistics.")
+ @Option(
+ name = "vfs_stats",
+ defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "If present, include VFS path statistics."
+ )
public boolean vfsStats;
- @Option(name = "vfs_stats_limit",
- defaultValue = "-1",
- help = "Maximum number of VFS path statistics to print.")
+ @Option(
+ name = "vfs_stats_limit",
+ defaultValue = "-1",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Maximum number of VFS path statistics to print."
+ )
public int vfsStatsLimit;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
index 6a6dbbc66a..8d146945f3 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java
@@ -62,9 +62,11 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
@@ -92,6 +94,8 @@ public class RunCommand implements BlazeCommand {
name = "script_path",
category = "run",
defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
converter = OptionsUtils.PathFragmentConverter.class,
help =
"If set, write a shell script to the given file which invokes the "
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
index 13a5d8df9d..6cfe6a0be6 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
@@ -19,9 +19,11 @@ import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
/**
* The 'blaze shutdown' command.
@@ -37,12 +39,17 @@ public final class ShutdownCommand implements BlazeCommand {
public static class Options extends OptionsBase {
- @Option(name="iff_heap_size_greater_than",
- defaultValue = "0",
- category = "misc",
- help="Iff non-zero, then shutdown will only shut down the " +
- "server if the total memory (in MB) consumed by the JVM " +
- "exceeds this value.")
+ @Option(
+ name = "iff_heap_size_greater_than",
+ defaultValue = "0",
+ category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Iff non-zero, then shutdown will only shut down the "
+ + "server if the total memory (in MB) consumed by the JVM "
+ + "exceeds this value."
+ )
public int heapSizeLimit;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/mobileinstall/MobileInstallCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/mobileinstall/MobileInstallCommand.java
index ed9329ed27..4ed187fb39 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/mobileinstall/MobileInstallCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/mobileinstall/MobileInstallCommand.java
@@ -39,30 +39,31 @@ import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.common.options.EnumConverter;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionPriority;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
import com.google.devtools.common.options.OptionsParsingException;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-/**
- * Implementation of the 'mobile-install' command.
- */
- @Command(name = "mobile-install",
- builds = true,
- options = { MobileInstallCommand.Options.class, WriteAdbArgsAction.Options.class },
- inherits = { BuildCommand.class },
- shortDescription = "Installs targets to mobile devices.",
- completion = "label",
- allowResidue = true,
- help = "resource:mobile-install.txt")
+/** Implementation of the 'mobile-install' command. */
+@Command(
+ name = "mobile-install",
+ builds = true,
+ options = {MobileInstallCommand.Options.class, WriteAdbArgsAction.Options.class},
+ inherits = {BuildCommand.class},
+ shortDescription = "Installs targets to mobile devices.",
+ completion = "label",
+ allowResidue = true,
+ help = "resource:mobile-install.txt"
+)
public class MobileInstallCommand implements BlazeCommand {
-
/**
* An enumeration of all the modes that mobile-install supports.
*/
@@ -102,21 +103,31 @@ public class MobileInstallCommand implements BlazeCommand {
* Command line options for the 'mobile-install' command.
*/
public static final class Options extends OptionsBase {
- @Option(name = "split_apks",
- defaultValue = "false",
- category = "mobile-install",
- help = "Whether to use split apks to install and update the "
- + "application on the device. Works only with devices with "
- + "Marshmallow or later")
+ @Option(
+ name = "split_apks",
+ defaultValue = "false",
+ category = "mobile-install",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Whether to use split apks to install and update the "
+ + "application on the device. Works only with devices with "
+ + "Marshmallow or later"
+ )
public boolean splitApks;
- @Option(name = "incremental",
- category = "mobile-install",
- defaultValue = "false",
- help = "Whether to do an incremental install. If true, try to avoid unnecessary additional "
- + "work by reading the state of the device the code is to be installed on and using "
- + "that information to avoid unnecessary work. If false (the default), always do a "
- + "full install.")
+ @Option(
+ name = "incremental",
+ category = "mobile-install",
+ defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Whether to do an incremental install. If true, try to avoid unnecessary additional "
+ + "work by reading the state of the device the code is to be installed on and using "
+ + "that information to avoid unnecessary work. If false (the default), always do a "
+ + "full install."
+ )
public boolean incremental;
@Option(
@@ -124,10 +135,14 @@ public class MobileInstallCommand implements BlazeCommand {
category = "mobile-install",
defaultValue = "classic",
converter = ModeConverter.class,
- help = "Select how to run mobile-install. \"classic\" runs the current version of "
- + "mobile-install. \"skylark\" uses the new skylark version, which has support for "
- + "android_test. \"skylark_incremental_res\" is the same as \"skylark\" plus incremental "
- + "resource processing. \"skylark_incremental_res\" requires a device with root access.",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Select how to run mobile-install. \"classic\" runs the current version of "
+ + "mobile-install. \"skylark\" uses the new skylark version, which has support for "
+ + "android_test. \"skylark_incremental_res\" is the same as \"skylark\" plus "
+ + "incremental resource processing. \"skylark_incremental_res\" requires a device "
+ + "with root access.",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED
)
public Mode mode;
@@ -136,6 +151,8 @@ public class MobileInstallCommand implements BlazeCommand {
name = "mobile_install_aspect",
category = "mobile-install",
defaultValue = "@android_test_support//tools/android/mobile_install:mobile-install.bzl",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "The aspect to use for mobile-install.",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED
)