Rule.attribute
All of the attributes that describe the rule.
Rule.configured_rule_input
Rule.default_setting
The set of all “features” inherited from the rule’s package declaration.
Rule.definition_stack
The Starlark call stack for the definition of the rule class of this particular rule instance. If empty, either populating the field was not enabled on the command line with the —proto:definition_stack flag or the rule is a native one.
Rule.deprecated_is_skylark
Rule.deprecated_public_by_default
The rule’s class’s public by default value.
Rule.instantiation_stack
The Starlark call stack at the moment the rule was instantiated. Each entry has the form “file:line:col: function”. The outermost stack frame (” <toplevel>”, the BUILD file) appears first; the frame for the rule function itself is omitted. The file name may be relative to package’s source root directory.
Requires —proto:instantiation_stack=true.
Rule.location
The BUILD file and line number of the location (formatted as <absolute_path>:<line_number>:<column_number>) in the rule’s package’s BUILD file where the rule instance was instantiated. The line number will be that of a rule invocation or macro call (that in turn invoked a rule). See
Rule.name
The name of the rule (formatted as an absolute label, e.g. //foo/bar:baz).
Rule.rule_class
The rule class name (e.g., java_library).
Note that the rule class name may not uniquely identify a rule class, since
two different .bzl files may define different rule classes with the same
name. To uniquely identify the rule class, see rule_class_key field below.
Rule.rule_class_info
Stardoc-format rule class API definition for this rule. Includes both Starlark-defined and native (including inherited) attributes; does not include hidden or explicitly undocumented attributes.
Populated only for the first rule in the stream with a given
rule_class_key.
Requires —proto:rule_classes=true
Rule.rule_class_key
A key uniquely identifying the rule’s rule class. Stable between repeated blaze query invocations (assuming that there are no changes to Starlark files and the same blaze binary is invoked with the same options).
Requires —proto:rule_classes=true
Rule.rule_input
All of the inputs to the rule (formatted as absolute labels). These are predecessors in the dependency graph.
Rule.rule_output
All of the outputs of the rule (formatted as absolute labels). These are successors in the dependency graph.
Rule.skylark_environment_hash_code
Hash encapsulating the behavior of this Starlark rule. Any change to this rule’s definition that could change its behavior will be reflected here.

