aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2015-04-15 21:28:33 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-04-16 18:36:11 +0000
commitac879b96ceeb40679e8d452220d1ec95ad77e830 (patch)
treeeaf40c52aec7951f3b368e6c054e6463ccfccbc5 /src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
parente49b3bac82a2709d897520997135b816721e0ef8 (diff)
Become more restrictive around Runfiles#manifestExpander
Previously the contract was pretty liberal and could allow addition of extra Artifacts. Create a more restrictive interface allowing the bare minimum- adding empty files to the tree. This makes the contract of Runfiles#getAllArtifacts() more sound, since arbitrary artifacts can't be added, and it makes it easier to figure out what implementations of manifest expansion exist out there. -- MOS_MIGRATED_REVID=91233821
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java b/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
index 7929dbc0b2..a46e9f3743 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/SourceManifestAction.java
@@ -16,7 +16,6 @@ package com.google.devtools.build.lib.analysis;
import static java.nio.charset.StandardCharsets.ISO_8859_1;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.actions.ActionOwner;
import com.google.devtools.build.lib.actions.Artifact;
@@ -349,12 +348,11 @@ public class SourceManifestAction extends AbstractFileWriteAction {
}
/**
- * Set an expander function for the symlinks.
+ * Set the empty files supplier for the manifest, see {@link Runfiles.EmptyFilesSupplier}
+ * for more details.
*/
- @VisibleForTesting
- Builder setSymlinksExpander(
- Function<Map<PathFragment, Artifact>, Map<PathFragment, Artifact>> expander) {
- runfilesBuilder.setManifestExpander(expander);
+ public Builder setEmptyFilesSupplier(Runfiles.EmptyFilesSupplier supplier) {
+ runfilesBuilder.setEmptyFilesSupplier(supplier);
return this;
}