diff --git a/external/vendor.mdx b/external/vendor.mdx index f02e94a2..ab82c46c 100644 --- a/external/vendor.mdx +++ b/external/vendor.mdx @@ -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 diff --git a/rules/lib/builtins/module_ctx.mdx b/rules/lib/builtins/module_ctx.mdx index 062d6de4..40a4bb62 100644 --- a/rules/lib/builtins/module_ctx.mdx +++ b/rules/lib/builtins/module_ctx.mdx @@ -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 @@ -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 diff --git a/rules/lib/builtins/repository_ctx.mdx b/rules/lib/builtins/repository_ctx.mdx index de749cac..abb48faf 100644 --- a/rules/lib/builtins/repository_ctx.mdx +++ b/rules/lib/builtins/repository_ctx.mdx @@ -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 @@ -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 diff --git a/rules/lib/repo/git.mdx b/rules/lib/repo/git.mdx index 780915ab..28f2632a 100644 --- a/rules/lib/repo/git.mdx +++ b/rules/lib/repo/git.mdx @@ -14,9 +14,9 @@ Rules for cloning external git repositories.
 load("@bazel//tools/build_defs/repo:git.bzl", "git_repository")
 
-git_repository(name, add_prefix, branch, build_file, build_file_content, canonical_id, commit,
-               init_submodules, patch_args, patch_cmds, patch_cmds_win, patch_strip, patch_tool,
-               patches, recursive_init_submodules, remote, remote_module_file_integrity,
+git_repository(name, branch, build_file, build_file_content, canonical_id, commit, init_submodules,
+               patch_args, patch_cmds, patch_cmds_win, patch_strip, patch_tool, patches,
+               recursive_init_submodules, remote, remote_module_file_integrity,
                remote_module_file_urls, remote_patch_strip, remote_patches, shallow_since,
                sparse_checkout_file, sparse_checkout_patterns, strip_prefix, tag, verbose,
                workspace_file, workspace_file_content)
@@ -64,24 +64,6 @@ The reasons are:
 
 A unique name for this repository.
 
-

- - - -add_prefix - - -String; optional - -

- -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"`. -

@@ -443,7 +425,7 @@ This repository rule depends on the following environment variables:
 load("@bazel//tools/build_defs/repo:git.bzl", "new_git_repository")
 
-new_git_repository(name, add_prefix, branch, build_file, build_file_content, canonical_id, commit,
+new_git_repository(name, branch, build_file, build_file_content, canonical_id, commit,
                    init_submodules, patch_args, patch_cmds, patch_cmds_win, patch_strip, patch_tool,
                    patches, recursive_init_submodules, remote, remote_module_file_integrity,
                    remote_module_file_urls, remote_patch_strip, remote_patches, shallow_since,
@@ -471,24 +453,6 @@ Deprecated - use the drop-in replacement 'git_repository' instead
 
 A unique name for this repository.
 
-

- - - -add_prefix - - -String; optional - -

- -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"`. -

diff --git a/upstream b/upstream index ae4d2d61..9c4ca521 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit ae4d2d610e41a4824df35a5100799ddfd7505dfa +Subproject commit 9c4ca521197ef1d53595cf8a6b2d418e73eb6bbb