aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-04-17 02:46:15 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-18 10:43:29 +0000
commit4d89d118048a4979a1ff2e69e3e99ffbc2056b14 (patch)
treeee319e9b9d512fb80e2a3504895bb8afecb899f8 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
parent9c5e4bf20dec3c8be4d50b406d69ecf84c6e8322 (diff)
Fix SkyQuery bug where we weren't respecting the package blacklist. We do this by changing both the relevant Skyframe and the SkyQuery code to propagate (minimal!) blacklist information in the SkyKeys themselves.
There are other approaches to solving this problem, but I like how this solution doesn't involve duplication of logic. Also, it has the following nice benefit: previously, RecursiveDirectoryTraversalFunction would declare a dep on the blacklist for every directory traversed which adds an edge for each directory traversed. -- MOS_MIGRATED_REVID=120049635
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index 6049fd45ed..60904c1e18 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -265,6 +265,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
private MutableSupplier<ImmutableList<ConfigurationFragmentFactory>> configurationFragments =
new MutableSupplier<>();
+ private final PathFragment blacklistedPackagePrefixesFile;
+
private static final Logger LOG = Logger.getLogger(SkyframeExecutor.class.getName());
protected SkyframeExecutor(
@@ -278,7 +280,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
Preprocessor.Factory.Supplier preprocessorFactorySupplier,
ImmutableMap<SkyFunctionName, SkyFunction> extraSkyFunctions,
ImmutableList<PrecomputedValue.Injected> extraPrecomputedValues,
- boolean errorOnExternalFiles) {
+ boolean errorOnExternalFiles,
+ PathFragment blacklistedPackagePrefixesFile) {
// Strictly speaking, these arguments are not required for initialization, but all current
// callsites have them at hand, so we might as well set them during construction.
this.evaluatorSupplier = evaluatorSupplier;
@@ -298,6 +301,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
this.extraSkyFunctions = extraSkyFunctions;
this.extraPrecomputedValues = extraPrecomputedValues;
this.errorOnExternalFiles = errorOnExternalFiles;
+ this.blacklistedPackagePrefixesFile = blacklistedPackagePrefixesFile;
this.binTools = binTools;
this.skyframeBuildView = new SkyframeBuildView(
@@ -503,8 +507,9 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
}
}
- protected PathFragment getBlacklistedPackagePrefixesFile() {
- return PathFragment.EMPTY_FRAGMENT;
+ @VisibleForTesting
+ public PathFragment getBlacklistedPackagePrefixesFile() {
+ return blacklistedPackagePrefixesFile;
}
class BuildViewProvider {