aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
diff options
context:
space:
mode:
authorGravatar Eric Fellheimer <felly@google.com>2015-11-09 23:54:46 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-11-10 10:28:29 +0000
commite040fe994c2da2b211858f7985fb736962a4499b (patch)
treef5d507566c2a06cb0984b716170a8ffbcc535058 /src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
parent0f7ee4cbc111209115d7d72430a677f20f22fbd5 (diff)
Add a Skyframe injected value representing a Blacklist of package patterns. Any Package name starting with a blacklisted prefix is treated as a deleted package.
Note the relation to prior art in Blaze: 1. Deleted packages indicates to Blaze to pretend certain packages do not exist. The deleted packages are passed in as fully resolved package names. This is important because the invalidation logic when these values changes references the exact package names, as opposed to prefix patterns. 2. Negative patterns in target parsing. (eg, "foo/..., -foo/bar/..."). Note that if //foo:biz depends on //foo/bar:bang, we still visit that dependency. In other words, the negative patterns just control the target pattern parsing, but not the later evaluation of those targets. Blacklisting acts like both (1) and (2), but in the form of a Precomputed injected value (so modifying the value would be more expensive than modifying deleted_packages). -- MOS_MIGRATED_REVID=107431993
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
index 6fb102843f..518b538065 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
@@ -19,6 +19,7 @@ import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.actions.Action;
import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.analysis.TopLevelArtifactContext;
@@ -28,6 +29,7 @@ import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoFactory.BuildIn
import com.google.devtools.build.lib.packages.RuleVisibility;
import com.google.devtools.build.lib.pkgcache.PathPackageLocator;
import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ConflictException;
+import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.skyframe.Injectable;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyKey;
@@ -75,6 +77,9 @@ public final class PrecomputedValue implements SkyValue {
public static final Precomputed<String> DEFAULTS_PACKAGE_CONTENTS =
new Precomputed<>(new SkyKey(SkyFunctions.PRECOMPUTED, "default_pkg"));
+ public static final Precomputed<ImmutableSet<PathFragment>> BLACKLISTED_PKG_PREFIXES =
+ new Precomputed<>(new SkyKey(SkyFunctions.PRECOMPUTED, "blacklisted_pkg_patterns"));
+
public static final Precomputed<RuleVisibility> DEFAULT_VISIBILITY =
new Precomputed<>(new SkyKey(SkyFunctions.PRECOMPUTED, "default_visibility"));