Class ModernBuildRuleRemoteExecutionHelper
- java.lang.Object
-
- com.facebook.buck.rules.modern.builders.ModernBuildRuleRemoteExecutionHelper
-
- All Implemented Interfaces:
RemoteExecutionHelper
public class ModernBuildRuleRemoteExecutionHelper extends Object implements RemoteExecutionHelper
ModernBuildRuleRemoteExecutionHelper is used to create remote execution actions for aModernBuildRule
.To create the remote action, we serialize the MBR (in a graph of serialized
AddsToRuleKey
parts such that different rules will share serialization if they share references). We then send all the cells BuckConfigs in a serialized form, all of Buck's classpath (including plugin classpath) and run the action remotely with theOutOfProcessIsolatedBuilder
(via trampoline.sh).
-
-
Field Summary
Fields Modifier and Type Field Description static Path
METADATA_PATH
static Path
TRAMPOLINE_PATH
-
Constructor Summary
Constructors Constructor Description ModernBuildRuleRemoteExecutionHelper(BuckEventBus eventBus, Protocol protocol, SourcePathRuleFinder ruleFinder, Cell rootCell, FileHashLoader fileHasher, com.google.common.collect.ImmutableSet<PathMatcher> ignorePaths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getCellPathPrefix()
The cell path prefix is the path that all remote execution related paths will be relative to.RemoteExecutionActionInfo
prepareRemoteExecution(ModernBuildRule<?> rule, java.util.function.BiPredicate<Protocol.Digest,String> requiredDataPredicate, com.facebook.buck.remoteexecution.proto.WorkerRequirements workerRequirements)
Gets all the information needed to run the rule via Remote Execution (inputs merkle tree, action and digest, outputs).boolean
supportsRemoteExecution(ModernBuildRule<?> rule)
Returns whether remote execution is supported by this rule.
-
-
-
Constructor Detail
-
ModernBuildRuleRemoteExecutionHelper
public ModernBuildRuleRemoteExecutionHelper(BuckEventBus eventBus, Protocol protocol, SourcePathRuleFinder ruleFinder, Cell rootCell, FileHashLoader fileHasher, com.google.common.collect.ImmutableSet<PathMatcher> ignorePaths)
-
-
Method Detail
-
getCellPathPrefix
public Path getCellPathPrefix()
Description copied from interface:RemoteExecutionHelper
The cell path prefix is the path that all remote execution related paths will be relative to.- Specified by:
getCellPathPrefix
in interfaceRemoteExecutionHelper
-
supportsRemoteExecution
public boolean supportsRemoteExecution(ModernBuildRule<?> rule)
Description copied from interface:RemoteExecutionHelper
Returns whether remote execution is supported by this rule.- Specified by:
supportsRemoteExecution
in interfaceRemoteExecutionHelper
-
prepareRemoteExecution
public RemoteExecutionActionInfo prepareRemoteExecution(ModernBuildRule<?> rule, java.util.function.BiPredicate<Protocol.Digest,String> requiredDataPredicate, com.facebook.buck.remoteexecution.proto.WorkerRequirements workerRequirements) throws IOException
Description copied from interface:RemoteExecutionHelper
Gets all the information needed to run the rule via Remote Execution (inputs merkle tree, action and digest, outputs).- Specified by:
prepareRemoteExecution
in interfaceRemoteExecutionHelper
- Throws:
IOException
-
-