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
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 0e12f07..d36953f 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 @@ } @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