aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2018-06-22 09:43:23 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-22 09:44:34 -0700
commit39a0a38f1364b5e4056632c731df4b3fe64c13bb (patch)
treeda5eff7d932aab31806ad38070c3e4826dae796c /src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java
parent732dc512801c32207c252a76ca8d9e5544560339 (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/SkylarkAspectFactory.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java
index 1bb02261b2..2c95721c0b 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkAspectFactory.java
@@ -15,6 +15,7 @@ package com.google.devtools.build.lib.skyframe;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.devtools.build.lib.actions.MutableActionGraph.ActionConflictException;
import com.google.devtools.build.lib.analysis.AnalysisEnvironment;
import com.google.devtools.build.lib.analysis.ConfiguredAspect;
import com.google.devtools.build.lib.analysis.ConfiguredAspectFactory;
@@ -49,7 +50,7 @@ public class SkylarkAspectFactory implements ConfiguredAspectFactory {
@Override
public ConfiguredAspect create(
ConfiguredTargetAndData ctadBase, RuleContext ruleContext, AspectParameters parameters)
- throws InterruptedException {
+ throws InterruptedException, ActionConflictException {
SkylarkRuleContext skylarkRuleContext = null;
try (Mutability mutability = Mutability.create("aspect")) {
AspectDescriptor aspectDescriptor =
@@ -106,7 +107,7 @@ public class SkylarkAspectFactory implements ConfiguredAspectFactory {
private ConfiguredAspect createAspect(
Object aspectSkylarkObject, AspectDescriptor aspectDescriptor, RuleContext ruleContext)
- throws EvalException {
+ throws EvalException, ActionConflictException {
ConfiguredAspect.Builder builder = new ConfiguredAspect.Builder(aspectDescriptor, ruleContext);