aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-10-17 23:27:19 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-10-18 10:28:26 +0200
commit34a9fea78f201caed8ace5c714a0cf288cb97c65 (patch)
treec3bf1099536ea9b4160c346822833ac47dd56554 /src/test/java/com/google/devtools/build
parent1606cf208cc5194b13ca212819371f7e4ba43a6b (diff)
Remove feature to allow expansion flags to have values.
It was added as a potential fix for --config (an expansion flag with values), but this would have required forcing the parser to know the config's expansions at parsing time, which is not currently possible. Instead, we will use the new addition of option-location tracking to make sure we expand options at a the correct place, even if the expansion is triggered after the fact. This is mostly a straight forward undoing of https://github.com/bazelbuild/bazel/commit/7c7255ec8d6da20526c2c4078c57aadaf3dd3612, except where the context has changed. Notably, implicit requirements are effectively treated like expansion flags, so special casing in OptionDescription could be removed. RELNOTES: None. PiperOrigin-RevId: 172514997
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansionTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansionTest.java b/src/test/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansionTest.java
index 8b978d0e3d..1c34878715 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansionTest.java
@@ -21,9 +21,9 @@ import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.InvocationPolicy;
import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.UseDefault;
import com.google.devtools.common.options.Converters;
-import com.google.devtools.common.options.ExpansionContext;
import com.google.devtools.common.options.ExpansionFunction;
import com.google.devtools.common.options.InvocationPolicyEnforcer;
+import com.google.devtools.common.options.IsolatedOptionsData;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionEffectTag;
@@ -110,7 +110,7 @@ public class AllIncompatibleChangesExpansionTest {
/** Dummy comment (linter suppression) */
public static class YExpansion implements ExpansionFunction {
@Override
- public ImmutableList<String> getExpansion(ExpansionContext context) {
+ public ImmutableList<String> getExpansion(IsolatedOptionsData optionsData) {
return ImmutableList.of("--noY");
}
}