aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-05-23 20:57:11 +0000
committerGravatar Yue Gan <yueg@google.com>2016-05-24 11:57:43 +0000
commit87a598065e9574c3d463b1edb5026540df64453f (patch)
treef069d7ce9ccdaff3ed500abf8e2a5fbc93db64ca /src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java
parentb4f3769294e110e8054ed05c354f27af4a8effe3 (diff)
Use a non-side-effectful PackageLookupValue#packageExists implementation for //external package lookups, but keep the current (incorrect) semantics for unsuccessful //external package lookups.
Refactor some users of the old WorkspacePackageLookupValue. -- MOS_MIGRATED_REVID=123034174
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.java30
1 files changed, 0 insertions, 30 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 e9d5bf5100..ce006cc3c5 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
@@ -56,18 +56,10 @@ public abstract class PackageLookupValue implements SkyValue {
return new SuccessfulPackageLookupValue(root);
}
- public static PackageLookupValue workspace(Path root) {
- return new WorkspacePackageLookupValue(root);
- }
-
public static PackageLookupValue invalidPackageName(String errorMsg) {
return new InvalidNamePackageLookupValue(errorMsg);
}
- public boolean isExternalPackage() {
- return false;
- }
-
/**
* For a successful package lookup, returns the root (package path entry) that the package
* resides in.
@@ -145,28 +137,6 @@ public abstract class PackageLookupValue implements SkyValue {
}
}
- // TODO(kchodorow): fix these semantics. This class should not exist, WORKSPACE lookup should
- // just return success/failure like a "normal" package.
- /** Successful workspace package lookup value. */
- public static class WorkspacePackageLookupValue extends SuccessfulPackageLookupValue {
-
- private WorkspacePackageLookupValue(Path root) {
- super(root);
- }
-
- // TODO(kchodorow): get rid of this, the semantics are wrong (successful package lookup should
- // mean the package exists).
- @Override
- public boolean packageExists() {
- return getRoot().exists();
- }
-
- @Override
- public boolean isExternalPackage() {
- return true;
- }
- }
-
private abstract static class UnsuccessfulPackageLookupValue extends PackageLookupValue {
@Override