<html devsite>
<head>
  <meta name="project_path" value="/_project.yaml">
  <meta name="book_path" value="/versions/8.1.0/_book.yaml">
</head>
<body>

<h1 class="page-title" id="modules.module">MODULE.bazel files</h1>

{% dynamic setvar source_file "NONE" %}
{% dynamic setvar version "8.1.0" %}
{% dynamic setvar original_path "/rules/lib/globals/module" %}
{% include "_buttons.html" %}
<!-- {% raw %} -->

Methods available in MODULE.bazel files.

<h2>Members</h2>
<ul>
    <li>
    <a href="#archive_override">archive_override</a>
  </li>
      <li>
    <a href="#bazel_dep">bazel_dep</a>
  </li>
      <li>
    <a href="#git_override">git_override</a>
  </li>
      <li>
    <a href="#include">include</a>
  </li>
      <li>
    <a href="#inject_repo">inject_repo</a>
  </li>
      <li>
    <a href="#local_path_override">local_path_override</a>
  </li>
      <li>
    <a href="#module">module</a>
  </li>
      <li>
    <a href="#multiple_version_override">multiple_version_override</a>
  </li>
      <li>
    <a href="#override_repo">override_repo</a>
  </li>
      <li>
    <a href="#register_execution_platforms">register_execution_platforms</a>
  </li>
      <li>
    <a href="#register_toolchains">register_toolchains</a>
  </li>
      <li>
    <a href="#single_version_override">single_version_override</a>
  </li>
      <li>
    <a href="#use_extension">use_extension</a>
  </li>
      <li>
    <a href="#use_repo">use_repo</a>
  </li>
      <li>
    <a href="#use_repo_rule">use_repo_rule</a>
  </li>
  </ul>

      <h2 id="archive_override">archive_override</h2>
        <p><pre class="rule-signature"><code>None</code> archive_override(module_name, **kwargs)</pre></p>

    Specifies that this dependency should come from an archive file (zip, gzip, etc) at a
certain location, instead of from a registry. Effectively, this dependency will be
backed by an <a href="../repo/http#http_archive"><code>http_archive</code></a> rule.

<p>This directive only takes effect in the root module; in other words, if a module is
used as a dependency by others, its own overrides are ignored.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="archive_override.module_name">
              <code>module_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the Bazel module dependency to apply this override to.
            </td>
          </tr>
                  <tr>
            <td id="archive_override.kwargs">
              <code>kwargs</code>
            </td>
            <td>
                                     required<br/>
                          All other arguments are forwarded to the underlying <code>http_archive</code> repo
rule. Note that the <code>name</code> attribute shouldn't be specified; use
<code>module_name</code> instead.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="bazel_dep">bazel_dep</h2>
        <p><pre class="rule-signature"><code>None</code> bazel_dep(name, version='', max_compatibility_level=-1, repo_name='', dev_dependency=False)</pre></p>

    Declares a direct dependency on another Bazel module.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="bazel_dep.name">
              <code>name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the module to be added as a direct dependency.
            </td>
          </tr>
                  <tr>
            <td id="bazel_dep.version">
              <code>version</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          The version of the module to be added as a direct dependency.
            </td>
          </tr>
                  <tr>
            <td id="bazel_dep.max_compatibility_level">
              <code>max_compatibility_level</code>
            </td>
            <td>
                          <a class="anchor" href="../core/int.html">int</a>;
                                     default is <code>-1</code><br/>
                          The maximum <code>compatibility_level</code> supported for the module to be added as a direct dependency. The version of the module implies the minimum compatibility_level supported, as well as the maximum if this attribute is not specified.
            </td>
          </tr>
                  <tr>
            <td id="bazel_dep.repo_name">
              <code>repo_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          The name of the external repo representing this dependency. This is by default the name of the module.
            </td>
          </tr>
                  <tr>
            <td id="bazel_dep.dev_dependency">
              <code>dev_dependency</code>
            </td>
            <td>
                          <a class="anchor" href="../core/bool.html">bool</a>;
                                     default is <code>False</code><br/>
                          If true, this dependency will be ignored if the current module is not the root module or `--ignore_dev_dependency` is enabled.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="git_override">git_override</h2>
        <p><pre class="rule-signature"><code>None</code> git_override(module_name, **kwargs)</pre></p>

    Specifies that this dependency should come from a certain commit in a Git repository,
instead of from a registry. Effectively, this dependency will be backed by a
<a href="../repo/git#git_repository"><code>git_repository</code></a> rule.

<p>This directive only takes effect in the root module; in other words, if a module is
used as a dependency by others, its own overrides are ignored.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="git_override.module_name">
              <code>module_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the Bazel module dependency to apply this override to.
            </td>
          </tr>
                  <tr>
            <td id="git_override.kwargs">
              <code>kwargs</code>
            </td>
            <td>
                                     required<br/>
                          All other arguments are forwarded to the underlying <code>git_repository</code>
repo rule. Note that the <code>name</code> attribute shouldn't be specified; use
<code>module_name</code> instead.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="include">include</h2>
        <p><pre class="rule-signature"><code>None</code> include(label)</pre></p>

    Includes the contents of another MODULE.bazel-like file. Effectively, <code>include()</code> behaves as if the included file is textually placed at the location of the <code>include()</code> call, except that variable bindings (such as those used for <code>use_extension</code>) are only ever visible in the file they occur in, not in any included or including files.<p>Only the root module may use <code>include()</code>; it is an error if a <code>bazel_dep</code>'s MODULE file uses <code>include()</code>.<p>Only files in the main repo may be included.<p><code>include()</code> allows you to segment the root module file into multiple parts, to avoid having an enormous MODULE.bazel file or to better manage access control for individual semantic segments.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="include.label">
              <code>label</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The label pointing to the file to include. The label must point to a file in the main repo; in other words, it <strong>must<strong> start with double slashes (<code>//</code>). The name of the file must end with <code>.MODULE.bazel</code> and must not start with <code>.</code>.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="inject_repo">inject_repo</h2>
        <p><pre class="rule-signature"><code>None</code> inject_repo(extension_proxy, *args, **kwargs)</pre></p>

    Injects one or more new repos into the given module extension.
This is ignored if the current module is not the root module or
<code>--ignore_dev_dependency</code> is enabled.

<p>Use <a href="#override_repo"><code>override_repo</code></a> instead to override an
existing repo.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="inject_repo.extension_proxy">
              <code>extension_proxy</code>
            </td>
            <td>
                          module_extension_proxy;
                                     required<br/>
                          A module extension proxy object returned by a <code>use_extension</code> call.
            </td>
          </tr>
                  <tr>
            <td id="inject_repo.args">
              <code>args</code>
            </td>
            <td>
                                     required<br/>
                          The repos visible to the current module that should be injected into the
extension under the same name.
            </td>
          </tr>
                  <tr>
            <td id="inject_repo.kwargs">
              <code>kwargs</code>
            </td>
            <td>
                                     required<br/>
                          The new repos to inject into the extension, where the values are the names of
repos in the scope of the current module and the keys are the name they will be
visible under in the extension.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="local_path_override">local_path_override</h2>
        <p><pre class="rule-signature"><code>None</code> local_path_override(module_name, path)</pre></p>

    Specifies that this dependency should come from a certain directory on local disk,
instead of from a registry. Effectively, this dependency will be backed by a
<code>local_repository</code> rule.

<p>This directive only takes effect in the root module; in other words, if a module is
used as a dependency by others, its own overrides are ignored.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="local_path_override.module_name">
              <code>module_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the Bazel module dependency to apply this override to.
            </td>
          </tr>
                  <tr>
            <td id="local_path_override.path">
              <code>path</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The path to the directory where this module is.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="module">module</h2>
        <p><pre class="rule-signature"><code>None</code> module(name='', version='', compatibility_level=0, repo_name='', bazel_compatibility=[])</pre></p>

    Declares certain properties of the Bazel module represented by the current Bazel repo. These properties are either essential metadata of the module (such as the name and version), or affect behavior of the current module and its dependents.  <p>It should be called at most once, and if called, it must be the very first directive in the MODULE.bazel file. It can be omitted only if this module is the root module (as in, if it's not going to be depended on by another module).

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="module.name">
              <code>name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          The name of the module. Can be omitted only if this module is the root module (as in, if it's not going to be depended on by another module). A valid module name must: 1) only contain lowercase letters (a-z), digits (0-9), dots (.), hyphens (-), and underscores (_); 2) begin with a lowercase letter; 3) end with a lowercase letter or digit.
            </td>
          </tr>
                  <tr>
            <td id="module.version">
              <code>version</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          The version of the module. Can be omitted only if this module is the root module (as in, if it's not going to be depended on by another module). The version must be in a relaxed SemVer format; see <a href="/versions/8.1.0/external/module#version_format">the documentation</a> for more details.
            </td>
          </tr>
                  <tr>
            <td id="module.compatibility_level">
              <code>compatibility_level</code>
            </td>
            <td>
                          <a class="anchor" href="../core/int.html">int</a>;
                                     default is <code>0</code><br/>
                          The compatibility level of the module; this should be changed every time a major incompatible change is introduced. This is essentially the "major version" of the module in terms of SemVer, except that it's not embedded in the version string itself, but exists as a separate field. Modules with different compatibility levels participate in version resolution as if they're modules with different names, but the final dependency graph cannot contain multiple modules with the same name but different compatibility levels (unless <code>multiple_version_override</code> is in effect). See <a href="/versions/8.1.0/external/module#compatibility_level">the documentation</a> for more details.
            </td>
          </tr>
                  <tr>
            <td id="module.repo_name">
              <code>repo_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          The name of the repository representing this module, as seen by the module itself. By default, the name of the repo is the name of the module. This can be specified to ease migration for projects that have been using a repo name for itself that differs from its module name.
            </td>
          </tr>
                  <tr>
            <td id="module.bazel_compatibility">
              <code>bazel_compatibility</code>
            </td>
            <td>
                          Iterable of <a class="anchor" href="../core/string.html">string</a>s;
                                     default is <code>[]</code><br/>
                          A list of bazel versions that allows users to declare which Bazel versions are compatible with this module. It does NOT affect dependency resolution, but bzlmod will use this information to check if your current Bazel version is compatible. The format of this value is a string of some constraint values separated by comma. Three constraints are supported: <=X.X.X: The Bazel version must be equal or older than X.X.X. Used when there is a known incompatible change in a newer version. >=X.X.X: The Bazel version must be equal or newer than X.X.X.Used when you depend on some features that are only available since X.X.X. -X.X.X: The Bazel version X.X.X is not compatible. Used when there is a bug in X.X.X that breaks you, but fixed in later versions.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="multiple_version_override">multiple_version_override</h2>
        <p><pre class="rule-signature"><code>None</code> multiple_version_override(module_name, versions, registry='')</pre></p>

    Specifies that a dependency should still come from a registry, but multiple versions of it should be allowed to coexist. See <a href="/versions/8.1.0/external/module#multiple-version_override">the documentation</a> for more details. This directive only takes effect in the root module; in other words, if a module is used as a dependency by others, its own overrides are ignored.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="multiple_version_override.module_name">
              <code>module_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the Bazel module dependency to apply this override to.
            </td>
          </tr>
                  <tr>
            <td id="multiple_version_override.versions">
              <code>versions</code>
            </td>
            <td>
                          Iterable of <a class="anchor" href="../core/string.html">string</a>s;
                                     required<br/>
                          Explicitly specifies the versions allowed to coexist. These versions must already be present in the dependency graph pre-selection. Dependencies on this module will be "upgraded" to the nearest higher allowed version at the same compatibility level, whereas dependencies that have a higher version than any allowed versions at the same compatibility level will cause an error.
            </td>
          </tr>
                  <tr>
            <td id="multiple_version_override.registry">
              <code>registry</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          Overrides the registry for this module; instead of finding this module from the default list of registries, the given registry should be used.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="override_repo">override_repo</h2>
        <p><pre class="rule-signature"><code>None</code> override_repo(extension_proxy, *args, **kwargs)</pre></p>

    Overrides one or more repos defined by the given module extension with the given repos
visible to the current module. This is ignored if the current module is not the root
module or `--ignore_dev_dependency` is enabled.

<p>Use <a href="#inject_repo"><code>inject_repo</code></a> instead to add a new repo.


          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="override_repo.extension_proxy">
              <code>extension_proxy</code>
            </td>
            <td>
                          module_extension_proxy;
                                     required<br/>
                          A module extension proxy object returned by a <code>use_extension</code> call.
            </td>
          </tr>
                  <tr>
            <td id="override_repo.args">
              <code>args</code>
            </td>
            <td>
                                     required<br/>
                          The repos in the extension that should be overridden with the repos of the same
name in the current module.
            </td>
          </tr>
                  <tr>
            <td id="override_repo.kwargs">
              <code>kwargs</code>
            </td>
            <td>
                                     required<br/>
                          The overrides to apply to the repos generated by the extension, where the values
are the names of repos in the scope of the current module and the keys are the
names of the repos they will override in the extension.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="register_execution_platforms">register_execution_platforms</h2>
        <p><pre class="rule-signature"><code>None</code> register_execution_platforms(dev_dependency=False, *platform_labels)</pre></p>

    Specifies already-defined execution platforms to be registered when this module is selected. Should be absolute <a href='https://bazel.build/versions/8.1.0/reference/glossary#target-pattern'>target patterns</a> (ie. beginning with either <code>@</code> or <code>//</code>). See <a href="/versions/8.1.0/docs/toolchains">toolchain resolution</a> for more information. Patterns that expand to multiple targets, such as <code>:all</code>, will be registered in lexicographical order by name.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="register_execution_platforms.dev_dependency">
              <code>dev_dependency</code>
            </td>
            <td>
                          <a class="anchor" href="../core/bool.html">bool</a>;
                                     default is <code>False</code><br/>
                          If true, the execution platforms will not be registered if the current module is not the root module or `--ignore_dev_dependency` is enabled.
            </td>
          </tr>
                  <tr>
            <td id="register_execution_platforms.platform_labels">
              <code>platform_labels</code>
            </td>
            <td>
                          <a class="anchor" href="../core/list.html">sequence</a> of <a class="anchor" href="../core/string.html">string</a>s;
                                     required<br/>
                          The target patterns to register.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="register_toolchains">register_toolchains</h2>
        <p><pre class="rule-signature"><code>None</code> register_toolchains(dev_dependency=False, *toolchain_labels)</pre></p>

    Specifies already-defined toolchains to be registered when this module is selected. Should be absolute <a href='https://bazel.build/versions/8.1.0/reference/glossary#target-pattern'>target patterns</a> (ie. beginning with either <code>@</code> or <code>//</code>). See <a href="/versions/8.1.0/docs/toolchains">toolchain resolution</a> for more information. Patterns that expand to multiple targets, such as <code>:all</code>, will be registered in lexicographical order by target name (not the name of the toolchain implementation).

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="register_toolchains.dev_dependency">
              <code>dev_dependency</code>
            </td>
            <td>
                          <a class="anchor" href="../core/bool.html">bool</a>;
                                     default is <code>False</code><br/>
                          If true, the toolchains will not be registered if the current module is not the root module or `--ignore_dev_dependency` is enabled.
            </td>
          </tr>
                  <tr>
            <td id="register_toolchains.toolchain_labels">
              <code>toolchain_labels</code>
            </td>
            <td>
                          <a class="anchor" href="../core/list.html">sequence</a> of <a class="anchor" href="../core/string.html">string</a>s;
                                     required<br/>
                          The target patterns to register.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="single_version_override">single_version_override</h2>
        <p><pre class="rule-signature"><code>None</code> single_version_override(module_name, version='', registry='', patches=[], patch_cmds=[], patch_strip=0)</pre></p>

    Specifies that a dependency should still come from a registry, but its version should be pinned, or its registry overridden, or a list of patches applied. This directive only takes effect in the root module; in other words, if a module is used as a dependency by others, its own overrides are ignored.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="single_version_override.module_name">
              <code>module_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the Bazel module dependency to apply this override to.
            </td>
          </tr>
                  <tr>
            <td id="single_version_override.version">
              <code>version</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          Overrides the declared version of this module in the dependency graph. In other words, this module will be "pinned" to this override version. This attribute can be omitted if all one wants to override is the registry or the patches.
            </td>
          </tr>
                  <tr>
            <td id="single_version_override.registry">
              <code>registry</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     default is <code>''</code><br/>
                          Overrides the registry for this module; instead of finding this module from the default list of registries, the given registry should be used.
            </td>
          </tr>
                  <tr>
            <td id="single_version_override.patches">
              <code>patches</code>
            </td>
            <td>
                          Iterable of <a class="anchor" href="../core/string.html">string</a>s;
                                     default is <code>[]</code><br/>
                          A list of labels pointing to patch files to apply for this module. The patch files must exist in the source tree of the top level project. They are applied in the list order.<p>If a patch makes changes to the MODULE.bazel file, these changes will only be effective if the patch file is provided by the root module.
            </td>
          </tr>
                  <tr>
            <td id="single_version_override.patch_cmds">
              <code>patch_cmds</code>
            </td>
            <td>
                          Iterable of <a class="anchor" href="../core/string.html">string</a>s;
                                     default is <code>[]</code><br/>
                          Sequence of Bash commands to be applied on Linux/Macos after patches are applied.<p>Changes to the MODULE.bazel file will not be effective.
            </td>
          </tr>
                  <tr>
            <td id="single_version_override.patch_strip">
              <code>patch_strip</code>
            </td>
            <td>
                          <a class="anchor" href="../core/int.html">int</a>;
                                     default is <code>0</code><br/>
                          Same as the --strip argument of Unix patch.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="use_extension">use_extension</h2>
        <p><pre class="rule-signature">module_extension_proxy use_extension(extension_bzl_file, extension_name, *, dev_dependency=False, isolate=False)</pre></p>

    Returns a proxy object representing a module extension; its methods can be invoked to create module extension tags.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="use_extension.extension_bzl_file">
              <code>extension_bzl_file</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          A label to the Starlark file defining the module extension.
            </td>
          </tr>
                  <tr>
            <td id="use_extension.extension_name">
              <code>extension_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the module extension to use. A symbol with this name must be exported by the Starlark file.
            </td>
          </tr>
                  <tr>
            <td id="use_extension.dev_dependency">
              <code>dev_dependency</code>
            </td>
            <td>
                          <a class="anchor" href="../core/bool.html">bool</a>;
                                     default is <code>False</code><br/>
                          If true, this usage of the module extension will be ignored if the current module is not the root module or `--ignore_dev_dependency` is enabled.
            </td>
          </tr>
                  <tr>
            <td id="use_extension.isolate">
              <code>isolate</code>
            </td>
            <td>
                          <a class="anchor" href="../core/bool.html">bool</a>;
                                     default is <code>False</code><br/>
                          <b>Experimental</b>. This parameter is experimental and may change at any time. Please do not depend on it. It may be enabled on an experimental basis by setting <code>--experimental_isolated_extension_usages</code> <br>If true, this usage of the module extension will be isolated from all other usages, both in this and other modules. Tags created for this usage do not affect other usages and the repositories generated by the extension for this usage will be distinct from all other repositories generated by the extension.<p>This parameter is currently experimental and only available with the flag <code>--experimental_isolated_extension_usages</code>.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="use_repo">use_repo</h2>
        <p><pre class="rule-signature"><code>None</code> use_repo(extension_proxy, *args, **kwargs)</pre></p>

    Imports one or more repos generated by the given module extension into the scope of the current module.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="use_repo.extension_proxy">
              <code>extension_proxy</code>
            </td>
            <td>
                          module_extension_proxy;
                                     required<br/>
                          A module extension proxy object returned by a <code>use_extension</code> call.
            </td>
          </tr>
                  <tr>
            <td id="use_repo.args">
              <code>args</code>
            </td>
            <td>
                                     required<br/>
                          The names of the repos to import.
            </td>
          </tr>
                  <tr>
            <td id="use_repo.kwargs">
              <code>kwargs</code>
            </td>
            <td>
                                     required<br/>
                          Specifies certain repos to import into the scope of the current module with different names. The keys should be the name to use in the current scope, whereas the values should be the original names exported by the module extension.
            </td>
          </tr>
                </tbody>
      </table>

        <h2 id="use_repo_rule">use_repo_rule</h2>
        <p><pre class="rule-signature">repo_rule_proxy use_repo_rule(repo_rule_bzl_file, repo_rule_name)</pre></p>

    Returns a proxy value that can be directly invoked in the MODULE.bazel file as a repository rule, one or more times. Repos created in such a way are only visible to the current module, under the name declared using the <code>name</code> attribute on the proxy. The implicit Boolean <code>dev_dependency</code> attribute can also be used on the proxy to denote that a certain repo is only to be created when the current module is the root module.

          <!-- hide-from-toc is a class used by DevSite for the public Bazel site
      (https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
      <h3 class="hide-from-toc">Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
                  <tr>
            <td id="use_repo_rule.repo_rule_bzl_file">
              <code>repo_rule_bzl_file</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          A label to the Starlark file defining the repo rule.
            </td>
          </tr>
                  <tr>
            <td id="use_repo_rule.repo_rule_name">
              <code>repo_rule_name</code>
            </td>
            <td>
                          <a class="anchor" href="../core/string.html">string</a>;
                                     required<br/>
                          The name of the repo rule to use. A symbol with this name must be exported by the Starlark file.
            </td>
          </tr>
                </tbody>
      </table>


</body>
</html>

<!-- {% endraw %} -->
