aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2016-12-16 16:52:37 +0000
committerGravatar John Cater <jcater@google.com>2016-12-16 17:08:09 +0000
commit1575652972d80f224fb3f7398eef3439e4f5a5dd (patch)
tree419932b5b7e4379331953aa41e3b9a04b871f9f0 /src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
parentbb984fd26f0fc9b519eb11fe330852f8d1b708a7 (diff)
Names of extra-action protos now take into account all aspect names.
If an Aspect registered an action that an extra-action is shadowing, its name is used when creating the extra-action's ID and name. Since recently, an aspect can see other aspects applied to the same target. This CL record the names of other aspects applied to the target as well, disambiguating the action owners. -- PiperOrigin-RevId: 142264153 MOS_MIGRATED_REVID=142264153
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
index 4bf0f81c5d..4f8835befb 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
@@ -216,7 +216,7 @@ public final class AspectFunction implements SkyFunction {
ConfiguredTarget associatedTarget =
configuredTargetValue.getConfiguredTarget();
- ImmutableList.Builder<Aspect> aspectPath = ImmutableList.builder();
+ ImmutableList.Builder<Aspect> aspectPathBuilder = ImmutableList.builder();
if (key.getBaseKey() != null) {
ImmutableList<SkyKey> aspectKeys = getSkyKeysForAspects(key.getBaseKey());
@@ -227,7 +227,7 @@ public final class AspectFunction implements SkyFunction {
}
try {
associatedTarget = getBaseTargetAndCollectPath(
- associatedTarget, aspectKeys, values, aspectPath);
+ associatedTarget, aspectKeys, values, aspectPathBuilder);
} catch (DuplicateException e) {
env.getListener().handle(
Event.error(associatedTarget.getTarget().getLocation(), e.getMessage()));
@@ -237,7 +237,7 @@ public final class AspectFunction implements SkyFunction {
}
}
- aspectPath.add(aspect);
+ aspectPathBuilder.add(aspect);
SkyframeDependencyResolver resolver = view.createDependencyResolver(env);
@@ -249,6 +249,7 @@ public final class AspectFunction implements SkyFunction {
// will be present this way.
TargetAndConfiguration originalTargetAndAspectConfiguration =
new TargetAndConfiguration(target, key.getAspectConfiguration());
+ ImmutableList<Aspect> aspectPath = aspectPathBuilder.build();
try {
// Get the configuration targets that trigger this rule's configurable attributes.
ImmutableMap<Label, ConfigMatchingProvider> configConditions =
@@ -266,7 +267,7 @@ public final class AspectFunction implements SkyFunction {
env,
resolver,
originalTargetAndAspectConfiguration,
- aspectPath.build(),
+ aspectPath,
configConditions,
ruleClassProvider,
view.getHostConfiguration(originalTargetAndAspectConfiguration.getConfiguration()),
@@ -286,7 +287,7 @@ public final class AspectFunction implements SkyFunction {
return createAspect(
env,
key,
- target,
+ aspectPath,
aspect,
aspectFactory,
associatedTarget,
@@ -387,7 +388,7 @@ public final class AspectFunction implements SkyFunction {
private AspectValue createAspect(
Environment env,
AspectKey key,
- Target baseTarget,
+ ImmutableList<Aspect> aspectPath,
Aspect aspect,
ConfiguredAspectFactory aspectFactory,
ConfiguredTarget associatedTarget,
@@ -410,6 +411,7 @@ public final class AspectFunction implements SkyFunction {
view.getConfiguredTargetFactory().createAspect(
analysisEnvironment,
associatedTarget,
+ aspectPath,
aspectFactory,
aspect,
directDeps,