aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.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/skyframe/PackageLookupValue.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/skyframe/PackageLookupValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
index 50bccd5343..408bc2753f 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
@@ -17,8 +17,8 @@ import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.packages.BuildFileName;
-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 com.google.devtools.build.skyframe.LegacySkyKey;
import com.google.devtools.build.skyframe.SkyKey;
@@ -61,7 +61,7 @@ public abstract class PackageLookupValue implements SkyValue {
protected PackageLookupValue() {
}
- public static PackageLookupValue success(Path root, BuildFileName buildFileName) {
+ public static PackageLookupValue success(Root root, BuildFileName buildFileName) {
return new SuccessfulPackageLookupValue(root, buildFileName);
}
@@ -75,10 +75,10 @@ public abstract class PackageLookupValue implements SkyValue {
}
/**
- * For a successful package lookup, returns the root (package path entry) that the package
- * resides in.
+ * For a successful package lookup, returns the root (package path entry) that the package resides
+ * in.
*/
- public abstract Path getRoot();
+ public abstract Root getRoot();
/** For a successful package lookup, returns the build file name that the package uses. */
public abstract BuildFileName getBuildFileName();
@@ -120,10 +120,10 @@ public abstract class PackageLookupValue implements SkyValue {
/** Successful lookup value. */
public static class SuccessfulPackageLookupValue extends PackageLookupValue {
- private final Path root;
+ private final Root root;
private final BuildFileName buildFileName;
- private SuccessfulPackageLookupValue(Path root, BuildFileName buildFileName) {
+ private SuccessfulPackageLookupValue(Root root, BuildFileName buildFileName) {
this.root = root;
this.buildFileName = buildFileName;
}
@@ -134,7 +134,7 @@ public abstract class PackageLookupValue implements SkyValue {
}
@Override
- public Path getRoot() {
+ public Root getRoot() {
return root;
}
@@ -176,7 +176,7 @@ public abstract class PackageLookupValue implements SkyValue {
}
@Override
- public Path getRoot() {
+ public Root getRoot() {
throw new IllegalStateException();
}