diff options
author | 2016-06-01 12:53:42 +0000 | |
---|---|---|
committer | 2016-06-01 13:32:50 +0000 | |
commit | 74461cd76e7ac2a1e5bbce2bd6a5f715b212b823 (patch) | |
tree | a0ddabc7f4bec5ce4615dcdee64162e4b42519ee /site | |
parent | e20e2c11fa4e11ed5be95f0193c12a45e1fac7b8 (diff) |
Fix formatting.
--
MOS_MIGRATED_REVID=123743221
Diffstat (limited to 'site')
-rw-r--r-- | site/docs/skylark/aspects.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/site/docs/skylark/aspects.md b/site/docs/skylark/aspects.md index def865373f..93c0e93bdc 100644 --- a/site/docs/skylark/aspects.md +++ b/site/docs/skylark/aspects.md @@ -102,11 +102,13 @@ for actions generated by aspects. Aspect implementation functions are similiar to the rule implementation functions. They return [providers](rule.md#providers), can generate [actions](rule.md#actions) and take two arguments: + * `target`: the target the aspect is being applied to. * [`ctx`](lib/ctx.html): `ctx` object that can be used to access attributes and generate outputs and actions. Example: + ```python def _metal_proto_aspect_impl(target, ctx): # For every `src` in proto_library, generate an output file @@ -138,10 +140,10 @@ returns a struct of providers that are accessible to its dependencies. the implementation of aspect A. It is an error if a target and an aspect that is applied to it each provide a provider with the same name. * For the aspect implementation, the values of attributes along which - the aspect is propagated (from the 'attr_aspect' list) are replaced with + the aspect is propagated (from the 'attr\_aspect' list) are replaced with the results of an application of the aspect to them. For example, if target X has Y and Z in its deps, `ctx.rule.attr.deps` for A(X) will be [A(Y), A(Z)]. - In the `_metal_proto_aspect_impl` function above, ctx.rule.attr.deps will be + In the `\_metal\_proto\_aspect\_impl` function above, ctx.rule.attr.deps will be Target objects that are the results of applying the aspect to the 'deps' of the original target to which the aspect has been applied. That allows the aspect to examine `metal_proto` provider on them. |