aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
index 22bb42807f..16846bc621 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
@@ -74,6 +74,10 @@ public final class GlobFunction implements SkyFunction {
// We crossed the package boundary, that is, pkg/subdir contains a BUILD file and thus
// defines another package, so glob expansion should not descend into that subdir.
return GlobValue.EMPTY;
+ } else if (globSubdirPkgLookupValue
+ instanceof PackageLookupValue.IncorrectRepositoryReferencePackageLookupValue) {
+ // We crossed a repository boundary, so glob expansion should not descend into that subdir.
+ return GlobValue.EMPTY;
}
}
@@ -351,11 +355,18 @@ public final class GlobFunction implements SkyFunction {
valueRequested,
fileName,
glob);
- if (!((PackageLookupValue) valueRequested).packageExists()) {
+ PackageLookupValue packageLookupValue = (PackageLookupValue) valueRequested;
+ if (packageLookupValue.packageExists()) {
+ // This is a separate package, so ignore it.
+ return null;
+ } else if (packageLookupValue
+ instanceof PackageLookupValue.IncorrectRepositoryReferencePackageLookupValue) {
+ // This is a separate repository, so ignore it.
+ return null;
+ } else {
return glob.getSubdir().getRelative(fileName);
}
}
- return null;
}
@Nullable