public class ModernBuildRuleRemoteExecutionHelper extends Object implements RemoteExecutionHelper
ModernBuildRule.
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 the OutOfProcessIsolatedBuilder (via trampoline.sh).
| Modifier and Type | Field and Description |
|---|---|
static Path |
METADATA_PATH |
static Path |
TRAMPOLINE_PATH |
| Constructor and Description |
|---|
ModernBuildRuleRemoteExecutionHelper(BuckEventBus eventBus,
Protocol protocol,
SourcePathRuleFinder ruleFinder,
Cell rootCell,
FileHashLoader fileHasher,
com.google.common.collect.ImmutableSet<PathMatcher> ignorePaths) |
| Modifier and Type | Method and 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.
|
public static final Path TRAMPOLINE_PATH
public static final Path METADATA_PATH
public ModernBuildRuleRemoteExecutionHelper(BuckEventBus eventBus, Protocol protocol, SourcePathRuleFinder ruleFinder, Cell rootCell, FileHashLoader fileHasher, com.google.common.collect.ImmutableSet<PathMatcher> ignorePaths)
public Path getCellPathPrefix()
RemoteExecutionHelpergetCellPathPrefix in interface RemoteExecutionHelperpublic boolean supportsRemoteExecution(ModernBuildRule<?> rule)
RemoteExecutionHelpersupportsRemoteExecution in interface RemoteExecutionHelperpublic RemoteExecutionActionInfo prepareRemoteExecution(ModernBuildRule<?> rule, java.util.function.BiPredicate<Protocol.Digest,String> requiredDataPredicate, com.facebook.buck.remoteexecution.proto.WorkerRequirements workerRequirements) throws IOException
RemoteExecutionHelperprepareRemoteExecution in interface RemoteExecutionHelperIOException