diff options
author | 2018-03-06 16:15:11 -0800 | |
---|---|---|
committer | 2018-03-06 16:18:46 -0800 | |
commit | e2d200f32a7242898a5c976837bd3b8e6dfed62c (patch) | |
tree | 98a6fb3b0bbe3d8438aff9206d5ff77cf19870c3 /src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java | |
parent | a854d6c0d3d222bbd4ff2a532d48ddd91718908c (diff) |
Expose an actions provider on RuleConfiguredTarget instances.
Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint.
Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon.
RELNOTES: None.
PiperOrigin-RevId: 188098079
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java b/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java index 1eb434e0f7..b2e029dec9 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionFactory.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.CompositeRunfilesSupplier; +import com.google.devtools.build.lib.actions.MutableActionGraph.ActionConflictException; import com.google.devtools.build.lib.analysis.CommandHelper; import com.google.devtools.build.lib.analysis.ConfigurationMakeVariableContext; import com.google.devtools.build.lib.analysis.ConfiguredTarget; @@ -39,7 +40,8 @@ import java.util.List; */ public final class ExtraActionFactory implements RuleConfiguredTargetFactory { @Override - public ConfiguredTarget create(RuleContext context) throws RuleErrorException { + public ConfiguredTarget create(RuleContext context) + throws InterruptedException, RuleErrorException, ActionConflictException { // This rule doesn't produce any output when listed as a build target. // Only when used via the --experimental_action_listener flag, // this rule instructs the build system to add additional outputs. |