Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions external/vendor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,6 @@ Note that vendoring all dependencies has a few **disadvantages**:

Therefore, consider vendoring for specific targets first.

### Vendor tools for Bazel subcommands {#vendor-tools-for-subcommands}

Some Bazel subcommands (such as `bazel mod tidy`) have implicit tool
dependencies that are not reachable from user build targets, so they are
**not** included by `bazel vendor //...`. To vendor those tools as well, add
the `@bazel_tools//tools:tools_for_bazel_subcommands` filegroup to your
vendor invocation:

```none
bazel vendor //... @bazel_tools//tools:tools_for_bazel_subcommands
```

This is required if you plan to run commands like `bazel mod tidy` in an
offline or hermetic environment (for example with `--vendor_dir` and
`--nofetch`).

## Configure vendor mode with VENDOR.bazel {#configure-vendor-mode}

You can control how given repos are handled with the VENDOR.bazel file located
Expand Down
18 changes: 6 additions & 12 deletions reference/command-line-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1804,14 +1804,14 @@ Miscellaneous options, not otherwise categorized.:
`--[no]show_timestamps` default: "false"
: Include timestamps in messages

`--tls_certificate=<a string; empty to unset>` default: see description
: Specify a path to a TLS certificate that is trusted to sign server certificates. An empty value resets the flag to its default.
`--tls_certificate=<a string>` default: see description
: Specify a path to a TLS certificate that is trusted to sign server certificates.

`--tls_client_certificate=<a string; empty to unset>` default: see description
: Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication. An empty value resets the flag to its default.
`--tls_client_certificate=<a string>` default: see description
: Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.

`--tls_client_key=<a string; empty to unset>` default: see description
: Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication. An empty value resets the flag to its default.
`--tls_client_key=<a string>` default: see description
: Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.

`--ui_actions_shown=<an integer>` default: "8"
: Number of concurrent actions shown in the detailed progress bar; each action is shown on a separate line. The progress bar always shows at least one one, all numbers less than 1 are mapped to 1.
Expand Down Expand Up @@ -4587,12 +4587,6 @@ Remote caching and execution options:
`--[no]remote_verify_downloads` default: "true"
: If set to true, Bazel will compute the hash sum of all remote downloads and discard the remotely cached values if they don't match the expected value.

`--[no]rewind_lost_inputs` default: "false"
: Whether to use action rewinding to recover from lost inputs.

Tags:
[`execution`](#effect_tag_EXECUTION)

Miscellaneous options, not otherwise categorized.:

`--[no]allow_analysis_cache_discard` default: "true"
Expand Down
2 changes: 1 addition & 1 deletion release/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ information about Bazel's release model.
| ----------- | ------------- | -------------- | -------------- |
| Bazel 10 | Rolling| [Check rolling release page](/release/rolling) | N/A |
| Bazel 9 | Active| [9.1.0](https://github.com/bazelbuild/bazel/releases/tag/9.1.0) | Dec 2028 |
| Bazel 8 | Maintenance| [8.7.0](https://github.com/bazelbuild/bazel/releases/tag/8.7.0) | Dec 2027 |
| Bazel 8 | Maintenance| [8.6.0](https://github.com/bazelbuild/bazel/releases/tag/8.6.0) | Dec 2027 |
| Bazel 7 | Maintenance| [7.7.1](https://github.com/bazelbuild/bazel/releases/tag/7.7.1) | Dec 2026 |
| Bazel 6 | Deprecated | [6.6.0](https://github.com/bazelbuild/bazel/releases/tag/6.6.0) | Dec 2025 |
| Bazel 5 | Deprecated | [5.4.1](https://github.com/bazelbuild/bazel/releases/tag/5.4.1) | Jan 2025 |
Expand Down
14 changes: 1 addition & 13 deletions rules/lib/builtins/ToolchainContext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,4 @@
title: 'ToolchainContext'
---

Holds toolchains available for a particular exec group. Toolchain targets are accessed by indexing with the toolchain type, as in `ctx.toolchains["//pkg:my_toolchain_type"]`. If the toolchain was optional and no toolchain was resolved, this will return `None`. Accessing toolchains of an aspect or rule via `ctx.toolchains` returns the indexed toolchain as a `ToolchainInfo` provider. While when using aspects, `ToolchainContext` is also used to hold the toolchains of the base target. It can be accessed by `ctx.rule.toolchains["//pkg:my_toolchain_type"]` and it returns the list of providers resulted from applying the aspects on these toolchain targets.

## Members

* [toolchain_types](#toolchain_types)

## toolchain_types

```
sequence ToolchainContext.toolchain_types()
```

Returns the resolved toolchain type labels.
Holds toolchains available for a particular exec group. Toolchain targets are accessed by indexing with the toolchain type, as in `ctx.toolchains["//pkg:my_toolchain_type"]`. If the toolchain was optional and no toolchain was resolved, this will return `None`. Accessing toolchains of an aspect or rule via `ctx.toolchains` returns the indexed toolchain as a `ToolchainInfo` provider. While when using aspects, `ToolchainContext` is also used to hold the toolchains of the base target. It can be accessed by `ctx.rule.toolchains["//pkg:my_toolchain_type"]` and it returns the list of providers resulted from applying the aspects on these toolchain targets.
4 changes: 2 additions & 2 deletions rules/lib/builtins/module_ctx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The context of the module extension containing helper functions and information
unknown module_ctx.download(url, output='', sha256='', executable=False, allow_fail=False, canonical_id='', auth={}, headers={}, *, integrity='', block=True)
```

Downloads a file to the output path for the provided url and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`, as well as `size_bytes`, which contains the size of the downloaded file in bytes as an integer. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)
Downloads a file to the output path for the provided url and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)

### Parameters

Expand All @@ -54,7 +54,7 @@ Downloads a file to the output path for the provided url and returns a struct co
struct module_ctx.download_and_extract(url, output='', sha256='', type='', strip_prefix='', allow_fail=False, canonical_id='', auth={}, headers={}, *, integrity='', rename_files={}, strip_components=0)
```

Downloads a file to the output path for the provided url, extracts it, and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`, as well as the `size_bytes` of the downloaded file in bytes as an integer. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)
Downloads a file to the output path for the provided url, extracts it, and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)

### Parameters

Expand Down
4 changes: 2 additions & 2 deletions rules/lib/builtins/repository_ctx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Deletes a file or a directory. Returns a bool, indicating whether the file or di
unknown repository_ctx.download(url, output='', sha256='', executable=False, allow_fail=False, canonical_id='', auth={}, headers={}, *, integrity='', block=True)
```

Downloads a file to the output path for the provided url and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`, as well as `size_bytes`, which contains the size of the downloaded file in bytes as an integer. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)
Downloads a file to the output path for the provided url and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)

### Parameters

Expand All @@ -81,7 +81,7 @@ Downloads a file to the output path for the provided url and returns a struct co
struct repository_ctx.download_and_extract(url, output='', sha256='', type='', strip_prefix='', allow_fail=False, canonical_id='', auth={}, headers={}, *, integrity='', rename_files={}, strip_components=0)
```

Downloads a file to the output path for the provided url, extracts it, and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`, as well as the `size_bytes` of the downloaded file in bytes as an integer. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)
Downloads a file to the output path for the provided url, extracts it, and returns a struct containing `success`, a flag which is `true` if the download completed successfully, and if successful, a hash of the file with the fields `sha256` and `integrity`. If the value of the `success` field is false, the `error` field will be set with a message indicating why the download failed. The message in the `error` field is for debugging purposes only and should not be relied upon as a stable API (the format of the string can change between patch versions of Bazel). When `sha256` or `integrity` is user specified, setting an explicit `canonical_id` is highly recommended. e.g. [`get_default_canonical_id`](/rules/lib/repo/cache#get_default_canonical_id)

### Parameters

Expand Down
44 changes: 4 additions & 40 deletions rules/lib/repo/git.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Rules for cloning external git repositories.
<pre>
load("@bazel//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(<a href="#git_repository-name">name</a>, <a href="#git_repository-add_prefix">add_prefix</a>, <a href="#git_repository-branch">branch</a>, <a href="#git_repository-build_file">build_file</a>, <a href="#git_repository-build_file_content">build_file_content</a>, <a href="#git_repository-canonical_id">canonical_id</a>, <a href="#git_repository-commit">commit</a>,
<a href="#git_repository-init_submodules">init_submodules</a>, <a href="#git_repository-patch_args">patch_args</a>, <a href="#git_repository-patch_cmds">patch_cmds</a>, <a href="#git_repository-patch_cmds_win">patch_cmds_win</a>, <a href="#git_repository-patch_strip">patch_strip</a>, <a href="#git_repository-patch_tool">patch_tool</a>,
<a href="#git_repository-patches">patches</a>, <a href="#git_repository-recursive_init_submodules">recursive_init_submodules</a>, <a href="#git_repository-remote">remote</a>, <a href="#git_repository-remote_module_file_integrity">remote_module_file_integrity</a>,
git_repository(<a href="#git_repository-name">name</a>, <a href="#git_repository-branch">branch</a>, <a href="#git_repository-build_file">build_file</a>, <a href="#git_repository-build_file_content">build_file_content</a>, <a href="#git_repository-canonical_id">canonical_id</a>, <a href="#git_repository-commit">commit</a>, <a href="#git_repository-init_submodules">init_submodules</a>,
<a href="#git_repository-patch_args">patch_args</a>, <a href="#git_repository-patch_cmds">patch_cmds</a>, <a href="#git_repository-patch_cmds_win">patch_cmds_win</a>, <a href="#git_repository-patch_strip">patch_strip</a>, <a href="#git_repository-patch_tool">patch_tool</a>, <a href="#git_repository-patches">patches</a>,
<a href="#git_repository-recursive_init_submodules">recursive_init_submodules</a>, <a href="#git_repository-remote">remote</a>, <a href="#git_repository-remote_module_file_integrity">remote_module_file_integrity</a>,
<a href="#git_repository-remote_module_file_urls">remote_module_file_urls</a>, <a href="#git_repository-remote_patch_strip">remote_patch_strip</a>, <a href="#git_repository-remote_patches">remote_patches</a>, <a href="#git_repository-shallow_since">shallow_since</a>,
<a href="#git_repository-sparse_checkout_file">sparse_checkout_file</a>, <a href="#git_repository-sparse_checkout_patterns">sparse_checkout_patterns</a>, <a href="#git_repository-strip_prefix">strip_prefix</a>, <a href="#git_repository-tag">tag</a>, <a href="#git_repository-verbose">verbose</a>,
<a href="#git_repository-workspace_file">workspace_file</a>, <a href="#git_repository-workspace_file_content">workspace_file_content</a>)
Expand Down Expand Up @@ -64,24 +64,6 @@ The reasons are:

A unique name for this repository.

</p>
</td>
</tr>
<tr id="git_repository-add_prefix">
<td><code>add_prefix</code></td>
<td>

String; optional

<p>

Destination directory relative to the repository directory.

The git repo will be cloned into this directory, after applying `strip_prefix`
(if any) to the file paths within the repo. For example, file
`foo-1.2.3/src/foo.h` will be cloned to `bar/src/foo.h` if `add_prefix = "bar"`
and `strip_prefix = "foo-1.2.3"`.

</p>
</td>
</tr>
Expand Down Expand Up @@ -443,7 +425,7 @@ This repository rule depends on the following environment variables:
<pre>
load("@bazel//tools/build_defs/repo:git.bzl", "new_git_repository")

new_git_repository(<a href="#new_git_repository-name">name</a>, <a href="#new_git_repository-add_prefix">add_prefix</a>, <a href="#new_git_repository-branch">branch</a>, <a href="#new_git_repository-build_file">build_file</a>, <a href="#new_git_repository-build_file_content">build_file_content</a>, <a href="#new_git_repository-canonical_id">canonical_id</a>, <a href="#new_git_repository-commit">commit</a>,
new_git_repository(<a href="#new_git_repository-name">name</a>, <a href="#new_git_repository-branch">branch</a>, <a href="#new_git_repository-build_file">build_file</a>, <a href="#new_git_repository-build_file_content">build_file_content</a>, <a href="#new_git_repository-canonical_id">canonical_id</a>, <a href="#new_git_repository-commit">commit</a>,
<a href="#new_git_repository-init_submodules">init_submodules</a>, <a href="#new_git_repository-patch_args">patch_args</a>, <a href="#new_git_repository-patch_cmds">patch_cmds</a>, <a href="#new_git_repository-patch_cmds_win">patch_cmds_win</a>, <a href="#new_git_repository-patch_strip">patch_strip</a>, <a href="#new_git_repository-patch_tool">patch_tool</a>,
<a href="#new_git_repository-patches">patches</a>, <a href="#new_git_repository-recursive_init_submodules">recursive_init_submodules</a>, <a href="#new_git_repository-remote">remote</a>, <a href="#new_git_repository-remote_module_file_integrity">remote_module_file_integrity</a>,
<a href="#new_git_repository-remote_module_file_urls">remote_module_file_urls</a>, <a href="#new_git_repository-remote_patch_strip">remote_patch_strip</a>, <a href="#new_git_repository-remote_patches">remote_patches</a>, <a href="#new_git_repository-shallow_since">shallow_since</a>,
Expand Down Expand Up @@ -471,24 +453,6 @@ Deprecated - use the drop-in replacement 'git_repository' instead

A unique name for this repository.

</p>
</td>
</tr>
<tr id="new_git_repository-add_prefix">
<td><code>add_prefix</code></td>
<td>

String; optional

<p>

Destination directory relative to the repository directory.

The git repo will be cloned into this directory, after applying `strip_prefix`
(if any) to the file paths within the repo. For example, file
`foo-1.2.3/src/foo.h` will be cloned to `bar/src/foo.h` if `add_prefix = "bar"`
and `strip_prefix = "foo-1.2.3"`.

</p>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated 127 files