aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.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/AspectFunction.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/AspectFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java20
1 files changed, 2 insertions, 18 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 de5db333d1..e1339795f5 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
@@ -18,8 +18,6 @@ import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
-import com.google.devtools.build.lib.actions.Actions;
-import com.google.devtools.build.lib.actions.Actions.GeneratingActions;
import com.google.devtools.build.lib.actions.InconsistentFilesystemException;
import com.google.devtools.build.lib.actions.MutableActionGraph.ActionConflictException;
import com.google.devtools.build.lib.analysis.AliasProvider;
@@ -573,7 +571,6 @@ public final class AspectFunction implements SkyFunction {
originalTarget.getLabel(),
originalTarget.getLocation(),
ConfiguredAspect.forAlias(real.getConfiguredAspect()),
- GeneratingActions.EMPTY,
transitivePackagesForPackageRootResolution);
}
@@ -644,23 +641,12 @@ public final class AspectFunction implements SkyFunction {
analysisEnvironment.disable(associatedTarget.getTarget());
Preconditions.checkNotNull(configuredAspect);
- GeneratingActions generatingActions;
- // Check for conflicting actions within this aspect (indicates a bug in the implementation).
- try {
- generatingActions =
- Actions.filterSharedActionsAndThrowActionConflict(
- analysisEnvironment.getActionKeyContext(),
- analysisEnvironment.getRegisteredActions());
- } catch (ActionConflictException e) {
- throw new AspectFunctionException(e);
- }
return new AspectValue(
key,
aspect,
associatedTarget.getTarget().getLabel(),
associatedTarget.getTarget().getLocation(),
configuredAspect,
- generatingActions,
transitivePackagesForPackageRootResolution == null
? null
: transitivePackagesForPackageRootResolution.build());
@@ -709,10 +695,8 @@ public final class AspectFunction implements SkyFunction {
}
}
- /**
- * Used to indicate errors during the computation of an {@link AspectValue}.
- */
- private static final class AspectFunctionException extends SkyFunctionException {
+ /** Used to indicate errors during the computation of an {@link AspectValue}. */
+ public static final class AspectFunctionException extends SkyFunctionException {
public AspectFunctionException(NoSuchThingException e) {
super(e, Transience.PERSISTENT);
}