aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2016-04-06 08:47:30 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-04-07 11:43:50 +0000
commit2eb8bdd40f760d2f97d6597163148a4c2c7d1f41 (patch)
tree76e96f9cdbc2cfbe2dc25e9c662a2cb50bf36208 /src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
parentb94a6d1593efb1052f9d7b70d21b9658797cb005 (diff)
Use the correct Aspect in AspectFunction for Skylark aspects.
Previously AspectFunction was using an Aspect from the SkyKey, which might have been stale. This CL fixes the bug as uncovered in the test (see SkylarkAspectsTest), but further refactoring is needed since SkylarkAspectClass equals() is incorrect, and in fact obtaining the Skylark aspect definition should always introduce Skyframe dependency. -- MOS_MIGRATED_REVID=119137636
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
index 43bc28746c..83a8a71490 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
@@ -85,10 +85,6 @@ public final class AspectValue extends ActionLookupValue {
return aspect.getParameters();
}
- public Aspect getAspect() {
- return aspect;
- }
-
@Override
public String getDescription() {
return String.format("%s of %s", aspect.getAspectClass().getName(), getLabel());
@@ -231,6 +227,7 @@ public final class AspectValue extends ActionLookupValue {
private final Label label;
+ private final Aspect aspect;
private final Location location;
private final AspectKey key;
private final ConfiguredAspect configuredAspect;
@@ -238,12 +235,14 @@ public final class AspectValue extends ActionLookupValue {
public AspectValue(
AspectKey key,
+ Aspect aspect,
Label label,
Location location,
ConfiguredAspect configuredAspect,
Iterable<Action> actions,
NestedSet<Package> transitivePackages) {
super(actions);
+ this.aspect = aspect;
this.location = location;
this.label = label;
this.key = key;
@@ -267,6 +266,10 @@ public final class AspectValue extends ActionLookupValue {
return key;
}
+ public Aspect getAspect() {
+ return aspect;
+ }
+
public NestedSet<Package> getTransitivePackages() {
return transitivePackages;
}