aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
diff options
context:
space:
mode:
authorGravatar Mark Schaller <mschaller@google.com>2015-05-19 20:27:43 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-05-21 09:46:11 +0000
commitf6e32d64fdf3bf2710ed8f32f64d4113064e3200 (patch)
tree7dc91f1046953c3f4f902dc477c2503904440124 /src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
parent111634a5f7b4ba71c84b660a33af8325284b77d8 (diff)
Teach skyframe about excluded directories, paths
RecursivePkgFunction now expects both a rooted path to load packages beneath and a set of paths to exclude. This also augments existing machinery to deliver this set of paths to exclude. This leads toward more efficient processing of target patterns in target pattern sequence evaluation. -- MOS_MIGRATED_REVID=94020331
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
index 0e12f07661..d36953fca6 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
@@ -14,6 +14,7 @@
package com.google.devtools.build.lib.skyframe;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.EventHandler;
@@ -92,8 +93,9 @@ public final class GraphBackedRecursivePackageProvider implements RecursivePacka
}
@Override
- public Iterable<PathFragment> getPackagesUnderDirectory(RootedPath directory) {
- SkyKey recursivePackageKey = RecursivePkgValue.key(directory);
+ public Iterable<PathFragment> getPackagesUnderDirectory(RootedPath directory,
+ ImmutableSet<PathFragment> excludedSubdirectories) {
+ SkyKey recursivePackageKey = RecursivePkgValue.key(directory, excludedSubdirectories);
if (!graph.exists(recursivePackageKey)) {
// If the recursive package key does not exist in the graph, then it must not correspond to
// any directory transitively containing packages, because the SkyQuery environment has