aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/cache
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2018-02-20 05:57:49 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-20 05:59:23 -0800
commit2c05aff6cf12d72b20435b152f71ca1f0bce55ec (patch)
tree6e07ea080543e7a0f1c0e7ab0a085bf90436da79 /src/main/java/com/google/devtools/build/lib/actions/cache
parent9f608c2c17351c1e4e802db55d98542b15c9de88 (diff)
Provide a hacky way to get an ActionInput from BinTools
We have two places in internal code that require an ActionInput for an embedded tool. The embedded tool is currently not declared as an input to the corresponding actions, which in turn causes the remote execution to stat the file directly through SingleBuildFileCache. I'm working on removing SingleBuildFileCache, so this needs to be solved. This is the quick-and-dirty fix. A more principled fix might be to check in the relevant tools instead of embedding them into Bazel, but it's also significantly more work. PiperOrigin-RevId: 186292203
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/cache')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/cache/VirtualActionInput.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/VirtualActionInput.java b/src/main/java/com/google/devtools/build/lib/actions/cache/VirtualActionInput.java
index c43b0549bd..e4c52747e2 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/cache/VirtualActionInput.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/cache/VirtualActionInput.java
@@ -38,6 +38,15 @@ public interface VirtualActionInput extends ActionInput {
ByteString getBytes() throws IOException;
/**
+ * Returns the Metadata for this input if available. Null otherwise.
+ *
+ * @throws IOException
+ */
+ default Metadata getMetadata() throws IOException {
+ return null;
+ }
+
+ /**
* In some cases, we want empty files in the runfiles tree that have no corresponding artifact. We
* use instances of this class to represent those files.
*/