Interface Action
-
- All Superinterfaces:
BuildEngineAction
- All Known Implementing Classes:
AbstractAction
,CopyAction
,RunAction
,WriteAction
public interface Action extends BuildEngineAction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ActionExecutionResult
execute(ActionExecutionContext executionContext)
Executes this action as part of the buildString
getID()
com.google.common.collect.ImmutableSortedSet<Artifact>
getInputs()
com.google.common.collect.ImmutableSortedSet<OutputArtifact>
getOutputs()
BuildTarget
getOwner()
String
getShortName()
com.google.common.collect.ImmutableSortedSet<SourcePath>
getSourcePathOutputs()
boolean
isCacheable()
TODO(bobyf): should we still have this or should we enforce everything to be cacheabledefault boolean
outputFileCanBeCopied()
default boolean
shouldRespectInputSizeLimitForRemoteExecution()
-
Methods inherited from interface com.facebook.buck.core.build.action.BuildEngineAction
getBuildTarget, getDependencies
-
-
-
-
Method Detail
-
getOwner
BuildTarget getOwner()
- Returns:
- the build target of the rule analysis that created of this action
-
getInputs
com.google.common.collect.ImmutableSortedSet<Artifact> getInputs()
- Returns:
- the set of inputs required to complete this action
-
getOutputs
com.google.common.collect.ImmutableSortedSet<OutputArtifact> getOutputs()
- Returns:
- the set of outputs this action generates
-
getSourcePathOutputs
com.google.common.collect.ImmutableSortedSet<SourcePath> getSourcePathOutputs()
- Specified by:
getSourcePathOutputs
in interfaceBuildEngineAction
- Returns:
- the set of outputs this
BuildEngineAction
builds. This is here for legacy as BuildRules deal withSourcePath
-
getShortName
String getShortName()
- Returns:
- a name for this action to be printed to console when executing and for logging purposes
-
getID
String getID()
- Returns:
- the short name of this action as an ID
-
execute
ActionExecutionResult execute(ActionExecutionContext executionContext)
Executes this action as part of the build- Parameters:
executionContext
- a set of information the action can use for execution- Returns:
ActionExecutionResult
indicating the status of execution
-
outputFileCanBeCopied
default boolean outputFileCanBeCopied()
- Returns:
- true if the output of this build rule is compatible with
buck build --out
. To be compatible, that means (1)getOutputs()
()} cannot be empty, and (2) the output file works as intended when copied to an arbitrary path (i.e., does not have any dependencies on relative symlinks).
-
isCacheable
boolean isCacheable()
TODO(bobyf): should we still have this or should we enforce everything to be cacheable- Specified by:
isCacheable
in interfaceBuildEngineAction
- Returns:
- whether the output
Artifact
s should be cached
-
shouldRespectInputSizeLimitForRemoteExecution
default boolean shouldRespectInputSizeLimitForRemoteExecution()
- Specified by:
shouldRespectInputSizeLimitForRemoteExecution
in interfaceBuildEngineAction
- Returns:
- true if this rule should only be allowed to be executed via Remote Execution if it satisfies input size limits.
-
-