List of labels; default is []
A list of arbitrary labels which is exposed to aspects (in particular - aspects invoked by this rule's reverse dependencies), but isn't exposed to this rule's own implementation. Consult documentation for language-specific rule sets for details about what effect a particular aspect hint would have.
You could think of an aspect hint as a richer alternative to a tag:
while a tag conveys only a boolean state (the tag is either present or absent in the
tags list), an aspect hint can convey arbitrary structured information in its
providers.
In practice, aspect hints are used for interoperability between different language-specific
rule sets. For example, imagine you have a mylang_binary target which needs to depend
on an otherlang_library target. The MyLang-specific logic needs some additional
information about the OtherLang target in order to use it, but otherlang_library
doesn't provide this information because it knows nothing about MyLang. One solution might be for
the MyLang rule set to define a mylang_hint rule which can be used to encode that
additional information; the user can add the hint to their otherlang_library's
aspect_hints, and mylang_binary can use an aspect to collect the
additional information from a MyLang-specific provider in the mylang_hint.
For a concrete example, see
swift_interop_hint
and swift_overlay
in rules_swift.
Best practices:
aspect_hints should be lightweight and minimal.