diff --git a/src/main/java/com/google/devtools/build/lib/actions/CompositeRunfilesSupplier.java b/src/main/java/com/google/devtools/build/lib/actions/CompositeRunfilesSupplier.java index 918f189903c96b..5748aba445da21 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/CompositeRunfilesSupplier.java +++ b/src/main/java/com/google/devtools/build/lib/actions/CompositeRunfilesSupplier.java @@ -120,8 +120,4 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) { return false; } - @Override - public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) { - throw new UnsupportedOperationException(); - } } diff --git a/src/main/java/com/google/devtools/build/lib/actions/EmptyRunfilesSupplier.java b/src/main/java/com/google/devtools/build/lib/actions/EmptyRunfilesSupplier.java index ee3629c221c4d9..1376bf11be471d 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/EmptyRunfilesSupplier.java +++ b/src/main/java/com/google/devtools/build/lib/actions/EmptyRunfilesSupplier.java @@ -59,8 +59,4 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) { return false; } - @Override - public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) { - throw new UnsupportedOperationException(); - } } diff --git a/src/main/java/com/google/devtools/build/lib/actions/RunfilesSupplier.java b/src/main/java/com/google/devtools/build/lib/actions/RunfilesSupplier.java index 42fdc449a32428..1971e5e4a684b6 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/RunfilesSupplier.java +++ b/src/main/java/com/google/devtools/build/lib/actions/RunfilesSupplier.java @@ -62,13 +62,4 @@ public interface RunfilesSupplier extends StarlarkValue { * @param runfilesDir runfiles directory relative to the exec root */ boolean isBuildRunfileLinks(PathFragment runfilesDir); - - /** - * Returns a {@link RunfilesSupplier} identical to this one, but with the given runfiles - * directory. - * - *

Must only be called on suppliers with a single runfiles directory, i.e. {@link - * #getRunfilesDirs} returns a set of size 1. - */ - RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir); } diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java index 3a81968930b68e..f1739aef3765bc 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java @@ -554,15 +554,4 @@ public ImmutableMap> getMappings() { /* eventHandler= */ null, /* location= */ null, repoMappingManifest)); } - @Override - public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) { - return newRunfilesDir.equals(getRunfilesDirectoryExecPath()) - ? this - : new SingleRunfilesSupplier( - newRunfilesDir, - runfiles, - repoMappingManifest, - runfileSymlinksMode, - buildRunfileLinks); - } } diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SingleRunfilesSupplier.java b/src/main/java/com/google/devtools/build/lib/analysis/SingleRunfilesSupplier.java index c63d4c03f171d2..83d9edeeaafb77 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/SingleRunfilesSupplier.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/SingleRunfilesSupplier.java @@ -153,7 +153,6 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) { return buildRunfileLinks && this.runfilesDir.equals(runfilesDir); } - @Override public SingleRunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) { return newRunfilesDir.equals(runfilesDir) ? this diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java index eaaad2203fefe3..c021f4c48757cc 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteExecutionServiceTest.java @@ -2501,10 +2501,6 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) { throw new UnsupportedOperationException(); } - @Override - public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) { - throw new UnsupportedOperationException(); - } }; }