Skip to content

Commit

Permalink
Remove RunfilesSupplier.withOverriddenRunfilesDir() in favor of a wra…
Browse files Browse the repository at this point in the history
…pper class.

This makes RunfilesSupplier a little narrower, thus making its eventual merging with runfiles middlemen easier.

RELNOTES: None.
PiperOrigin-RevId: 591322343
Change-Id: Ia80a36199cef1ef7a757646eb74d82121dffedce
  • Loading branch information
lberki authored and copybara-github committed Dec 15, 2023
1 parent a9eee3a commit bbc4b12
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,4 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) {
return false;
}

@Override
public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,4 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) {
return false;
}

@Override
public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,4 @@ public ImmutableMap<PathFragment, Map<PathFragment, Artifact>> getMappings() {
/* eventHandler= */ null, /* location= */ null, repoMappingManifest));
}

@Override
public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) {
return newRunfilesDir.equals(getRunfilesDirectoryExecPath())
? this
: new SingleRunfilesSupplier(
newRunfilesDir,
runfiles,
repoMappingManifest,
runfileSymlinksMode,
buildRunfileLinks);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2501,10 +2501,6 @@ public boolean isBuildRunfileLinks(PathFragment runfilesDir) {
throw new UnsupportedOperationException();
}

@Override
public RunfilesSupplier withOverriddenRunfilesDir(PathFragment newRunfilesDir) {
throw new UnsupportedOperationException();
}
};
}

Expand Down

0 comments on commit bbc4b12

Please sign in to comment.