Skip to content

Commit

Permalink
Automated rollback of commit abe1f66.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

b/369785485#comment12

*** Original change description ***

Extract a `HasExecPath` interface from `ActionInput`.

PiperOrigin-RevId: 680556719
Change-Id: I8410c9b4b9aeb462f51dd1fdbcb02d08f8cc5d1a
  • Loading branch information
jin authored and copybara-github committed Sep 30, 2024
1 parent df6f1ea commit 6f946cf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,26 @@
/**
* Represents an input file to a build action, with an appropriate relative path.
*
* <p>Artifact is the only notable implementer of the interface, but the interface remains because
* 1) some Google specific rules ship files that could be Artifacts to remote execution by
* instantiating ad-hoc derived classes of ActionInput. 2) historically, Google C++ rules allow
* underspecified C++ builds. For that case, we have extra logic to guess the undeclared header
* inclusions (eg. computed inclusions). The extra logic lives in a file that is not needed for
* remote execution, but is a dependency, and it is inserted as a non-Artifact ActionInput.
* <p>Artifact is the only notable implementer of the interface, but the interface remains
* because 1) some Google specific rules ship files that could be Artifacts to remote execution
* by instantiating ad-hoc derived classes of ActionInput. 2) historically, Google C++ rules
* allow underspecified C++ builds. For that case, we have extra logic to guess the undeclared
* header inclusions (eg. computed inclusions). The extra logic lives in a file that is not
* needed for remote execution, but is a dependency, and it is inserted as a non-Artifact
* ActionInput.
*
* <p>ActionInput is used as a cache "key" for ActionInputFileCache: for Artifacts, the
* digest/size is already stored in Artifact, but for non-artifacts, we use getExecPathString
* to find this data in a filesystem related cache.
*/
public interface ActionInput extends HasExecPathString {
public interface ActionInput {

/** @return the relative path to the input file. */
String getExecPathString();

/** Same as {@link #getExecPathString}, but returns a {@link PathFragment}. */
/**
* @return the relative path to the input file.
*/
PathFragment getExecPath();

/** The input is a directory. */
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/google/devtools/build/lib/actions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ java_library(
"ArtifactResolver.java",
"ArtifactRoot.java",
"Artifacts.java",
"HasExecPathString.java",
"PathMapper.java",
],
deps = [
Expand Down

This file was deleted.

0 comments on commit 6f946cf

Please sign in to comment.