aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-06-27 17:58:35 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-28 10:17:40 +0200
commit3bc1547a5cd78bd6639d968b3cfddbe26b1c31d5 (patch)
treead80da2596d9150632ca6a1f1510060fe849fa3a /src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java
parent9b394a24dc65c794242e98a8a41eb8a60c78367b (diff)
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
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java
index 1edc643ac8..512b5c0f3b 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelStrategyModule.java
@@ -23,8 +23,9 @@ import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.common.options.Converters.AssignmentConverter;
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.proto.OptionFilters.OptionEffectTag;
import java.util.List;
import java.util.Map;
@@ -38,6 +39,8 @@ public class BazelStrategyModule extends BlazeModule {
name = "spawn_strategy",
defaultValue = "",
category = "strategy",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specify how spawn actions are executed by default."
+ "'standalone' means run all of them locally."
@@ -49,6 +52,8 @@ public class BazelStrategyModule extends BlazeModule {
name = "genrule_strategy",
defaultValue = "",
category = "strategy",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Specify how to execute genrules."
+ "'standalone' means run all of them locally."
@@ -56,14 +61,19 @@ public class BazelStrategyModule extends BlazeModule {
)
public String genruleStrategy;
- @Option(name = "strategy",
- allowMultiple = true,
- converter = AssignmentConverter.class,
- defaultValue = "",
- category = "strategy",
- help = "Specify how to distribute compilation of other spawn actions. "
- + "Example: 'Javac=local' means to spawn Java compilation locally. "
- + "'JavaIjar=sandboxed' means to spawn Java Ijar actions in a sandbox. ")
+ @Option(
+ name = "strategy",
+ allowMultiple = true,
+ converter = AssignmentConverter.class,
+ defaultValue = "",
+ category = "strategy",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "Specify how to distribute compilation of other spawn actions. "
+ + "Example: 'Javac=local' means to spawn Java compilation locally. "
+ + "'JavaIjar=sandboxed' means to spawn Java Ijar actions in a sandbox. "
+ )
public List<Map.Entry<String, String>> strategy;
}