aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2018-01-17 14:36:26 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-17 14:37:59 -0800
commitee6a6862e26704854fb08bd90912890814cc3426 (patch)
tree294eac82202e393c5baae0e357325f2488ab3cbb /src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
parentf323fb3043bc782526e0e47933efedea9c5c2ad9 (diff)
Introduce Root class.
This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java b/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
index 3a9e211860..75e0da2423 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParams.java
@@ -19,8 +19,8 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.util.Fingerprint;
-import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
+import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.RootedPath;
import java.util.Set;
@@ -75,7 +75,7 @@ public interface FilesetTraversalParams {
*
* <p>This is typically the workspace root or some output tree's root (e.g. genfiles, binfiles).
*/
- public abstract Path getRootPart();
+ public abstract Root getRootPart();
/**
* Returns the {@link #getRootPart() root}-relative part of the path.
@@ -96,12 +96,12 @@ public interface FilesetTraversalParams {
static DirectTraversalRoot forPackage(Artifact buildFile) {
return new AutoValue_FilesetTraversalParams_DirectTraversalRoot(
- buildFile.getRoot().getPath(), buildFile.getRootRelativePath().getParentDirectory());
+ buildFile.getRoot().getRoot(), buildFile.getRootRelativePath().getParentDirectory());
}
static DirectTraversalRoot forFileOrDirectory(Artifact fileOrDirectory) {
return new AutoValue_FilesetTraversalParams_DirectTraversalRoot(
- fileOrDirectory.getRoot().getPath(), fileOrDirectory.getRootRelativePath());
+ fileOrDirectory.getRoot().getRoot(), fileOrDirectory.getRootRelativePath());
}
}