Fold OptionUsageRestrictions into OptionDocumentationCategory and OptionMetadataTags.
These are similar, no need to have both fields. Removing the "DOCUMENTED" default, the absence of UNDOCUMENTED will be used instead.
Since requiring a documentation category for undocumented options doesn't make sense, list that as one of the OptionDocumentationCategories, but list HIDDEN and INTERNAL as part of OptionMetadata. These options should list UNDOCUMENTED as their category.
PiperOrigin-RevId: 161515674
diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
index 7462cff..2436640 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
@@ -23,7 +23,6 @@
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.Options;
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.Map;
@@ -272,8 +271,7 @@
@Option(
name = "debug_print_action_contexts",
defaultValue = "false",
- optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
help = "Print the contents of the SpawnActionContext and ContextProviders maps."
)
@@ -282,8 +280,7 @@
@Option(
name = "cache_computed_file_digests",
defaultValue = "50000",
- optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
"If greater than 0, configures Blaze to cache file digests in memory based on their "
@@ -297,8 +294,7 @@
@Option(
name = "experimental_enable_critical_path_profiling",
defaultValue = "true",
- optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
"If set (the default), critical path profiling is enabled for the execution phase. "