//package:foo depends on //package:bar with a configuration transition, then the configuration of //package:bar (and its dependencies) will be //package:foo’s configuration plus the changes specified by the transition function.
Members
transition
Parameters
| Parameter | Description |
|---|---|
implementation | callable; required The function implementing this transition. This function always has two parameters: settings and attr. The settings param is a dictionary whose set of keys is defined by the inputs parameter. So, for each build setting --//foo=bar, if inputs contains //foo, settings will have an entry settings['//foo']='bar'. The attr param is a reference to ctx.attr. This gives the implementation function access to the rule’s attributes to make attribute-parameterized transitions possible. This function must return a dict from build setting identifier to build setting value; this represents the configuration transition: for each entry in the returned dict, the transition updates that setting to the new value. All other settings are unchanged. This function can also return a list of dicts or a dict of dicts in the case of a split transition. |
inputs | sequence of strings; required List of build settings that can be read by this transition. This becomes the key set of the settings parameter of the implementation function parameter. |
outputs | sequence of strings; required List of build settings that can be written by this transition. This must be a superset of the key set of the dictionary returned by this transition. |