aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/exec
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-04-06 17:26:59 +0000
committerGravatar John Field <jfield@google.com>2015-04-06 18:48:57 +0000
commitc2dd80f773174e496dd53c40d287a7e7b705b960 (patch)
tree4817b64b62239b6604d9d3354d3f25a2f74acf87 /src/main/java/com/google/devtools/build/lib/exec
parent06f446a697d9f0eefad3b5e5bf070a751e3c5efc (diff)
Mostly-automated roll-forward to return ActionInput objects from the ActionInputFileCache when given a digest to do a reverse lookup so that metadata can be more easily retrieved.
Discovered inputs are no longer ever put into SingleBuildFileCache, so it is safe to roll this forward now Because of code changes (meant to ensure the safety of this change), there were conflicts that had to be manually resolved. -- MOS_MIGRATED_REVID=90425783
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec')
-rw-r--r--src/main/java/com/google/devtools/build/lib/exec/SingleBuildFileCache.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/SingleBuildFileCache.java b/src/main/java/com/google/devtools/build/lib/exec/SingleBuildFileCache.java
index 8ec1e51583..64df5c166b 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/SingleBuildFileCache.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/SingleBuildFileCache.java
@@ -99,9 +99,13 @@ public class SingleBuildFileCache implements ActionInputFileCache {
@Nullable
@Override
- public File getFileFromDigest(ByteString digest) {
- ActionInput relPath = digestToPath.get(digest);
- return relPath == null ? null : new File(fullPath(relPath));
+ public ActionInput getInputFromDigest(ByteString digest) {
+ return digestToPath.get(digest);
+ }
+
+ @Override
+ public Path getInputPath(ActionInput input) {
+ return fs.getPath(fullPath(input));
}
@Override