Add runfiles to metadata caches and make them isFile aware
--
MOS_MIGRATED_REVID=94318260
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java
index 7275222..59224fb 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java
@@ -199,7 +199,7 @@
throw new FileNotFoundException(artifact.prettyPrint() + " does not exist");
}
boolean isFile = data.isFile();
- boolean useDigest = DigestUtils.useFileDigest(artifact, isFile, isFile ? data.getSize() : 0);
+ boolean useDigest = DigestUtils.useFileDigest(isFile, isFile ? data.getSize() : 0);
if (useDigest && data.getDigest() != null) {
// We do not need to store the FileArtifactValue separately -- the digest is in the file value
// and that is all that is needed for this file's metadata.
@@ -301,7 +301,7 @@
// Currently this method is used only for genrule input directory checks. If we need to call
// this on output artifacts too, this could be more efficient.
FileArtifactValue value = getInputFileArtifactValue(artifact);
- if (value != null && value.getDigest() != null) {
+ if (value != null && value.isFile()) {
return true;
}
return artifact.getPath().isFile();