diff options
author | tomlu <tomlu@google.com> | 2018-06-22 09:43:23 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-22 09:44:34 -0700 |
commit | 39a0a38f1364b5e4056632c731df4b3fe64c13bb (patch) | |
tree | da5eff7d932aab31806ad38070c3e4826dae796c /src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java | |
parent | 732dc512801c32207c252a76ca8d9e5544560339 (diff) |
Expose aspect actions from Skylark.
Like with providers, consumers get a merged view of all actions from the merged configured target (all other aspects + the base target).
I had to rejig the aspect value / configured aspect to be symmetric with rule configured targets.
I do not expect significant memory bloat from this. All lists / maps already existed, only extra fields have been added.
RELNOTES: Expose aspect actions provider to Skylark.
PiperOrigin-RevId: 201697923
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.java | 13 |
1 files changed, 3 insertions, 10 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 7096da3a5b..01a0df969b 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 @@ -18,11 +18,7 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.Interner; -import com.google.devtools.build.lib.actions.ActionAnalysisMetadata; -import com.google.devtools.build.lib.actions.Actions.GeneratingActions; -import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.BasicActionLookupValue; import com.google.devtools.build.lib.analysis.ConfiguredAspect; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; @@ -441,10 +437,8 @@ public final class AspectValue extends BasicActionLookupValue { Aspect aspect, Label label, Location location, - ConfiguredAspect configuredAspect, - ImmutableList<ActionAnalysisMetadata> actions, - ImmutableMap<Artifact, Integer> generatingActionIndex) { - super(actions, generatingActionIndex); + ConfiguredAspect configuredAspect) { + super(configuredAspect.getActions(), configuredAspect.getGeneratingActionIndex()); this.label = Preconditions.checkNotNull(label, actions); this.aspect = Preconditions.checkNotNull(aspect, label); this.location = Preconditions.checkNotNull(location, label); @@ -459,9 +453,8 @@ public final class AspectValue extends BasicActionLookupValue { Label label, Location location, ConfiguredAspect configuredAspect, - GeneratingActions actions, NestedSet<Package> transitivePackagesForPackageRootResolution) { - super(actions); + super(configuredAspect.getActions(), configuredAspect.getGeneratingActionIndex()); this.label = Preconditions.checkNotNull(label, actions); this.aspect = Preconditions.checkNotNull(aspect, label); this.location = Preconditions.checkNotNull(location, label); |