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/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."