aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar twerth <twerth@google.com>2018-08-02 05:27:50 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-02 05:29:29 -0700
commitc004ff117ad72fd387102600e4be47fddf7bc2ae (patch)
treedb2a9f3278e540b0eb46c1cd1f88cc85b6f37f04 /src/main/java/com/google/devtools/build/lib/actions
parent36fbbde3a5a0e570ba55ea1e7d4dc3b26b135a20 (diff)
Automated rollback of commit a6255612e4892729d3758775c76085b26b9bc584.
*** Reason for rollback *** Breaks FDO builds, see http://b/112112125 *** Original change description *** Remove PerActionFileCache Instead, make ActionMetadataHandler implement the MetadataProvider interface. This fixes an issue where an action that runs two spawns where one depends on an output of the other was unable to get the metadata for the intermediate output. We don't currently have actions that do this, but we will have in a future change (which will also implicitly act as a regression test). PiperOrigin-RevId: 207084179
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/cache/MetadataHandler.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/MetadataHandler.java b/src/main/java/com/google/devtools/build/lib/actions/cache/MetadataHandler.java
index fc61397318..62d03fd372 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/cache/MetadataHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/cache/MetadataHandler.java
@@ -17,7 +17,6 @@ import com.google.devtools.build.lib.actions.ActionInput;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact;
import com.google.devtools.build.lib.actions.FileArtifactValue;
-import com.google.devtools.build.lib.actions.MetadataProvider;
import com.google.devtools.build.lib.vfs.FileStatus;
import java.io.IOException;
@@ -31,9 +30,15 @@ import java.io.IOException;
* <p>Note that implementations of this interface call chmod on output files if {@link
* #discardOutputMetadata} has been called.
*/
-public interface MetadataHandler extends MetadataProvider {
- @Override
- FileArtifactValue getMetadata(ActionInput actionInput) throws IOException;
+public interface MetadataHandler {
+ /**
+ * Returns metadata for the given artifact or throws an exception if the metadata could not be
+ * obtained.
+ *
+ * @return metadata instance
+ * @throws IOException if metadata could not be obtained.
+ */
+ FileArtifactValue getMetadata(Artifact artifact) throws IOException;
/** Sets digest for virtual artifacts (e.g. middlemen). {@code md5Digest} must not be null. */
void setDigestForVirtualArtifact(Artifact artifact, Md5Digest md5Digest);