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
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/LoadingOptions.java b/src/main/java/com/google/devtools/build/lib/pkgcache/LoadingOptions.java
index d6a82fa..0cb1394 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/LoadingOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/LoadingOptions.java
@@ -17,8 +17,10 @@
import com.google.devtools.build.lib.packages.TestTimeout;
import com.google.devtools.common.options.Converters.CommaSeparatedOptionListConverter;
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.util.List;
import java.util.Set;
@@ -30,6 +32,8 @@
name = "build_tests_only",
defaultValue = "false",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If specified, only *_test and test_suite rules will be built and other targets specified "
+ "on the command line will be ignored. By default everything that was requested "
@@ -41,6 +45,8 @@
name = "compile_one_dependency",
defaultValue = "false",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Compile a single dependency of the argument files. This is useful for syntax checking "
+ "source files in IDEs, for example, by rebuilding a single target that depends on "
@@ -56,6 +62,8 @@
converter = CommaSeparatedOptionListConverter.class,
defaultValue = "",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specifies a comma-separated list of tags. Each tag can be optionally "
+ "preceded with '-' to specify excluded tags. Only those targets will be built that "
@@ -70,6 +78,8 @@
converter = CommaSeparatedOptionListConverter.class,
defaultValue = "",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specifies a comma-separated list of test tags. Each tag can be optionally "
+ "preceded with '-' to specify excluded tags. Only those test targets will be "
@@ -83,6 +93,8 @@
converter = TestSize.TestSizeFilterConverter.class,
defaultValue = "",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specifies a comma-separated list of test sizes. Each size can be optionally "
+ "preceded with '-' to specify excluded sizes. Only those test targets will be "
@@ -96,6 +108,8 @@
converter = TestTimeout.TestTimeoutFilterConverter.class,
defaultValue = "",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specifies a comma-separated list of test timeouts. Each timeout can be "
+ "optionally preceded with '-' to specify excluded timeouts. Only those test "
@@ -110,6 +124,8 @@
converter = CommaSeparatedOptionListConverter.class,
defaultValue = "",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specifies a comma-separated list of test languages. Each language can be "
+ "optionally preceded with '-' to specify excluded languages. Only those "
@@ -124,6 +140,8 @@
name = "build_manual_tests",
defaultValue = "false",
category = "what",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from "
+ "processing. This option forces them to be built (but not executed)."
@@ -139,6 +157,8 @@
name = "experimental_skyframe_target_pattern_evaluator",
defaultValue = "false",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Use the Skyframe-based target pattern evaluator; implies "
+ "--experimental_interleave_loading_and_analysis."
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java
index 626d76f..8f0895d 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java
@@ -25,9 +25,11 @@
import com.google.devtools.common.options.Converter;
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.OptionUsageRestrictions;
import com.google.devtools.common.options.OptionsParsingException;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.List;
/**
@@ -62,6 +64,8 @@
defaultValue = "%workspace%",
category = "package loading",
converter = Converters.ColonSeparatedOptionListConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"A colon-separated list of where to look for packages. "
+ "Elements beginning with '%workspace%' are relative to the enclosing "
@@ -75,6 +79,8 @@
defaultValue = "false",
category = "verbosity",
deprecationWarning = "This flag is no longer supported and will go away soon.",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If enabled, causes Blaze to print the location on the --package_path "
+ "from which each package was loaded."
@@ -85,6 +91,8 @@
name = "show_loading_progress",
defaultValue = "true",
category = "verbosity",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "If enabled, causes Blaze to print \"Loading package:\" messages."
)
public boolean showLoadingProgress;
@@ -94,6 +102,8 @@
defaultValue = "",
category = "package loading",
converter = CommaSeparatedPackageNameListConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"A comma-separated list of names of packages which the "
+ "build system will consider non-existent, even if they are "
@@ -112,6 +122,8 @@
defaultValue = "private",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
converter = DefaultVisibilityConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Default visibility for packages that don't set it explicitly ('public' or " + "'private')."
)
@@ -121,6 +133,8 @@
name = "legacy_globbing_threads",
defaultValue = "100",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Number of threads to use for glob evaluation."
)
public int globbingThreads;
@@ -129,6 +143,8 @@
name = "experimental_max_directories_to_eagerly_visit_in_globbing",
defaultValue = "-1",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"If non-negative, the first time a glob is evaluated in a package, the subdirectories of "
+ "the package will be traversed in order to warm filesystem caches and compensate for "
@@ -140,6 +156,8 @@
name = "fetch",
defaultValue = "true",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Allows the command to fetch external dependencies"
)
public boolean fetch;
@@ -148,6 +166,8 @@
name = "experimental_check_output_files",
defaultValue = "true",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Check for modifications made to the output files of a build. Consider setting "
+ "this flag to false to see the effect on incremental build times."