Replace "" (empty string) default values of multiple options with "null".
This is preparation for turning on parsing of default values for multiple (allowMultiple = true) options.
This change is NOOP (enforced by OptionDefaultValueConversionTest#shouldConvertDefaultValue()) because for now default value of a multiple option does not matter and is always converted to an empty list. But it will matter a bit later: "null" - special value resolving to the same empty list, anything else - parsed by the converter.
RELNOTES: None.
PiperOrigin-RevId: 303345588
diff --git a/src/java_tools/import_deps_checker/java/com/google/devtools/build/importdeps/Main.java b/src/java_tools/import_deps_checker/java/com/google/devtools/build/importdeps/Main.java
index ac6defa..4d7f179 100644
--- a/src/java_tools/import_deps_checker/java/com/google/devtools/build/importdeps/Main.java
+++ b/src/java_tools/import_deps_checker/java/com/google/devtools/build/importdeps/Main.java
@@ -48,56 +48,54 @@
/** Command line options. */
public static class Options extends OptionsBase {
@Option(
- name = "input",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- abbrev = 'i',
- help = "Input jars with classes to check the completeness of their dependencies."
- )
+ name = "input",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ abbrev = 'i',
+ help = "Input jars with classes to check the completeness of their dependencies.")
public List<Path> inputJars;
@Option(
- name = "directdep",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- help = "Subset of Jars listed in --classpath_entry that --input Jars are allowed to depend "
- + "on directly."
- )
+ name = "directdep",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ help =
+ "Subset of Jars listed in --classpath_entry that --input Jars are allowed to depend "
+ + "on directly.")
public List<Path> directClasspath;
@Option(
- name = "classpath_entry",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- help =
- "Ordered classpath (Jar) to resolve symbols in the --input jars, like javac's -cp flag."
- )
+ name = "classpath_entry",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ help =
+ "Ordered classpath (Jar) to resolve symbols in the --input jars, like javac's -cp"
+ + " flag.")
public List<Path> fullClasspath;
@Option(
- name = "bootclasspath_entry",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- help =
- "Bootclasspath that was used to compile the --input Jar with, like javac's "
- + "-bootclasspath_entry flag (required)."
- )
+ name = "bootclasspath_entry",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ help =
+ "Bootclasspath that was used to compile the --input Jar with, like javac's "
+ + "-bootclasspath_entry flag (required).")
public List<Path> bootclasspath;
@Option(
@@ -130,22 +128,20 @@
public String ruleLabel;
@Option(
- name = "checking_mode",
- defaultValue = "WARNING",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = CheckingModeConverter.class,
- help = "Controls the behavior of the checker."
- )
+ name = "checking_mode",
+ defaultValue = "WARNING",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = CheckingModeConverter.class,
+ help = "Controls the behavior of the checker.")
public CheckingMode checkingMode;
@Option(
- name = "check_missing_members",
- defaultValue = "true",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Whether to check whether referenced fields and methods are defined."
- )
+ name = "check_missing_members",
+ defaultValue = "true",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Whether to check whether referenced fields and methods are defined.")
public boolean checkMissingMembers;
}
@@ -281,9 +277,7 @@
}
}
- /**
- * The checking mode of the dependency checker.
- */
+ /** The checking mode of the dependency checker. */
public enum CheckingMode {
/** Emit 'errors' on missing or incomplete dependencies. */
ERROR,
diff --git a/src/main/java/com/google/devtools/build/docgen/BuildEncyclopediaOptions.java b/src/main/java/com/google/devtools/build/docgen/BuildEncyclopediaOptions.java
index bfd5840..334e877 100644
--- a/src/main/java/com/google/devtools/build/docgen/BuildEncyclopediaOptions.java
+++ b/src/main/java/com/google/devtools/build/docgen/BuildEncyclopediaOptions.java
@@ -34,14 +34,13 @@
public String productName;
@Option(
- name = "input_dir",
- abbrev = 'i',
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "An input directory to read source files"
- )
+ name = "input_dir",
+ abbrev = 'i',
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "An input directory to read source files")
public List<String> inputDirs;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java
index 2aea623..f9e2bad 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/PlatformOptions.java
@@ -67,7 +67,7 @@
@Option(
name = "extra_execution_platforms",
converter = CommaSeparatedOptionListConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
allowMultiple = true,
effectTags = {OptionEffectTag.EXECUTION},
@@ -111,7 +111,7 @@
@Option(
name = "extra_toolchains",
- defaultValue = "",
+ defaultValue = "null",
converter = CommaSeparatedOptionListConverter.class,
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
allowMultiple = true,
@@ -130,7 +130,7 @@
@Option(
name = "toolchain_resolution_override",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {
OptionEffectTag.AFFECTS_OUTPUTS,
@@ -204,7 +204,7 @@
@Option(
name = "experimental_add_exec_constraints_to_targets",
converter = RegexFilterToLabelListConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = OptionEffectTag.LOADING_AND_ANALYSIS,
allowMultiple = true,
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java
index abd92bc..4e5dcf8 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java
@@ -86,7 +86,7 @@
@Option(
name = "define",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS},
@@ -320,7 +320,7 @@
name = "test_env",
converter = Converters.OptionalAssignmentConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.TESTING,
effectTags = {OptionEffectTag.TEST_RUNNER},
help =
@@ -338,7 +338,7 @@
name = "action_env",
converter = Converters.OptionalAssignmentConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
help =
@@ -354,7 +354,7 @@
name = "repo_env",
converter = Converters.OptionalAssignmentConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
help =
@@ -497,7 +497,7 @@
@Option(
name = "experimental_action_listener",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
converter = LabelListConverter.class,
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.EXECUTION},
@@ -575,7 +575,7 @@
@Option(
name = "features",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS},
help =
@@ -590,7 +590,7 @@
name = "target_environment",
converter = LabelListConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
help =
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java
index a120055..9520bc1 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java
@@ -139,17 +139,16 @@
public boolean trimTestConfiguration;
@Option(
- name = "test_arg",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "Specifies additional options and arguments that should be passed to the test "
- + "executable. Can be used multiple times to specify several arguments. "
- + "If multiple tests are executed, each of them will receive identical arguments. "
- + "Used only by the 'bazel test' command."
- )
+ name = "test_arg",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Specifies additional options and arguments that should be passed to the test "
+ + "executable. Can be used multiple times to specify several arguments. "
+ + "If multiple tests are executed, each of them will receive identical arguments. "
+ + "Used only by the 'bazel test' command.")
public List<String> testArguments;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
index b7e1fa4..95106c9 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
@@ -115,7 +115,7 @@
@Option(
name = "experimental_verify_repository_rules",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java
index 8dbf635..4b3062c 100644
--- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java
@@ -83,17 +83,16 @@
public String projectId;
@Option(
- name = "bes_keywords",
- defaultValue = "",
- converter = Converters.CommaSeparatedOptionListConverter.class,
- documentationCategory = OptionDocumentationCategory.LOGGING,
- effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
- allowMultiple = true,
- help =
- "Specifies a list of notification keywords to be added the default set of keywords "
- + "published to BES (\"command_name=<command_name> \", \"protocol_name=BEP\"). "
- + "Defaults to none."
- )
+ name = "bes_keywords",
+ defaultValue = "null",
+ converter = Converters.CommaSeparatedOptionListConverter.class,
+ documentationCategory = OptionDocumentationCategory.LOGGING,
+ effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
+ allowMultiple = true,
+ help =
+ "Specifies a list of notification keywords to be added the default set of keywords "
+ + "published to BES (\"command_name=<command_name> \", \"protocol_name=BEP\"). "
+ + "Defaults to none.")
public List<String> besKeywords;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java
index 104c6bc..4c7384e 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java
@@ -139,18 +139,17 @@
public boolean performExecutionPhase;
@Option(
- name = "output_groups",
- converter = Converters.CommaSeparatedOptionListConverter.class,
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION,
- effectTags = {OptionEffectTag.EXECUTION, OptionEffectTag.AFFECTS_OUTPUTS},
- defaultValue = "",
- help =
- "Specifies which output groups of the top-level targets to build. If omitted, a default "
- + "set of output groups are built. When specified the default set is overridden. "
- + "However you may use --output_groups=+<output_group> or "
- + "--output_groups=-<output_group> to instead modify the set of output groups."
- )
+ name = "output_groups",
+ converter = Converters.CommaSeparatedOptionListConverter.class,
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION,
+ effectTags = {OptionEffectTag.EXECUTION, OptionEffectTag.AFFECTS_OUTPUTS},
+ defaultValue = "null",
+ help =
+ "Specifies which output groups of the top-level targets to build. If omitted, a default "
+ + "set of output groups are built. When specified the default set is overridden. "
+ + "However you may use --output_groups=+<output_group> or "
+ + "--output_groups=-<output_group> to instead modify the set of output groups.")
public List<String> outputGroups;
@Option(
@@ -252,7 +251,7 @@
name = "experimental_multi_cpu",
converter = Converters.CommaSeparatedOptionListConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
@@ -287,19 +286,18 @@
public CacheBuilderSpec directoryCreationCacheSpec;
@Option(
- name = "aspects",
- converter = Converters.CommaSeparatedOptionListConverter.class,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.UNKNOWN},
- allowMultiple = true,
- help =
- "Comma-separated list of aspects to be applied to top-level targets. All aspects "
- + "are applied to all top-level targets independently. Aspects are specified in "
- + "the form <bzl-file-label>%<aspect_name>, "
- + "for example '//tools:my_def.bzl%my_aspect', where 'my_aspect' is a top-level "
- + "value from from a file tools/my_def.bzl"
- )
+ name = "aspects",
+ converter = Converters.CommaSeparatedOptionListConverter.class,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ allowMultiple = true,
+ help =
+ "Comma-separated list of aspects to be applied to top-level targets. All aspects "
+ + "are applied to all top-level targets independently. Aspects are specified in "
+ + "the form <bzl-file-label>%<aspect_name>, "
+ + "for example '//tools:my_def.bzl%my_aspect', where 'my_aspect' is a top-level "
+ + "value from from a file tools/my_def.bzl")
public List<String> aspects;
public BuildRequestOptions() throws OptionsParsingException {}
diff --git a/src/main/java/com/google/devtools/build/lib/dynamic/DynamicExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/dynamic/DynamicExecutionOptions.java
index 71e9535..100def6 100644
--- a/src/main/java/com/google/devtools/build/lib/dynamic/DynamicExecutionOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/dynamic/DynamicExecutionOptions.java
@@ -85,7 +85,7 @@
converter = Converters.StringToStringListConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
- defaultValue = "",
+ defaultValue = "null",
allowMultiple = true,
help =
"The remote strategies to use for the given mnemonic. Passing 'remote'"
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 fdecd0b..1a1c1bc 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
@@ -88,7 +88,7 @@
name = "strategy",
allowMultiple = true,
converter = Converters.StringToStringListConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -105,7 +105,7 @@
converter = RegexFilterAssignmentConverter.class,
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
- defaultValue = "",
+ defaultValue = "null",
help =
"Override which spawn strategy should be used to execute spawn actions that have "
+ "descriptions matching a certain regex_filter. See --per_file_copt for details on"
diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
index 9c9f99f..4a9d9c5 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java
@@ -99,7 +99,7 @@
@Option(
name = "remote_header",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.REMOTE,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -112,7 +112,7 @@
@Option(
name = "remote_cache_header",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.REMOTE,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -126,7 +126,7 @@
@Option(
name = "remote_exec_header",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.REMOTE,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -140,7 +140,7 @@
@Option(
name = "remote_downloader_header",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.REMOTE,
effectTags = {OptionEffectTag.UNKNOWN},
help =
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java b/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java
index ee41872..a68aeb0 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java
@@ -57,13 +57,12 @@
public String adb;
@Option(
- name = "adb_arg",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
- help = "Extra arguments to pass to adb. Usually used to designate a device to install to."
- )
+ name = "adb_arg",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
+ help = "Extra arguments to pass to adb. Usually used to designate a device to install to.")
public List<String> adbArgs;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/swift/SwiftCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/apple/swift/SwiftCommandLineOptions.java
index ffb9111..545f1af 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/swift/SwiftCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/swift/SwiftCommandLineOptions.java
@@ -23,19 +23,18 @@
/** Command-line options for building with Swift tools. */
public class SwiftCommandLineOptions extends FragmentOptions {
@Option(
- name = "swiftcopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
- help = "Additional options to pass to Swift compilation."
- )
+ name = "swiftcopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
+ help = "Additional options to pass to Swift compilation.")
public List<String> copts;
@Option(
name = "host_swiftcopt",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Additional options to pass to swiftc for host tools.")
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
index 4047d17..2c819fb 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
@@ -266,73 +266,66 @@
public boolean processHeadersInDependencies;
@Option(
- name = "copt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional options to pass to gcc."
- )
+ name = "copt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional options to pass to gcc.")
public List<String> coptList;
@Option(
- name = "cxxopt",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to gcc when compiling C++ source files."
- )
+ name = "cxxopt",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to gcc when compiling C++ source files.")
public List<String> cxxoptList;
@Option(
- name = "conlyopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to gcc when compiling C source files."
- )
+ name = "conlyopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to gcc when compiling C source files.")
public List<String> conlyoptList;
@Option(
- name = "linkopt",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to gcc when linking."
- )
+ name = "linkopt",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to gcc when linking.")
public List<String> linkoptList;
@Option(
- name = "ltoindexopt",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to the LTO indexing step (under --features=thin_lto)."
- )
+ name = "ltoindexopt",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to the LTO indexing step (under --features=thin_lto).")
public List<String> ltoindexoptList;
@Option(
- name = "ltobackendopt",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to the LTO backend step (under --features=thin_lto)."
- )
+ name = "ltobackendopt",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to the LTO backend step (under --features=thin_lto).")
public List<String> ltobackendoptList;
@Option(
- name = "stripopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional options to pass to strip when generating a '<name>.stripped' binary."
- )
+ name = "stripopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional options to pass to strip when generating a '<name>.stripped' binary.")
public List<String> stripoptList;
@Option(
@@ -508,46 +501,44 @@
public boolean saveTemps;
@Option(
- name = "per_file_copt",
- allowMultiple = true,
- converter = PerLabelOptions.PerLabelOptionsConverter.class,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help =
- "Additional options to selectively pass to gcc when compiling certain files. "
- + "This option can be passed multiple times. "
- + "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
- + "for a list of include and exclude regular expression patterns (Also see "
- + "--instrumentation_filter). option_1 to option_n stand for "
- + "arbitrary command line options. If an option contains a comma it has to be "
- + "quoted with a backslash. Options can contain @. Only the first @ is used to "
- + "split the string. Example: "
- + "--per_file_copt=//foo/.*\\.cc,-//foo/bar\\.cc@-O0 adds the -O0 "
- + "command line option to the gcc command line of all cc files in //foo/ "
- + "except bar.cc."
- )
+ name = "per_file_copt",
+ allowMultiple = true,
+ converter = PerLabelOptions.PerLabelOptionsConverter.class,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help =
+ "Additional options to selectively pass to gcc when compiling certain files. "
+ + "This option can be passed multiple times. "
+ + "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
+ + "for a list of include and exclude regular expression patterns (Also see "
+ + "--instrumentation_filter). option_1 to option_n stand for "
+ + "arbitrary command line options. If an option contains a comma it has to be "
+ + "quoted with a backslash. Options can contain @. Only the first @ is used to "
+ + "split the string. Example: "
+ + "--per_file_copt=//foo/.*\\.cc,-//foo/bar\\.cc@-O0 adds the -O0 "
+ + "command line option to the gcc command line of all cc files in //foo/ "
+ + "except bar.cc.")
public List<PerLabelOptions> perFileCopts;
@Option(
- name = "per_file_ltobackendopt",
- allowMultiple = true,
- converter = PerLabelOptions.PerLabelOptionsConverter.class,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help =
- "Additional options to selectively pass to LTO backend (under --features=thin_lto) when "
- + "compiling certain backend objects. This option can be passed multiple times. "
- + "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
- + "for a list of include and exclude regular expression patterns. "
- + "option_1 to option_n stand for arbitrary command line options. "
- + "If an option contains a comma it has to be quoted with a backslash. "
- + "Options can contain @. Only the first @ is used to split the string. Example: "
- + "--per_file_ltobackendopt=//foo/.*\\.o,-//foo/bar\\.o@-O0 adds the -O0 "
- + "command line option to the LTO backend command line of all o files in //foo/ "
- + "except bar.o."
- )
+ name = "per_file_ltobackendopt",
+ allowMultiple = true,
+ converter = PerLabelOptions.PerLabelOptionsConverter.class,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help =
+ "Additional options to selectively pass to LTO backend (under --features=thin_lto) when "
+ + "compiling certain backend objects. This option can be passed multiple times. "
+ + "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
+ + "for a list of include and exclude regular expression patterns. "
+ + "option_1 to option_n stand for arbitrary command line options. "
+ + "If an option contains a comma it has to be quoted with a backslash. "
+ + "Options can contain @. Only the first @ is used to split the string. Example: "
+ + "--per_file_ltobackendopt=//foo/.*\\.o,-//foo/bar\\.o@-O0 adds the -O0 "
+ + "command line option to the LTO backend command line of all o files in //foo/ "
+ + "except bar.o.")
public List<PerLabelOptions> perFileLtoBackendOpts;
@Option(
@@ -568,43 +559,39 @@
public Label hostCrosstoolTop;
@Option(
- name = "host_copt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional options to pass to gcc for host tools."
- )
+ name = "host_copt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional options to pass to gcc for host tools.")
public List<String> hostCoptList;
@Option(
- name = "host_cxxopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional options to pass to gcc for host tools."
- )
+ name = "host_cxxopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional options to pass to gcc for host tools.")
public List<String> hostCxxoptList;
@Option(
- name = "host_conlyopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to gcc when compiling C source files for host tools."
- )
+ name = "host_conlyopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to gcc when compiling C source files for host tools.")
public List<String> hostConlyoptList;
@Option(
- name = "host_linkopt",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional option to pass to gcc when linking host tools."
- )
+ name = "host_linkopt",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional option to pass to gcc when linking host tools.")
public List<String> hostLinkoptList;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java
index 94c8249..29aec10 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java
@@ -119,7 +119,7 @@
@Option(
name = "javacopt",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help = "Additional options to pass to javac.")
@@ -128,7 +128,7 @@
@Option(
name = "host_javacopt",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -139,7 +139,7 @@
@Option(
name = "jvmopt",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -364,7 +364,7 @@
@Option(
name = "extra_proguard_specs",
allowMultiple = true,
- defaultValue = "", // Ignored
+ defaultValue = "null",
converter = LabelConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -409,7 +409,7 @@
@Option(
name = "message_translations",
- defaultValue = "",
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -419,7 +419,7 @@
@Option(
name = "check_constraint",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help = "Check the listed constraint.")
@@ -547,7 +547,7 @@
name = "plugin",
converter = LabelListConverter.class,
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help = "Plugins to use in the build. Currently works with java_plugin.")
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcCommandLineOptions.java
index 829cd02..f7457d9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcCommandLineOptions.java
@@ -29,14 +29,13 @@
*/
public class J2ObjcCommandLineOptions extends FragmentOptions {
@Option(
- name = "j2objc_translation_flags",
- converter = Converters.CommaSeparatedOptionListConverter.class,
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Additional options to pass to the J2ObjC tool."
- )
+ name = "j2objc_translation_flags",
+ converter = Converters.CommaSeparatedOptionListConverter.class,
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Additional options to pass to the J2ObjC tool.")
public List<String> translationFlags;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
index 4c5d7e7..b15f252 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommandLineOptions.java
@@ -100,13 +100,12 @@
public boolean generateLinkmap;
@Option(
- name = "objccopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
- effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
- help = "Additional options to pass to Objective C compilation."
- )
+ name = "objccopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
+ help = "Additional options to pass to Objective C compilation.")
public List<String> copts;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
index dfe5e9e..052b62c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
@@ -55,13 +55,12 @@
public boolean generatedProtosInVirtualImports;
@Option(
- name = "protocopt",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
- help = "Additional options to pass to the protobuf compiler."
- )
+ name = "protocopt",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
+ help = "Additional options to pass to the protobuf compiler.")
public List<String> protocOpts;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ClientOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/ClientOptions.java
index 431c4fb..7c442c9 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/ClientOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/ClientOptions.java
@@ -98,15 +98,14 @@
}
@Option(
- name = "client_env",
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- metadataTags = {OptionMetadataTag.HIDDEN},
- effectTags = {OptionEffectTag.CHANGES_INPUTS},
- converter = Converters.AssignmentConverter.class,
- allowMultiple = true,
- help = "A system-generated parameter which specifies the client's environment"
- )
+ name = "client_env",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ metadataTags = {OptionMetadataTag.HIDDEN},
+ effectTags = {OptionEffectTag.CHANGES_INPUTS},
+ converter = Converters.AssignmentConverter.class,
+ allowMultiple = true,
+ help = "A system-generated parameter which specifies the client's environment")
public List<Map.Entry<String, String>> clientEnv;
/**
@@ -116,26 +115,24 @@
* <p>For example: "--default_override=rc:build=--cpu=piii"
*/
@Option(
- name = "default_override",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.CHANGES_INPUTS},
- metadataTags = {OptionMetadataTag.HIDDEN},
- converter = OptionOverrideConverter.class,
- help = ""
- )
+ name = "default_override",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.CHANGES_INPUTS},
+ metadataTags = {OptionMetadataTag.HIDDEN},
+ converter = OptionOverrideConverter.class,
+ help = "")
public List<OptionOverride> optionsOverrides;
/** This is the filename that the Blaze client parsed. */
@Option(
- name = "rc_source",
- defaultValue = "",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.CHANGES_INPUTS},
- metadataTags = {OptionMetadataTag.HIDDEN},
- help = ""
- )
+ name = "rc_source",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.CHANGES_INPUTS},
+ metadataTags = {OptionMetadataTag.HIDDEN},
+ help = "")
public List<String> rcSource;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 218dd2d..a9a9aac 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -71,18 +71,17 @@
public boolean enablePlatformSpecificConfig;
@Option(
- name = "config",
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- allowMultiple = true,
- help =
- "Selects additional config sections from the rc files; for every <command>, it "
- + "also pulls in the options from <command>:<config> if such a section exists; "
- + "if this section doesn't exist in any .rc file, Blaze fails with an error. "
- + "The config sections and flag combinations they are equivalent to are "
- + "located in the tools/*.blazerc config files."
- )
+ name = "config",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ allowMultiple = true,
+ help =
+ "Selects additional config sections from the rc files; for every <command>, it "
+ + "also pulls in the options from <command>:<config> if such a section exists; "
+ + "if this section doesn't exist in any .rc file, Blaze fails with an error. "
+ + "The config sections and flag combinations they are equivalent to are "
+ + "located in the tools/*.blazerc config files.")
public List<String> configs;
@Option(
@@ -206,7 +205,7 @@
@Option(
name = "build_metadata",
converter = AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
@@ -495,18 +494,17 @@
public ToolCommandLineEvent toolCommandLine;
@Option(
- name = "unconditional_warning",
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
- allowMultiple = true,
- help =
- "A warning that will unconditionally get printed with build warnings and errors. This is "
- + "useful to deprecate bazelrc files or --config definitions. If the intent is to "
- + "effectively deprecate some flag or combination of flags, this is NOT sufficient. "
- + "The flag or flags should use the deprecationWarning field in the option definition, "
- + "or the bad combination should be checked for programmatically."
- )
+ name = "unconditional_warning",
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
+ allowMultiple = true,
+ help =
+ "A warning that will unconditionally get printed with build warnings and errors. This is"
+ + " useful to deprecate bazelrc files or --config definitions. If the intent is to"
+ + " effectively deprecate some flag or combination of flags, this is NOT sufficient."
+ + " The flag or flags should use the deprecationWarning field in the option"
+ + " definition, or the bad combination should be checked for programmatically.")
public List<String> deprecationWarnings;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
index 3677c7c..7a3ae9e 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java
@@ -39,14 +39,13 @@
public String serverJavabase;
@Option(
- name = "host_jvm_args",
- defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
- allowMultiple = true,
- valueHelp = "<jvm_arg>",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Flags to pass to the JVM executing Blaze."
- )
+ name = "host_jvm_args",
+ defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions.
+ allowMultiple = true,
+ valueHelp = "<jvm_arg>",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Flags to pass to the JVM executing Blaze.")
public List<String> hostJvmArgs;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/PrintActionCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/PrintActionCommand.java
index 4c4e2ae..4f9e458 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/PrintActionCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/PrintActionCommand.java
@@ -84,15 +84,14 @@
*/
public static class PrintActionOptions extends OptionsBase {
@Option(
- name = "print_action_mnemonics",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "Lists which mnemonics to filter print_action data by, no filtering takes place "
- + "when left empty."
- )
+ name = "print_action_mnemonics",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Lists which mnemonics to filter print_action data by, no filtering takes place "
+ + "when left empty.")
public List<String> printActionMnemonics = new ArrayList<>();
}
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxOptions.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxOptions.java
index efe65ed..c56cf98 100644
--- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxOptions.java
@@ -133,48 +133,44 @@
public boolean sandboxFakeUsername;
@Option(
- name = "sandbox_block_path",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "For sandboxed actions, disallow access to this path."
- )
+ name = "sandbox_block_path",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "For sandboxed actions, disallow access to this path.")
public List<String> sandboxBlockPath;
@Option(
- name = "sandbox_tmpfs_path",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "For sandboxed actions, mount an empty, writable directory at this path"
- + " (if supported by the sandboxing implementation, ignored otherwise)."
- )
+ name = "sandbox_tmpfs_path",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "For sandboxed actions, mount an empty, writable directory at this path"
+ + " (if supported by the sandboxing implementation, ignored otherwise).")
public List<String> sandboxTmpfsPath;
@Option(
- name = "sandbox_writable_path",
- allowMultiple = true,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "For sandboxed actions, make an existing directory writable in the sandbox"
- + " (if supported by the sandboxing implementation, ignored otherwise)."
- )
+ name = "sandbox_writable_path",
+ allowMultiple = true,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "For sandboxed actions, make an existing directory writable in the sandbox"
+ + " (if supported by the sandboxing implementation, ignored otherwise).")
public List<String> sandboxWritablePath;
@Option(
- name = "sandbox_add_mount_pair",
- allowMultiple = true,
- converter = MountPairConverter.class,
- defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Add additional path pair to mount in sandbox."
- )
+ name = "sandbox_add_mount_pair",
+ allowMultiple = true,
+ converter = MountPairConverter.class,
+ defaultValue = "null",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Add additional path pair to mount in sandbox.")
public List<ImmutableMap.Entry<String, String>> sandboxAdditionalMounts;
@Option(
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerOptions.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerOptions.java
index 6d7773b..8495b89 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/WorkerOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerOptions.java
@@ -101,7 +101,7 @@
@Option(
name = "high_priority_workers",
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
@@ -131,7 +131,7 @@
@Option(
name = "worker_extra_flag",
converter = Converters.AssignmentConverter.class,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
diff --git a/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java b/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
index 345ae1a..d1635be 100644
--- a/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
+++ b/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
@@ -50,7 +50,7 @@
@Option(
name = "symbols",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.UNKNOWN,
help =
@@ -63,7 +63,7 @@
@Option(
name = "dep_roots",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.UNKNOWN,
help = "File path roots to search when resolving transitive bzl dependencies")
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/ConfigurationTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/ConfigurationTestCase.java
index 96051a6..e441fb0 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/ConfigurationTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/ConfigurationTestCase.java
@@ -73,14 +73,13 @@
public static final class TestOptions extends OptionsBase {
@Option(
- name = "multi_cpu",
- converter = Converters.CommaSeparatedOptionListConverter.class,
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.NO_OP},
- defaultValue = "",
- help = "Additional target CPUs."
- )
+ name = "multi_cpu",
+ converter = Converters.CommaSeparatedOptionListConverter.class,
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "null",
+ help = "Additional target CPUs.")
public List<String> multiCpus;
}
diff --git a/src/test/java/com/google/devtools/common/options/OptionsParserTest.java b/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
index 0b6e311..01e2baa 100644
--- a/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
+++ b/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
@@ -93,24 +93,22 @@
public int bar;
@Option(
- name = "bing",
- category = "one",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.NO_OP},
- defaultValue = "",
- allowMultiple = true
- )
+ name = "bing",
+ category = "one",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "null",
+ allowMultiple = true)
public List<String> bing;
@Option(
- name = "bang",
- category = "one",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.NO_OP},
- defaultValue = "",
- converter = StringConverter.class,
- allowMultiple = true
- )
+ name = "bang",
+ category = "one",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "null",
+ converter = StringConverter.class,
+ allowMultiple = true)
public List<String> bang;
@Option(
diff --git a/src/test/java/com/google/devtools/common/options/TestOptions.java b/src/test/java/com/google/devtools/common/options/TestOptions.java
index d006240..3fbaa38 100644
--- a/src/test/java/com/google/devtools/common/options/TestOptions.java
+++ b/src/test/java/com/google/devtools/common/options/TestOptions.java
@@ -51,13 +51,12 @@
*/
@Option(
- name = "test_multiple_string",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.NO_OP},
- defaultValue = "", // default value is ignored when allowMultiple=true.
- allowMultiple = true,
- help = "a repeatable string-valued flag with its own unhelpful help text"
- )
+ name = "test_multiple_string",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "null",
+ allowMultiple = true,
+ help = "a repeatable string-valued flag with its own unhelpful help text")
public List<String> testMultipleString;
/*
@@ -65,16 +64,15 @@
*/
@Option(
- name = "test_list_converters",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.NO_OP},
- defaultValue = "",
- allowMultiple = true,
- converter = ToListConverter.class,
- help =
- "a repeatable flag that accepts lists, but doesn't want to have lists of lists "
- + "as a final type"
- )
+ name = "test_list_converters",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "null",
+ allowMultiple = true,
+ converter = ToListConverter.class,
+ help =
+ "a repeatable flag that accepts lists, but doesn't want to have lists of lists "
+ + "as a final type")
public List<String> testListConverters;
/*
diff --git a/src/tools/android/java/com/google/devtools/build/android/AarGeneratorAction.java b/src/tools/android/java/com/google/devtools/build/android/AarGeneratorAction.java
index cb27c03..939dfaf 100644
--- a/src/tools/android/java/com/google/devtools/build/android/AarGeneratorAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/AarGeneratorAction.java
@@ -127,15 +127,14 @@
public Path classes;
@Option(
- name = "proguardSpec",
- defaultValue = "",
- converter = ExistingPathConverter.class,
- allowMultiple = true,
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Path to proguard spec file."
- )
+ name = "proguardSpec",
+ defaultValue = "null",
+ converter = ExistingPathConverter.class,
+ allowMultiple = true,
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Path to proguard spec file.")
public List<Path> proguardSpecs;
@Option(
diff --git a/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java b/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java
index b7acc95..fa4f41e 100644
--- a/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java
@@ -93,17 +93,16 @@
public String packageForR;
@Option(
- name = "library",
- allowMultiple = true,
- defaultValue = "",
- converter = DependencySymbolFileProviderConverter.class,
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "R.txt and manifests for the libraries in this binary's deps. We will write "
- + "class files for the libraries as well. Expected format: lib1/R.txt[:lib2/R.txt]"
- )
+ name = "library",
+ allowMultiple = true,
+ defaultValue = "null",
+ converter = DependencySymbolFileProviderConverter.class,
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "R.txt and manifests for the libraries in this binary's deps. We will write "
+ + "class files for the libraries as well. Expected format: lib1/R.txt[:lib2/R.txt]")
public List<DependencySymbolFileProvider> libraries;
@Option(
diff --git a/src/tools/android/java/com/google/devtools/build/android/ResourceShrinkerAction.java b/src/tools/android/java/com/google/devtools/build/android/ResourceShrinkerAction.java
index 08ee82f..86691c9 100644
--- a/src/tools/android/java/com/google/devtools/build/android/ResourceShrinkerAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/ResourceShrinkerAction.java
@@ -131,15 +131,14 @@
public Path primaryManifest;
@Option(
- name = "dependencyManifest",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- converter = PathConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Paths to the manifests of the dependencies. Specify one path per flag."
- )
+ name = "dependencyManifest",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ converter = PathConverter.class,
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Paths to the manifests of the dependencies. Specify one path per flag.")
public List<Path> dependencyManifests;
@Option(
diff --git a/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java b/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java
index 1cd3821..d463586 100644
--- a/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/ValidateAndLinkResourcesAction.java
@@ -59,7 +59,7 @@
name = "compiledDep",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
- defaultValue = "",
+ defaultValue = "null",
converter = Converters.PathListConverter.class,
category = "input",
allowMultiple = true,
diff --git a/src/tools/android/java/com/google/devtools/build/android/desugar/Desugar.java b/src/tools/android/java/com/google/devtools/build/android/desugar/Desugar.java
index 0353151..8dce30e 100644
--- a/src/tools/android/java/com/google/devtools/build/android/desugar/Desugar.java
+++ b/src/tools/android/java/com/google/devtools/build/android/desugar/Desugar.java
@@ -91,7 +91,7 @@
@Option(
name = "input",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
category = "input",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -105,7 +105,7 @@
@Option(
name = "classpath_entry",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
category = "input",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -118,7 +118,7 @@
@Option(
name = "bootclasspath_entry",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
category = "input",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -159,7 +159,7 @@
@Option(
name = "output",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
category = "output",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -279,7 +279,7 @@
/** Type prefixes that we'll move to a custom package. */
@Option(
name = "rewrite_core_library_prefix",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -289,7 +289,7 @@
/** Interfaces whose default and static interface methods we'll emulate. */
@Option(
name = "emulate_core_library_interface",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -299,7 +299,7 @@
/** Members that we will retarget to the given new owner. */
@Option(
name = "retarget_core_library_member",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -311,7 +311,7 @@
/** Members not to rewrite. */
@Option(
name = "dont_rewrite_core_library_invocation",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -321,7 +321,7 @@
/** Converter functions from undesugared to desugared core library types. */
@Option(
name = "from_core_library_conversion",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
@@ -333,7 +333,7 @@
@Option(
name = "preserve_core_library_override",
- defaultValue = "", // ignored
+ defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
diff --git a/src/tools/android/java/com/google/devtools/build/android/desugar/scan/KeepScanner.java b/src/tools/android/java/com/google/devtools/build/android/desugar/scan/KeepScanner.java
index ab16407..9b03b04 100644
--- a/src/tools/android/java/com/google/devtools/build/android/desugar/scan/KeepScanner.java
+++ b/src/tools/android/java/com/google/devtools/build/android/desugar/scan/KeepScanner.java
@@ -68,7 +68,7 @@
@Option(
name = "classpath_entry",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
@@ -80,7 +80,7 @@
@Option(
name = "bootclasspath_entry",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
diff --git a/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileMerger.java b/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileMerger.java
index 8ecf6cc..2894b64 100644
--- a/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileMerger.java
+++ b/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileMerger.java
@@ -76,18 +76,18 @@
*/
public static class Options extends OptionsBase {
@Option(
- name = "input",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- abbrev = 'i',
- help = "Input archives with .dex files to merge. Inputs are processed in given order, so "
- + "classes from later inputs will be added after earlier inputs. Duplicate classes "
- + "are dropped."
- )
+ name = "input",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ abbrev = 'i',
+ help =
+ "Input archives with .dex files to merge. Inputs are processed in given order, so"
+ + " classes from later inputs will be added after earlier inputs. Duplicate"
+ + " classes are dropped.")
public List<Path> inputArchives;
@Option(
diff --git a/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileSplitter.java b/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileSplitter.java
index 3f09471..78ab87d 100644
--- a/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileSplitter.java
+++ b/src/tools/android/java/com/google/devtools/build/android/dexer/DexFileSplitter.java
@@ -60,16 +60,15 @@
*/
public static class Options extends OptionsBase {
@Option(
- name = "input",
- allowMultiple = true,
- defaultValue = "",
- category = "input",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- converter = ExistingPathConverter.class,
- abbrev = 'i',
- help = "Input dex archive."
- )
+ name = "input",
+ allowMultiple = true,
+ defaultValue = "null",
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = ExistingPathConverter.class,
+ abbrev = 'i',
+ help = "Input dex archive.")
public List<Path> inputArchives;
@Option(
diff --git a/src/tools/android/java/com/google/devtools/build/android/r8/DexFileMerger.java b/src/tools/android/java/com/google/devtools/build/android/r8/DexFileMerger.java
index d0ef675..0b7518c 100644
--- a/src/tools/android/java/com/google/devtools/build/android/r8/DexFileMerger.java
+++ b/src/tools/android/java/com/google/devtools/build/android/r8/DexFileMerger.java
@@ -110,7 +110,7 @@
@Option(
name = "input",
allowMultiple = true,
- defaultValue = "",
+ defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
diff --git a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
index 78141a1..c6b876a 100644
--- a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
+++ b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorkerOptions.java
@@ -92,25 +92,23 @@
public boolean sandboxing;
@Option(
- name = "sandboxing_writable_path",
- defaultValue = "",
- category = "build_worker",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- allowMultiple = true,
- help = "When using sandboxing, allow running actions to write to this path."
- )
+ name = "sandboxing_writable_path",
+ defaultValue = "null",
+ category = "build_worker",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ allowMultiple = true,
+ help = "When using sandboxing, allow running actions to write to this path.")
public List<String> sandboxingWritablePaths;
@Option(
- name = "sandboxing_tmpfs_dir",
- defaultValue = "",
- category = "build_worker",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- allowMultiple = true,
- help = "When using sandboxing, mount an empty tmpfs onto this path for each running action."
- )
+ name = "sandboxing_tmpfs_dir",
+ defaultValue = "null",
+ category = "build_worker",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ allowMultiple = true,
+ help = "When using sandboxing, mount an empty tmpfs onto this path for each running action.")
public List<String> sandboxingTmpfsDirs;
@Option(