aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java22
2 files changed, 15 insertions, 13 deletions
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 e5869a6ad1..fe2f272fca 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
@@ -537,7 +537,7 @@ public final class BuildConfiguration implements BuildEvent {
// used only for building plugins.
@Option(
name = "plugin",
- converter = LabelConverter.class,
+ converter = LabelListConverter.class,
allowMultiple = true,
defaultValue = "",
category = "flags",
@@ -916,7 +916,7 @@ public final class BuildConfiguration implements BuildEvent {
allowMultiple = true,
defaultValue = "",
category = "experimental",
- converter = LabelConverter.class,
+ converter = LabelListConverter.class,
help = "Use action_listener to attach an extra_action to existing build actions."
)
public List<Label> actionListeners;
@@ -958,7 +958,7 @@ public final class BuildConfiguration implements BuildEvent {
@Option(
name = "target_environment",
- converter = LabelConverter.class,
+ converter = LabelListConverter.class,
allowMultiple = true,
defaultValue = "",
category = "flags",
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
index dd5b81d58b..821e62b0de 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
@@ -327,16 +327,18 @@ public final class BuildTool {
}
SupportedEnvironmentsProvider provider =
Verify.verifyNotNull(asProvider.getProvider(SupportedEnvironmentsProvider.class));
- Collection<Label> missingEnvironments = ConstraintSemantics.getUnsupportedEnvironments(
- provider.getRefinedEnvironments(), expectedEnvironments);
- if (!missingEnvironments.isEmpty()) {
- throw new ViewCreationFailedException(
- String.format("This is a restricted-environment build. %s does not support"
- + " required environment%s %s",
- topLevelTarget.getLabel(),
- missingEnvironments.size() == 1 ? "" : "s",
- Joiner.on(", ").join(missingEnvironments)));
- }
+ Collection<Label> missingEnvironments =
+ ConstraintSemantics.getUnsupportedEnvironments(
+ provider.getRefinedEnvironments(), expectedEnvironments);
+ if (!missingEnvironments.isEmpty()) {
+ throw new ViewCreationFailedException(
+ String.format(
+ "This is a restricted-environment build. %s does not support"
+ + " required environment%s %s",
+ topLevelTarget.getLabel(),
+ missingEnvironments.size() == 1 ? "" : "s",
+ Joiner.on(", ").join(missingEnvironments)));
+ }
}
}