Remove CustomArgv. It is unused.
PiperOrigin-RevId: 165731260
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java b/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
index 008f7de..02998a1 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
@@ -76,24 +76,11 @@
abstract void eval(ImmutableList.Builder<String> builder);
}
- // TODO(bazel-team): CustomArgv and CustomMultiArgv is going to be difficult to expose
+ // TODO(bazel-team): CustomMultiArgv is going to be difficult to expose
// in Skylark. Maybe we can get rid of them by refactoring JavaCompileAction. It also
// raises immutability / serialization issues.
- /** Custom Java code producing a String argument. Usage of this class is discouraged. */
- public abstract static class CustomArgv extends StandardArgvFragment {
-
- @Override
- void eval(ImmutableList.Builder<String> builder) {
- builder.add(argv());
- }
-
- public abstract String argv();
- }
-
/**
* Custom Java code producing a List of String arguments.
- *
- * <p>Usage of this class is discouraged. Please see {@link CustomArgv}.
*/
public abstract static class CustomMultiArgv extends StandardArgvFragment {
@@ -828,13 +815,6 @@
return this;
}
- public Builder addCustomArgv(@Nullable CustomArgv arg) {
- if (arg != null) {
- arguments.add(arg);
- }
- return this;
- }
-
public Builder addCustomMultiArgv(@Nullable CustomMultiArgv arg) {
if (arg != null) {
arguments.add(arg);
diff --git a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
index b563b4c..6b1b9e6 100644
--- a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
+++ b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
@@ -22,7 +22,6 @@
import com.google.devtools.build.lib.actions.Artifact.SpecialArtifactType;
import com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine;
-import com.google.devtools.build.lib.analysis.actions.CustomCommandLine.CustomArgv;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine.CustomMultiArgv;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine.VectorArg;
import com.google.devtools.build.lib.cmdline.Label;
@@ -161,21 +160,6 @@
}
@Test
- public void testCustomArgs() {
- CustomCommandLine cl =
- CustomCommandLine.builder()
- .addCustomArgv(
- new CustomArgv() {
- @Override
- public String argv() {
- return "--arg";
- }
- })
- .build();
- assertThat(cl.arguments()).isEqualTo(ImmutableList.of("--arg"));
- }
-
- @Test
public void testCustomMultiArgs() {
CustomCommandLine cl =
CustomCommandLine.builder()
@@ -259,7 +243,6 @@
.addExecPaths("foo", VectorArg.of((ImmutableList<Artifact>) null))
.addExecPaths("foo", VectorArg.of(ImmutableList.of()))
.addPlaceholderTreeArtifactExecPath("foo", null)
- .addCustomArgv((CustomArgv) null)
.addCustomMultiArgv((CustomMultiArgv) null)
.build();
assertThat(cl.arguments()).isEmpty();