Skip to main content
A provider that gives general information about a target’s direct and transitive files. Every rule type has this provider, even if it is not returned explicitly by the rule’s implementation function. Each DefaultInfo instance has the following fields:
  • files* files_to_run* data_runfiles* default_runfiles
See the rules page for extensive guides on how to use this provider.

Members

DefaultInfo

The DefaultInfo constructor.

Parameters

data_runfiles

runfiles descriptor describing the files that this target needs when run in the condition that it is a data dependency attribute. Under most circumstances, use the default_runfiles parameter instead. See “runfiles features to avoid” for details. May return None.

default_runfiles

runfiles descriptor describing the files that this target needs when run (via the run command or as a tool dependency). May return None.

files

A depset of File objects representing the default outputs to build when this target is specified on the bazel command line. By default it is all predeclared outputs. May return None.

files_to_run

A FilesToRunProvider object containing information about the executable and runfiles of the target. May return None.

to_json

Deprecated. This API is deprecated and will be removed soon. Please do not depend on it. It is disabled with ---incompatible_struct_has_no_methods. Use this flag to verify your code is compatible with its imminent removal. Creates a JSON string from the struct parameter. This method only works if all struct elements (recursively) are strings, ints, booleans, other structs, a list of these types or a dictionary with string keys and values of these types. Quotes and new lines in strings are escaped. Examples:
. Deprecated: instead, use json.encode(x) or json.encode_indent(x), which work for values other than structs and do not pollute the struct field namespace.

to_proto

Deprecated. This API is deprecated and will be removed soon. Please do not depend on it. It is disabled with ---incompatible_struct_has_no_methods. Use this flag to verify your code is compatible with its imminent removal. Creates a text message from the struct parameter. This method only works if all struct elements (recursively) are strings, ints, booleans, other structs or dicts or lists of these types. Quotes and new lines in strings are escaped. Struct keys are iterated in the sorted order. Examples:
Deprecated: use proto.encode_text(x) instead.