From 4261b2a1196bcbb061c18d61eef1d41c89f04c58 Mon Sep 17 00:00:00 2001
From: aiuto Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
Using Bazel
//mypkg:target
, and that label is a
declared prerequisite of the current rule, it is expanded into the
pathname of the file represented by the
- target
+ target
//mypkg:target
.
Bazel evaluates configurable attributes after processing macros and before
processing rules (technically, between the
-
+
loading and analysis phases).
Any processing before select()
evaluation doesn't know which
branch the select()
chooses. Macros, for example, can't change
their behavior based on the chosen branch, and bazel query
can
only make conservative guesses about a target's configurable dependencies. See
-
+
this FAQ
for more on using select()
with rules and macros.
- See + See Configurable Build Attributes for a detailed overview.
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm b/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm index 4ac664e6ff3eeb..071eed59c0e921 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm +++ b/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm @@ -113,7 +113,7 @@ title: Make VariablesCOMPILATION_MODE
:
fastbuild
, dbg
, or opt
. (more
+ href="https://docs.bazel.build/versions/main/user-manual.html#flag--compilation_mode">more
details)
Transitions can also explicitly set --platforms to be clear what platform they set. * *
Platform mappings: - * https://docs.bazel.build/versions/master/platforms-intro.html#platform-mappings. + * https://docs.bazel.build/versions/main/platforms-intro.html#platform-mappings. * *
This doesn't check that the changed value is actually different than the source (i.e.
* setting {@code --cpu=foo} when {@code --cpu} is already {@code foo}). That could unnecessarily
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkAttrModule.java b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkAttrModule.java
index 18cece5a5690d2..ab78c0566a2148 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkAttrModule.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkAttrModule.java
@@ -167,7 +167,7 @@ private static Attribute.Builder> createAttribute(
if (!containsNonNoneKey(arguments, CONFIGURATION_ARG)) {
throw Starlark.errorf(
"cfg parameter is mandatory when executable=True is provided. Please see "
- + "https://www.bazel.build/versions/master/docs/skylark/rules.html#configurations "
+ + "https://www.bazel.build/versions/main/docs/skylark/rules.html#configurations "
+ "for more details.");
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryRule.java
index bcabbe5b3a5c38..1d19b356fcca53 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryRule.java
@@ -89,7 +89,7 @@ public Metadata getMetadata() {
WORKSPACE
file.
-For more information, read the +For more information, read the full documentation on using Android NDK with Bazel.
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java index dd98037f288109..455c93699c4fa2 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java @@ -75,7 +75,7 @@ public Runfiles.EmptyFilesSupplier getEmptyRunfilesSupplier() { @Override public String getSrcsVersionDocURL() { // TODO(#8996): Update URL to point to rules_python's docs instead of the Bazel site. - return "https://docs.bazel.build/versions/master/be/python.html#py_binary.srcs_version"; + return "https://docs.bazel.build/versions/main/be/python.html#py_binary.srcs_version"; } @Override diff --git a/src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java index 57d3dfcc6fae25..6497c2e6f46a80 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java +++ b/src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java @@ -78,7 +78,7 @@ public String getLineTerminator() { + " --universe_scope value inferred for a query expression that uses universe-scoped" + " functions (e.g.`allrdeps`) may not be what you want, so you should use this" + " option only if you know what you are doing. See" - + " https://docs.bazel.build/versions/master/query.html#sky-query for details and" + + " https://docs.bazel.build/versions/main/query.html#sky-query for details and" + " examples. If --universe_scope is set, then this option's value is ignored. Note:" + " this option applies only to `query` (i.e. not `cquery`).") public boolean inferUniverseScope; diff --git a/src/main/java/com/google/devtools/build/lib/remote/README.md b/src/main/java/com/google/devtools/build/lib/remote/README.md index 4b61d255d46f4a..ab4992cf4b4b2b 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/README.md +++ b/src/main/java/com/google/devtools/build/lib/remote/README.md @@ -1,3 +1,3 @@ # Remote caching and execution with Bazel -The documentation has been moved to https://docs.bazel.build/versions/master/remote-caching.html. +The documentation has been moved to https://docs.bazel.build/versions/main/remote-caching.html. diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java index 4cd7bdc4aa0618..1102ca817b4267 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java @@ -107,7 +107,7 @@ public final class RemoteOptions extends OptionsBase { "A URI of a caching endpoint. The supported schemas are http, https, grpc, grpcs " + "(grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided " + "Bazel will default to grpcs. Specify grpc://, http:// or unix: schema to disable " - + "TLS. See https://docs.bazel.build/versions/master/remote-caching.html") + + "TLS. See https://docs.bazel.build/versions/main/remote-caching.html") public String remoteCache; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java index ddb0a6ca35228a..71da01c1e86fb5 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java @@ -230,7 +230,7 @@ If a key references a flag that can be set multiple times on the command line (e /* The same asvalues
but
- for
+ for
Starlark-defined flags.
*/
@@ -249,7 +249,7 @@ If a key references a flag that can be set multiple times on the command line (e
The minimum set of constraint_values
that the target platform must specify
in order to match this config_setting
. (The execution platform is not
considered here.) Any additional constraint values that the platform has are ignored. See
-
+
Configurable Build Attributes for details.
In the case where two config_setting
s both match in the same
@@ -350,7 +350,7 @@
--compilation_mode
--copt=-Da --copt=-Db
or a list-typed
-
+
Starlark flag), values = { "flag": "a" }
matches if "a"
is
present anywhere in the actual list.
@@ -369,7 +369,7 @@ If a flag takes multiple values (like --copt=-Da --copt=-Db
or a li
--define
, but this offers weaker
support and is not recommended. See
here for more discussion.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java
index f10f4b67ecde19..f43e4688fed190 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainRule.java
@@ -456,7 +456,7 @@ public Metadata getMetadata() {
Use toolchain_config
attribute to configure the C++ toolchain.
See also this
-
+
page
for elaborate C++ toolchain configuration and toolchain selection documentation.
See also this - + page for elaborate C++ toolchain configuration and toolchain selection documentation.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListenerRule.java b/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListenerRule.java index b35e35563b8f70..36ef4586d85447 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListenerRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListenerRule.java @@ -66,7 +66,7 @@ public Metadata getMetadata() {WARNING: Extra actions are deprecated. Use - aspects + aspects instead.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionRule.java b/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionRule.java index 30f29aa149882f..f468a601d27a7c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/extra/ExtraActionRule.java @@ -132,7 +132,7 @@ public Metadata getMetadata() {WARNING: Extra actions are deprecated. Use - aspects + aspects instead.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java index 5590fde9b33bba..e099a842f8fb50 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfoBuildHelper.java @@ -73,7 +73,7 @@ public static JavaInfoBuildHelper getInstance() { * @param compileTimeDeps compile time dependencies that were used to create the output jar * @param runtimeDeps runtime dependencies that are needed for this library * @param exports libraries to make available for users of this library. java_library.exports * @param exportedPlugins A list of exported plugins. * @param nativeLibraries CC library dependencies that are needed for this library diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java index f7de39b96330b7..65acc09f0adcc0 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java @@ -63,7 +63,7 @@ public RuleDefinition.Metadata getMetadata() { the capability for platforms to have different versions of the glibc library installed. For more details, see the -Platforms page. +Platforms page.Each constraint_setting
has an extensible set of associated
constraint_value
s. Usually these are defined in the same package, but sometimes a
diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java
index cbcc2335a54705..5467eccb646dd5 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java
@@ -60,7 +60,7 @@ public Metadata getMetadata() {
This rule introduces a new value for a given constraint type.
For more details, see the
-Platforms page.
+Platforms page.
The following creates a new possible value for the predefined constraint_value
diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/PlatformRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/PlatformRule.java
index e0184c8cb76076..ec13c3abc0c9c8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/platform/PlatformRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/platform/PlatformRule.java
@@ -139,7 +139,7 @@ public Metadata getMetadata() {
which part of the build may run.
For more details, see the
-Platforms page.
+Platforms page.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/ToolchainRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/ToolchainRule.java index 20e8037abfc25f..1640c095959b0c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/platform/ToolchainRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/platform/ToolchainRule.java @@ -112,7 +112,7 @@ public RuleDefinition.Metadata getMetadata() {
This rule declares a specific toolchain's type and constraints so that it can be selected during toolchain resolution. See the -Toolchains page for more +Toolchains page for more details. */ diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java index 50e2495f434bec..febb31d667a517 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java @@ -122,7 +122,7 @@ private DetailedExitCode checkCwdInWorkspace(EventHandler eventHandler) { + "' command is only supported from within a workspace" + " (below a directory having a WORKSPACE file).\n" + "See documentation at" - + " https://docs.bazel.build/versions/master/build-ref.html#workspace"; + + " https://docs.bazel.build/versions/main/build-ref.html#workspace"; eventHandler.handle(Event.error(message)); return createDetailedExitCode(message, Code.NOT_IN_WORKSPACE); } @@ -168,7 +168,7 @@ private DetailedExitCode checkCwdInWorkspace(EventHandler eventHandler) { * specific commands should have priority over the broader commands (say a "build" option that * conflicts with a "common" option should override the common one regardless of order.) * - *
For each command, the options are parsed in rc order. This uses the master rc file first, + *
For each command, the options are parsed in rc order. This uses the primary rc file first,
* and follows import statements. This is the order in which they were passed by the client.
*/
void parseRcOptions(
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java
index bf5e34a1356cf6..1859e6c7f4484b 100644
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkAttrModuleApi.java
@@ -92,7 +92,7 @@ public interface StarlarkAttrModuleApi extends StarlarkValue {
String CONFIGURATION_ARG = "cfg";
// TODO(b/151742236): Update when new Starlark-based configuration framework is implemented.
String CONFIGURATION_DOC =
- ""
+ ""
+ "Configuration of the attribute. It can be either \"host\"
, "
+ "\"exec\"
, or \"target\"
.";
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java
index eed75872b51e0f..fc1d7a5f1ccee1 100644
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java
@@ -186,7 +186,7 @@ public interface JavaCommonApi<
doc =
"A string that specifies how to handle strict deps. Possible values: 'OFF', "
+ "'ERROR', 'WARN' and 'DEFAULT'. For more details see "
- + "https://docs.bazel.build/versions/master/bazel-user-manual.html#"
+ + "https://docs.bazel.build/versions/main/bazel-user-manual.html#"
+ "flag--strict_java_deps. By default 'ERROR'."),
@Param(
name = "java_toolchain",
diff --git a/src/main/java/com/google/devtools/build/lib/worker/JsonWorkerProtocol.java b/src/main/java/com/google/devtools/build/lib/worker/JsonWorkerProtocol.java
index 2c24073b6241d0..fc1effc6c3d040 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/JsonWorkerProtocol.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/JsonWorkerProtocol.java
@@ -92,7 +92,7 @@ private WorkResponse parseResponse() throws IOException {
requestId = reader.nextInt();
break;
default:
- // As per https://docs.bazel.build/versions/master/creating-workers.html#work-responses,
+ // As per https://docs.bazel.build/versions/main/creating-workers.html#work-responses,
// unknown fields are ignored.
reader.skipValue();
}
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkRequestHandler.java b/src/main/java/com/google/devtools/build/lib/worker/WorkRequestHandler.java
index ebb7b62de2b6ae..f347541cd5cc40 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/WorkRequestHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/WorkRequestHandler.java
@@ -33,8 +33,8 @@
/**
* A helper class that handles WorkRequests
- * (https://docs.bazel.build/versions/master/persistent-workers.html), including multiplex workers
- * (https://docs.bazel.build/versions/master/multiplex-worker.html).
+ * (https://docs.bazel.build/versions/main/persistent-workers.html), including multiplex workers
+ * (https://docs.bazel.build/versions/main/multiplex-worker.html).
*/
public class WorkRequestHandler implements AutoCloseable {
/** Contains the logic for reading {@link WorkRequest}s and writing {@link WorkResponse}s. */
diff --git a/src/main/java/com/google/devtools/build/skydoc/rendering/proto/stardoc_output.proto b/src/main/java/com/google/devtools/build/skydoc/rendering/proto/stardoc_output.proto
index 8e536fd1c23832..658ef8532db1fe 100644
--- a/src/main/java/com/google/devtools/build/skydoc/rendering/proto/stardoc_output.proto
+++ b/src/main/java/com/google/devtools/build/skydoc/rendering/proto/stardoc_output.proto
@@ -41,7 +41,7 @@ message ModuleInfo {
// Representation of a Starlark rule attribute type. These generally
// have a one-to-one correspondence with functions defined at
-// https://docs.bazel.build/versions/master/skylark/lib/attr.html.
+// https://docs.bazel.build/versions/main/skylark/lib/attr.html.
enum AttributeType {
UNKNOWN = 0;
// A special case of STRING; all rules have exactly one implicit
@@ -76,7 +76,7 @@ message RuleInfo {
// Representation of a Starlark rule attribute definition, comprised of an
// attribute name, and a schema defined by a call to one of the 'attr' module
// methods enumerated at
-// https://docs.bazel.build/versions/master/skylark/lib/attr.html
+// https://docs.bazel.build/versions/main/skylark/lib/attr.html
message AttributeInfo {
// The name of the attribute.
string name = 1;
diff --git a/src/main/protobuf/build.proto b/src/main/protobuf/build.proto
index c433a152a4cbde..7e69f002ef3e82 100644
--- a/src/main/protobuf/build.proto
+++ b/src/main/protobuf/build.proto
@@ -290,7 +290,7 @@ message Rule {
// BUILD file where the rule instance was instantiated. The line number will
// be that of a rule invocation or macro call (that in turn invoked a
// rule). See
- // https://docs.bazel.build/versions/master/skylark/macros.html#macro-creation
+ // https://docs.bazel.build/versions/main/skylark/macros.html#macro-creation
optional string location = 3;
// All of the attributes that describe the rule.
@@ -481,7 +481,7 @@ message AllowedRuleClassInfo {
}
// This message represents a single attribute of a single rule.
-// See docs.bazel.build/versions/master/skylark/lib/attr.html.
+// See docs.bazel.build/versions/main/skylark/lib/attr.html.
message AttributeDefinition {
required string name = 1; // e.g. "name", "srcs"
required Attribute.Discriminator type = 2;
diff --git a/src/main/protobuf/failure_details.proto b/src/main/protobuf/failure_details.proto
index 468f8bdaaaad89..94fcdccc5fbb02 100644
--- a/src/main/protobuf/failure_details.proto
+++ b/src/main/protobuf/failure_details.proto
@@ -444,7 +444,7 @@ message Workspaces {
WORKSPACES_LOG_WRITE_FAILURE = 2 [(metadata) = { exit_code: 36 }];
// See `managed_directories` in
- // https://docs.bazel.build/versions/master/skylark/lib/globals.html#workspace.
+ // https://docs.bazel.build/versions/main/skylark/lib/globals.html#workspace.
ILLEGAL_WORKSPACE_FILE_SYMLINK_WITH_MANAGED_DIRECTORIES = 3
[(metadata) = { exit_code: 1 }];
WORKSPACE_FILE_READ_FAILURE_WITH_MANAGED_DIRECTORIES = 4
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidPlatformsTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidPlatformsTest.java
index 69da213fcdec8b..148abdab95c281 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidPlatformsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidPlatformsTest.java
@@ -27,7 +27,7 @@
/**
* Tests Android support for Blaze's platforms API
- * (https://docs.bazel.build/versions/master/platforms-intro.html).
+ * (https://docs.bazel.build/versions/main/platforms-intro.html).
*
*
This only provides the first-level of testing: that --platforms
settings directly
* impact toolchain selection in expected ways. Devs can lean on this test for quick interactive
diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl
index 5a1147e283c8dd..e13775507b0b95 100644
--- a/tools/build_defs/repo/utils.bzl
+++ b/tools/build_defs/repo/utils.bzl
@@ -187,7 +187,7 @@ def maybe(repo_rule, name, **kwargs):
"""Utility function for only adding a repository if it's not already present.
This is to implement safe repositories.bzl macro documented in
- https://docs.bazel.build/versions/master/skylark/deploying.html#dependencies.
+ https://docs.bazel.build/versions/main/skylark/deploying.html#dependencies.
Args:
repo_rule: repository rule function.
diff --git a/tools/config/common_settings.bzl b/tools/config/common_settings.bzl
index 333ab29d4bae31..7720f546f7a4cd 100644
--- a/tools/config/common_settings.bzl
+++ b/tools/config/common_settings.bzl
@@ -22,7 +22,7 @@ These rules return a BuildSettingInfo with the value of the build setting.
For label-typed settings, use the native label_flag and label_setting rules.
More documentation on how to use build settings at
-https://docs.bazel.build/versions/master/skylark/config.html#user-defined-build-settings
+https://docs.bazel.build/versions/main/skylark/config.html#user-defined-build-settings
"""
BuildSettingInfo = provider(
diff --git a/tools/cpp/clang_installation_error.bat.tpl b/tools/cpp/clang_installation_error.bat.tpl
index bec44ebb07951d..e3a61a465e8c8f 100644
--- a/tools/cpp/clang_installation_error.bat.tpl
+++ b/tools/cpp/clang_installation_error.bat.tpl
@@ -18,7 +18,7 @@ echo. 1>&2
echo The target you are compiling requires the Clang compiler. 1>&2
echo Bazel couldn't find a valid Clang installation on your machine. 1>&2
%{clang_error_message}
-echo Please check your installation following https://docs.bazel.build/versions/master/windows.html#using 1>&2
+echo Please check your installation following https://docs.bazel.build/versions/main/windows.html#using 1>&2
echo. 1>&2
exit /b 1
diff --git a/tools/cpp/vc_installation_error.bat.tpl b/tools/cpp/vc_installation_error.bat.tpl
index b7965856cc9221..9cdd658fceb51b 100644
--- a/tools/cpp/vc_installation_error.bat.tpl
+++ b/tools/cpp/vc_installation_error.bat.tpl
@@ -18,7 +18,7 @@ echo. 1>&2
echo The target you are compiling requires Visual C++ build tools. 1>&2
echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2
%{vc_error_message}
-echo Please check your installation following https://docs.bazel.build/versions/master/windows.html#using 1>&2
+echo Please check your installation following https://docs.bazel.build/versions/main/windows.html#using 1>&2
echo. 1>&2
exit /b 1
diff --git a/tools/ctexplain/ctexplain.py b/tools/ctexplain/ctexplain.py
index cb300a45cd9516..ceaf8b9cf07484 100644
--- a/tools/ctexplain/ctexplain.py
+++ b/tools/ctexplain/ctexplain.py
@@ -29,7 +29,7 @@
$ ctexplain -b "//mypkg:mybinary --define MY_FEATURE=1"
-Relevant terms in https://docs.bazel.build/versions/master/glossary.html:
+Relevant terms in https://docs.bazel.build/versions/main/glossary.html:
"target", "configuration", "analysis phase", "configured target",
"configuration trimming", "transition"