public abstract class RunInfo extends BuiltInProviderInfo<RunInfo> implements CommandLineArgs
Provider that describes how to run a
given build rule's outputs.CommandLineArgs.ArgAndFormatString| Modifier and Type | Field and Description |
|---|---|
static BuiltInProvider<RunInfo> |
PROVIDER |
DEFAULT_FORMAT_STRING| Constructor and Description |
|---|
RunInfo() |
| Modifier and Type | Method and Description |
|---|---|
abstract CommandLineArgs |
args() |
abstract com.google.common.collect.ImmutableMap<String,String> |
env() |
java.util.stream.Stream<CommandLineArgs.ArgAndFormatString> |
getArgsAndFormatStrings() |
com.google.common.collect.ImmutableSortedMap<String,String> |
getEnvironmentVariables() |
int |
getEstimatedArgsCount()
Get the approximate number of arguments that will be returned for
CommandLineArgs.getArgsAndFormatStrings() |
static RunInfo |
instantiateFromSkylark(com.google.devtools.build.lib.syntax.SkylarkDict<String,String> env,
Object args)
Create an instance of RunInfo from skylark arguments.
|
void |
visitInputsAndOutputs(java.util.function.Consumer<Artifact> inputs,
java.util.function.Consumer<OutputArtifact> outputs)
Add any artifacts from
CommandLineArgs.getArgsAndFormatStrings() to inputs and outputs, inferring based on type |
getDeclaredClass, getProvider, getProviderInfo, isImmutablegetErrorMessageForUnknownField, getFieldNames, getMethods, getValue, reprclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisImmutable, reprpublic static final BuiltInProvider<RunInfo> PROVIDER
public abstract com.google.common.collect.ImmutableMap<String,String> env()
public abstract CommandLineArgs args()
public static RunInfo instantiateFromSkylark(com.google.devtools.build.lib.syntax.SkylarkDict<String,String> env, Object args) throws com.google.devtools.build.lib.syntax.EvalException
env - environment variables to use when executingargs - arguments used to execute this program. Must be one of CommandLineArgsBuilder, CommandLineArgs or SkylarkList.RunInfo with immutable env() and args()com.google.devtools.build.lib.syntax.EvalException - the type passed in was incorrectpublic com.google.common.collect.ImmutableSortedMap<String,String> getEnvironmentVariables()
getEnvironmentVariables in interface CommandLineArgspublic java.util.stream.Stream<CommandLineArgs.ArgAndFormatString> getArgsAndFormatStrings()
getArgsAndFormatStrings in interface CommandLineArgsCommandLineArgStringifier.asString(ArtifactFilesystem, boolean, Object)public int getEstimatedArgsCount()
CommandLineArgsCommandLineArgs.getArgsAndFormatStrings()
This can be handy to pre-size destination collections
getEstimatedArgsCount in interface CommandLineArgspublic void visitInputsAndOutputs(java.util.function.Consumer<Artifact> inputs, java.util.function.Consumer<OutputArtifact> outputs)
CommandLineArgsCommandLineArgs.getArgsAndFormatStrings() to inputs and outputs, inferring based on typevisitInputsAndOutputs in interface CommandLineArgs