From b0440164eda858fa0e14f623780a00b30e20ebf7 Mon Sep 17 00:00:00 2001 From: ccalvarin Date: Wed, 28 Mar 2018 08:09:07 -0700 Subject: Remove categories from Bazel options. These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format. The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately. RELNOTES: None. PiperOrigin-RevId: 190773778 --- .../lib/analysis/config/BuildConfiguration.java | 118 ++++++++------------- 1 file changed, 44 insertions(+), 74 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java') diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index 56e54a37a9..26d6132b4f 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -407,10 +407,9 @@ public class BuildConfiguration { @Option( name = "experimental_separate_genfiles_directory", defaultValue = "true", - category = "semantics", documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, - metadataTags = { OptionMetadataTag.EXPERIMENTAL }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, + metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = "Whether to have a separate genfiles directory or fold it into the bin directory" ) public boolean separateGenfilesDirectory; @@ -419,10 +418,9 @@ public class BuildConfiguration { name = "define", converter = Converters.AssignmentConverter.class, defaultValue = "", - category = "semantics", allowMultiple = true, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS}, help = "Each --define option specifies an assignment for a build variable." ) public List> commandLineBuildVariables; @@ -430,10 +428,9 @@ public class BuildConfiguration { @Option( name = "cpu", defaultValue = "", - category = "semantics", converter = AutoCpuConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS}, help = "The target CPU." ) public String cpu; @@ -465,9 +462,8 @@ public class BuildConfiguration { @Option( name = "strict_filesets", defaultValue = "false", - category = "semantics", documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS, - effectTags = { OptionEffectTag.BUILD_FILE_SEMANTICS, OptionEffectTag.EAGERNESS_TO_EXIT }, + effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS, OptionEffectTag.EAGERNESS_TO_EXIT}, help = "If this option is enabled, filesets crossing package boundaries are reported " + "as errors. It does not work when check_fileset_dependencies_recursively is " @@ -478,9 +474,8 @@ public class BuildConfiguration { @Option( name = "stamp", defaultValue = "false", - category = "semantics", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "Stamp binaries with the date, username, hostname, workspace information, etc." ) public boolean stampBinaries; @@ -491,9 +486,8 @@ public class BuildConfiguration { name = "instrumentation_filter", converter = RegexFilter.RegexFilterConverter.class, defaultValue = "-/javatests[/:],-/test/java[/:]", - category = "semantics", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "When coverage is enabled, only rules with names included by the " + "specified regex-based filter will be instrumented. Rules prefixed " @@ -505,9 +499,8 @@ public class BuildConfiguration { @Option( name = "instrument_test_targets", defaultValue = "false", - category = "semantics", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "When coverage is enabled, specifies whether to consider instrumenting test rules. " + "When set, test rules included by --instrumentation_filter are instrumented. " @@ -518,10 +511,9 @@ public class BuildConfiguration { @Option( name = "host_cpu", defaultValue = "", - category = "semantics", converter = AutoCpuConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS}, help = "The host CPU." ) public String hostCpu; @@ -531,7 +523,6 @@ public class BuildConfiguration { abbrev = 'c', converter = CompilationMode.Converter.class, defaultValue = "fastbuild", - category = "semantics", // Should this be "flags"? documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = { OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.ACTION_COMMAND_LINES }, help = "Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'." @@ -542,7 +533,6 @@ public class BuildConfiguration { name = "host_compilation_mode", converter = CompilationMode.Converter.class, defaultValue = "opt", - category = "semantics", // Should this be "flags"? documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = { OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.ACTION_COMMAND_LINES }, help = "Specify the mode the tools used during the build will be built in. Values: " @@ -571,12 +561,11 @@ public class BuildConfiguration { @Option( name = "platform_suffix", defaultValue = "null", - category = "misc", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = { - OptionEffectTag.LOSES_INCREMENTAL_STATE, - OptionEffectTag.AFFECTS_OUTPUTS, - OptionEffectTag.LOADING_AND_ANALYSIS + OptionEffectTag.LOSES_INCREMENTAL_STATE, + OptionEffectTag.AFFECTS_OUTPUTS, + OptionEffectTag.LOADING_AND_ANALYSIS }, help = "Specifies a suffix to be added to the configuration directory." ) @@ -590,9 +579,8 @@ public class BuildConfiguration { converter = Converters.OptionalAssignmentConverter.class, allowMultiple = true, defaultValue = "", - category = "testing", documentationCategory = OptionDocumentationCategory.TESTING, - effectTags = { OptionEffectTag.TEST_RUNNER }, + effectTags = {OptionEffectTag.TEST_RUNNER}, help = "Specifies additional environment variables to be injected into the test runner " + "environment. Variables can be either specified by name, in which case its value " @@ -610,9 +598,8 @@ public class BuildConfiguration { converter = Converters.OptionalAssignmentConverter.class, allowMultiple = true, defaultValue = "", - category = "semantics", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.ACTION_COMMAND_LINES}, + effectTags = {OptionEffectTag.ACTION_COMMAND_LINES}, help = "Specifies the set of environment variables available to actions. " + "Variables can be either specified by name, in which case the value will be " @@ -626,9 +613,8 @@ public class BuildConfiguration { @Option( name = "collect_code_coverage", defaultValue = "false", - category = "testing", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "If specified, Bazel will instrument code (using offline instrumentation where " + "possible) and will collect coverage information during tests. Only targets that " @@ -638,12 +624,11 @@ public class BuildConfiguration { public boolean collectCodeCoverage; @Option( - name = "experimental_java_coverage", - defaultValue = "false", - category = "testing", - documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, - help = "If true Bazel will use a new way of computing code coverage for java targets." + name = "experimental_java_coverage", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, + help = "If true Bazel will use a new way of computing code coverage for java targets." ) public boolean experimentalJavaCoverage; @@ -651,12 +636,11 @@ public class BuildConfiguration { name = "coverage_support", converter = LabelConverter.class, defaultValue = "@bazel_tools//tools/test:coverage_support", - category = "testing", documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = { - OptionEffectTag.CHANGES_INPUTS, - OptionEffectTag.AFFECTS_OUTPUTS, - OptionEffectTag.LOADING_AND_ANALYSIS + OptionEffectTag.CHANGES_INPUTS, + OptionEffectTag.AFFECTS_OUTPUTS, + OptionEffectTag.LOADING_AND_ANALYSIS }, help = "Location of support files that are required on the inputs of every test action " @@ -668,12 +652,11 @@ public class BuildConfiguration { name = "coverage_report_generator", converter = LabelConverter.class, defaultValue = "@bazel_tools//tools/test:coverage_report_generator", - category = "testing", documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = { - OptionEffectTag.CHANGES_INPUTS, - OptionEffectTag.AFFECTS_OUTPUTS, - OptionEffectTag.LOADING_AND_ANALYSIS + OptionEffectTag.CHANGES_INPUTS, + OptionEffectTag.AFFECTS_OUTPUTS, + OptionEffectTag.LOADING_AND_ANALYSIS }, help = "Location of the binary that is used to generate coverage reports. This must " @@ -685,21 +668,17 @@ public class BuildConfiguration { @Option( name = "build_runfile_manifests", defaultValue = "true", - category = "strategy", documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, - help = - "If true, write runfiles manifests for all targets. " - + "If false, omit them." + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, + help = "If true, write runfiles manifests for all targets. " + "If false, omit them." ) public boolean buildRunfilesManifests; @Option( name = "build_runfile_links", defaultValue = "true", - category = "strategy", documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "If true, build runfiles symlink forests for all targets. " + "If false, write only manifests when possible." @@ -709,9 +688,8 @@ public class BuildConfiguration { @Option( name = "legacy_external_runfiles", defaultValue = "true", - category = "strategy", documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION, - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS }, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = "If true, build runfiles symlink forests for external repositories under " + ".runfiles/wsname/external/repo (in addition to .runfiles/repo)." @@ -721,11 +699,11 @@ public class BuildConfiguration { @Option( name = "check_fileset_dependencies_recursively", defaultValue = "true", - category = "semantics", documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - deprecationWarning = "This flag is a no-op and fileset dependencies are always checked " - + "to ensure correctness of builds.", - effectTags = { OptionEffectTag.AFFECTS_OUTPUTS } + deprecationWarning = + "This flag is a no-op and fileset dependencies are always checked " + + "to ensure correctness of builds.", + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS} ) public boolean checkFilesetDependenciesRecursively; @@ -741,11 +719,10 @@ public class BuildConfiguration { @Option( name = "run_under", - category = "run", defaultValue = "null", converter = RunUnderConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.ACTION_COMMAND_LINES}, + effectTags = {OptionEffectTag.ACTION_COMMAND_LINES}, help = "Prefix to insert in front of command before running. " + "Examples:\n" @@ -761,12 +738,11 @@ public class BuildConfiguration { @Option( name = "distinct_host_configuration", defaultValue = "true", - category = "strategy", documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION, effectTags = { - OptionEffectTag.LOSES_INCREMENTAL_STATE, - OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION, - OptionEffectTag.LOADING_AND_ANALYSIS, + OptionEffectTag.LOSES_INCREMENTAL_STATE, + OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION, + OptionEffectTag.LOADING_AND_ANALYSIS, }, help = "Build all the tools used during the build for a distinct configuration from that used " @@ -786,9 +762,8 @@ public class BuildConfiguration { @Option( name = "check_visibility", defaultValue = "true", - category = "checking", documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS, - effectTags = { OptionEffectTag.BUILD_FILE_SEMANTICS }, + effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, help = "If disabled, visibility errors are demoted to warnings." ) public boolean checkVisibility; @@ -799,9 +774,8 @@ public class BuildConfiguration { @Option( name = "check_licenses", defaultValue = "false", - category = "checking", documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS, - effectTags = { OptionEffectTag.BUILD_FILE_SEMANTICS }, + effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, help = "Check that licensing constraints imposed by dependent packages " + "do not conflict with distribution modes of the targets being built. " @@ -825,11 +799,10 @@ public class BuildConfiguration { name = "experimental_action_listener", allowMultiple = true, defaultValue = "", - category = "experimental", converter = LabelListConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { OptionEffectTag.EXECUTION }, - metadataTags = { OptionMetadataTag.EXPERIMENTAL }, + effectTags = {OptionEffectTag.EXECUTION}, + metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = "Use action_listener to attach an extra_action to existing build actions." ) public List