aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
diff options
context:
space:
mode:
authorGravatar John Cater <jcater@google.com>2016-10-12 17:23:30 +0000
committerGravatar Yue Gan <yueg@google.com>2016-10-13 08:52:42 +0000
commit5e9ce943bf24fef5e95231f2507344ea24f5c732 (patch)
tree0aea4233ab143e52682bdf029d5ca24c6282e2b4 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
parentfac9be905f0f82f793eb1cc61afab42698769dcf (diff)
Adds an enum to describe how PackageLookupFunction should handle package labels
which cross into a sub-repository. Part of #1592. -- MOS_MIGRATED_REVID=135931868
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, 9 insertions, 2 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 93e3323f20..c0d157aa7c 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
@@ -106,6 +106,7 @@ import com.google.devtools.build.lib.profiler.AutoProfiler;
import com.google.devtools.build.lib.skyframe.AspectValue.AspectValueKey;
import com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.FileDirtinessChecker;
import com.google.devtools.build.lib.skyframe.PackageFunction.CacheEntryWithGlobDeps;
+import com.google.devtools.build.lib.skyframe.PackageLookupFunction.CrossRepositoryLabelViolationStrategy;
import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ActionCompletedReceiver;
import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ProgressSupplier;
import com.google.devtools.build.lib.util.AbruptExitException;
@@ -271,6 +272,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
private final RuleClassProvider ruleClassProvider;
+ private final CrossRepositoryLabelViolationStrategy crossRepositoryLabelViolationStrategy;
+
private static final Logger LOG = Logger.getLogger(SkyframeExecutor.class.getName());
protected SkyframeExecutor(
@@ -286,7 +289,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
ImmutableList<PrecomputedValue.Injected> extraPrecomputedValues,
boolean errorOnExternalFiles,
PathFragment blacklistedPackagePrefixesFile,
- String productName) {
+ String productName,
+ CrossRepositoryLabelViolationStrategy crossRepositoryLabelViolationStrategy) {
// 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;
@@ -319,6 +323,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
this.externalFilesHelper = new ExternalFilesHelper(
pkgLocator, this.errorOnExternalFiles, directories);
this.productName = productName;
+ this.crossRepositoryLabelViolationStrategy = crossRepositoryLabelViolationStrategy;
}
private ImmutableMap<SkyFunctionName, SkyFunction> skyFunctions(
@@ -340,7 +345,9 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
new FileSymlinkInfiniteExpansionUniquenessFunction());
map.put(SkyFunctions.FILE, new FileFunction(pkgLocator));
map.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
- map.put(SkyFunctions.PACKAGE_LOOKUP, new PackageLookupFunction(deletedPackages));
+ map.put(
+ SkyFunctions.PACKAGE_LOOKUP,
+ new PackageLookupFunction(deletedPackages, crossRepositoryLabelViolationStrategy));
map.put(SkyFunctions.CONTAINING_PACKAGE_LOOKUP, new ContainingPackageLookupFunction());
map.put(SkyFunctions.AST_FILE_LOOKUP, new ASTFileLookupFunction(ruleClassProvider));
map.put(