From fc94c00450db98dd3faf2c5926b12e0981094abe Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 19 Sep 2024 12:34:46 -0700 Subject: [PATCH] Fix the documentation for `bazel fetch --configure` With `bazel fetch`, `--configure` and `--force` are now independent and both need to be specified to refetch configure repos. The docs did not reflect this correctly. Fixes #23639 Closes #23665. PiperOrigin-RevId: 676520136 Change-Id: I07040c743c2b047f8511d1a42ea94d858c520011 --- site/en/extending/repo.md | 8 ++++---- .../starlark/builtins_bzl/common/xcode/semantics.bzl.oss | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/en/extending/repo.md b/site/en/extending/repo.md index ab14227c989707..78b47b5dab4606 100644 --- a/site/en/extending/repo.md +++ b/site/en/extending/repo.md @@ -125,9 +125,9 @@ changes: There are two parameters of `repository_rule` that control when the repositories are re-fetched: -* If the `configure` flag is set, the repository is only re-fetched on `bazel - fetch` when the` --configure` parameter is passed to it (if the attribute is - unset, this command will not cause a re-fetch) +* If the `configure` flag is set, the repository is re-fetched on `bazel + fetch --force --configure` (non-`configure` repositories are not + re-fetched). * If the `local` flag is set, in addition to the above cases, the repo is also re-fetched when the Bazel server restarts. @@ -142,7 +142,7 @@ unconditionally by calling `bazel fetch --force --all`. Moreover, some repo rules inspect the local machine and might become outdated if the local machine was upgraded. Here you can ask Bazel to only refetch those external repos where the [`repository_rule`](/rules/lib/globals#repository_rule) -definition has the `configure` attribute set, use `bazel fetch --all +definition has the `configure` attribute set, use `bazel fetch --force --configure`. ## Examples diff --git a/src/main/starlark/builtins_bzl/common/xcode/semantics.bzl.oss b/src/main/starlark/builtins_bzl/common/xcode/semantics.bzl.oss index 02d5a4da19a4a7..dfc8ce76ae0bd0 100644 --- a/src/main/starlark/builtins_bzl/common/xcode/semantics.bzl.oss +++ b/src/main/starlark/builtins_bzl/common/xcode/semantics.bzl.oss @@ -14,4 +14,4 @@ """Semantics for Bazel Xcode rules""" -unavailable_xcode_message = "'bazel fetch --configure' (Bzlmod) or 'bazel sync --configure' (WORKSPACE)" +unavailable_xcode_message = "'bazel fetch --force --configure' (Bzlmod) or 'bazel sync --configure' (WORKSPACE)"