aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-06-27 17:58:35 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-28 10:17:40 +0200
commit3bc1547a5cd78bd6639d968b3cfddbe26b1c31d5 (patch)
treead80da2596d9150632ca6a1f1510060fe849fa3a /src/main/java/com/google/devtools/build/lib/runtime/commands
parent9b394a24dc65c794242e98a8a41eb8a60c78367b (diff)
Add the default category and tag to all options.
Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands')
-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
8 files changed, 228 insertions, 113 deletions
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;
}