Back to Bazel

Fragments

docs/versions/6.3.0/rules/lib/fragments.mdx

9.1.1875 B
Original Source
<html devsite> <head> <meta name="project_path" value="/_project.yaml"> <meta name="book_path" value="/versions/6.3.0/_book.yaml"> </head> <body> <h1 class="page-title" id="modules.fragments">fragments</h1> <!-- {% raw %} -->

A collection of configuration fragments available in the current rule implementation context. Access a specific fragment by its field name. For example, <code>ctx.fragments.java</code> <p>Only configuration fragments which are declared in the rule definition may be accessed in this collection.</p><p>See the <a href="https://bazel.build/versions/6.3.0/rules/lib/starlark-configuration-fragment">configuration fragment reference</a> for a list of available fragments and the <a href="https://bazel.build/versions/6.3.0/rules/rules#configuration_fragments">rules documentation</a> for how to use them.

</body> </html> <!-- {% endraw %} -->