Skip to content

Commit

Permalink
Bazel DocGen (3/3): Update links in code comments.
Browse files Browse the repository at this point in the history
This change uses the improved linking mechanism from unknown commit.

PiperOrigin-RevId: 433174774
  • Loading branch information
fweikert authored and Copybara-Service committed Mar 8, 2022
1 parent ad37a37 commit 2ee79b8
Show file tree
Hide file tree
Showing 78 changed files with 347 additions and 366 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
/**
* Holds information about the Bazel rule that created a certain jar.
*
* <p>Rules that use Aspects (http://www.bazel.build/docs/skylark/aspects.html) to compile jars will
* result in 'aspect()' being populated.
* <p>Rules that use Aspects (http://bazel.build/rules/aspects) to compile jars will result in
* 'aspect()' being populated.
*/
@AutoValue
public abstract class JarOwner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

/**
* A container class for groups of {@link ExecGroup} instances. This correctly handles exec group
* inheritance between rules and targets. See
* https://docs.bazel.build/versions/main/exec-groups.html for further details.
* inheritance between rules and targets. See https://bazel.build/reference/exec-groups for further
* details.
*/
@AutoValue
public abstract class ExecGroupCollection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ public static RunfilesSupport withExecutable(
/**
* Creates and returns a {@link RunfilesSupport} object for the given rule and executable. This
* version discards all arguments. Only use this for <a
* href="https://docs.bazel.build/versions/main/platforms.html#skipping-incompatible-targets">Incompatible
* Target Skipping</a>.
* href="https://bazel.build/docs/platforms#skipping-incompatible-targets">Incompatible Target
* Skipping</a>.
*/
public static RunfilesSupport withExecutableButNoArgs(
RuleContext ruleContext, Runfiles runfiles, Artifact executable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ static ImmutableMap<String, BuildOptions> applyAndValidate(
*
* <p>Transitions can also explicitly set --platforms to be clear what platform they set.
*
* <p>Platform mappings:
* https://docs.bazel.build/versions/main/platforms-intro.html#platform-mappings.
* <p>Platform mappings: https://bazel.build/concepts/platform-intro#platform-mappings.
*
* <p>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
Expand All @@ -157,7 +156,7 @@ private static void checkForDenylistedOptions(StarlarkDefinedConfigTransition tr
if (transition.getOutputs().contains("//command_line_option:define")) {
throw new ValidationException(
"Starlark transition on --define not supported - try using build settings"
+ " (https://docs.bazel.build/skylark/config.html#user-defined-build-settings).");
+ " (https://bazel.build/rules/config#user-defined-build-settings).");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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://docs.bazel.build/versions/main/skylark/rules.html#configurations "
+ "https://bazel.build/rules/rules#configurations "
+ "for more details.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void addRepoNameUsage(String repoName, String how, Location where) throw
"A list of already-defined execution platforms to be registered when this module is"
+ " selected. Should be a list of absolute target patterns (ie. beginning with"
+ " either <code>@</code> or <code>//</code>). See <a"
+ " href=\"../../toolchains.html\">toolchain resolution</a> for more"
+ " href=\"${link toolchains}\">toolchain resolution</a> for more"
+ " information.",
named = true,
positional = false,
Expand All @@ -140,7 +140,7 @@ private void addRepoNameUsage(String repoName, String how, Location where) throw
"A list of already-defined toolchains to be registered when this module is"
+ " selected. Should be a list of absolute target patterns (ie. beginning with"
+ " either <code>@</code> or <code>//</code>). See <a"
+ " href=\"../../toolchains.html\">toolchain resolution</a> for more"
+ " href=\"${link toolchains}\">toolchain resolution</a> for more"
+ " information.",
named = true,
positional = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Metadata getMetadata() {
<code>WORKSPACE</code> file.
<p>
For more information, read the <a href="https://docs.bazel.build/versions/main/android-ndk.html">
For more information, read the <a href="https://bazel.build/docs/android-ndk">
full documentation on using Android NDK with Bazel</a>.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
<code>runfiles</code> of this <code>filegroup</code> rule. When the
<code>filegroup</code> is referenced in the <code>data</code> attribute of
another rule its <code>runfiles</code> will be added to the <code>runfiles</code>
of the depending rule. See the <a href="../build-ref.html#data">data dependencies</a>
of the depending rule. See the <a href="${link build-ref#data}">data dependencies</a>
section and <a href="${link common-definitions#common.data}">general documentation of
<code>data</code></a> for more information about how to depend on and use data files.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
<ul>
<li>
<code>stamp = 1</code>: Always stamp the build information into the binary, even in
<a href="../user-manual.html#flag--stamp"><code>--nostamp</code></a> builds. <b>This
<a href="${link user-manual#flag--stamp}"><code>--nostamp</code></a> builds. <b>This
setting should be avoided</b>, since it potentially kills remote caching for the
binary and any downstream actions that depend on it.
</li>
Expand All @@ -567,7 +567,7 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
</li>
<li>
<code>stamp = -1</code>: Embedding of build information is controlled by the
<a href="../user-manual.html#flag--stamp"><code>--[no]stamp</code></a> flag.
<a href="${link user-manual#flag--stamp}"><code>--[no]stamp</code></a> flag.
</li>
</ul>
<p>Stamped binaries are <em>not</em> rebuilt unless their dependencies change.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ the build and on the host architecture (the two may be different). If you need a
<h4>Cross-compilation Considerations</h4>
<p>
<em>See <a href="../user-manual.html#configurations">the user manual</a> for more info about
<em>See <a href="${link user-manual#configurations}">the user manual</a> for more info about
cross-compilation.</em>
</p>
<p>
Expand Down Expand Up @@ -120,7 +120,7 @@ and the target configuration to describe the machine(s) on which the output of t
host configuration, because that's where the compiler will run in the other genrule. In this case,
the build system does the right thing automatically: it builds the <code>srcs</code> and
<code>outs</code> of the first genrule for the host configuration instead of the target
configuration. See <a href="../user-manual.html#configurations">the user manual</a> for more
configuration. See <a href="${link user-manual#configurations}">the user manual</a> for more
info.
</p>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public Object getDefault(AttributeMap rule) {
<ul>
<li>
<code>stamp = 1</code>: Always stamp the build information into the binary, even in
<a href="../user-manual.html#flag--stamp"><code>--nostamp</code></a> builds. <b>This
<a href="${link user-manual#flag--stamp}"><code>--nostamp</code></a> builds. <b>This
setting should be avoided</b>, since it potentially kills remote caching for the
binary and any downstream actions that depend on it.
</li>
Expand All @@ -380,7 +380,7 @@ public Object getDefault(AttributeMap rule) {
</li>
<li>
<code>stamp = -1</code>: Embedding of build information is controlled by the
<a href="../user-manual.html#flag--stamp"><code>--[no]stamp</code></a> flag.
<a href="${link user-manual#flag--stamp}"><code>--[no]stamp</code></a> flag.
</li>
</ul>
<p>Stamped binaries are <em>not</em> rebuilt unless their dependencies change.</p>
Expand All @@ -397,7 +397,7 @@ public Object getDefault(AttributeMap rule) {
<p>By default, Bazel will use the normal JDK launcher (bin/java or java.exe).</p>
<p>The related <a href="../user-manual.html#flag--java_launcher"><code>
<p>The related <a href="${link user-manual#flag--java_launcher}"><code>
--java_launcher</code></a> Bazel flag affects only those
<code>java_binary</code> and <code>java_test</code> targets that have
<i>not</i> specified a <code>launcher</code> attribute.</p>
Expand Down Expand Up @@ -433,7 +433,7 @@ <li>If you are using any other launcher, native (C++) dependencies are staticall
<p>If this attribute is set to false, the
<a href="${link java_binary.launcher}">launcher</a> attribute and the related
<a href="../user-manual.html#flag--java_launcher"><code>--java_launcher</code></a> flag
<a href="${link user-manual#flag--java_launcher}"><code>--java_launcher</code></a> flag
will be ignored for this target.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("use_launcher", BOOLEAN).value(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ responsible for creating (possibly empty) __init__.py files and adding them to t
<ul>
<li>
<code>stamp = 1</code>: Always stamp the build information into the binary, even in
<a href="../user-manual.html#flag--stamp"><code>--nostamp</code></a> builds. <b>This
<a href="${link user-manual#flag--stamp}"><code>--nostamp</code></a> builds. <b>This
setting should be avoided</b>, since it potentially kills remote caching for the
binary and any downstream actions that depend on it.
</li>
Expand All @@ -221,7 +221,7 @@ responsible for creating (possibly empty) __init__.py files and adding them to t
</li>
<li>
<code>stamp = -1</code>: Embedding of build information is controlled by the
<a href="../user-manual.html#flag--stamp"><code>--[no]stamp</code></a> flag.
<a href="${link user-manual#flag--stamp}"><code>--[no]stamp</code></a> flag.
</li>
</ul>
<p>Stamped binaries are <em>not</em> rebuilt unless their dependencies change.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/main/be/python.html#py_binary.srcs_version";
return "https://bazel.build/reference/be/python#py_binary.srcs_version";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"<p>A specialized data structure that supports efficient merge operations and has a"
+ " defined traversal order. Commonly used for accumulating data from transitive"
+ " dependencies in rules and aspects. For more information see <a"
+ " href=\"../depsets.md\">here</a>."
+ " href=\"/rules/depsets\">here</a>."
+ " <p>The elements of a depset must be hashable and all of the same type (as"
+ " defined by the built-in type(x) function), but depsets are not simply"
+ " hash sets and do not support fast membership tests."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private static String noMatchError(
error +=
"\n"
+ "For more help, see"
+ " https://docs.bazel.build/configurable-attributes.html#why-doesnt-my-select-choose-what-i-expect.\n\n";
+ " https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.\n\n";
return error;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ private static final class CommonLibrary {
name = "depset",
doc =
"Creates a <a href=\"depset.html\">depset</a>. The <code>direct</code> parameter is a"
+ " list of direct elements of the depset, and <code>transitive</code> parameter"
+ " is a list of depsets whose elements become indirect elements of the created"
+ " list of direct elements of the depset, and <code>transitive</code> parameter is"
+ " a list of depsets whose elements become indirect elements of the created"
+ " depset. The order in which elements are returned when the depset is converted"
+ " to a list is specified by the <code>order</code> parameter. See the <a"
+ " href=\"../depsets.md\">Depsets overview</a> for more information.\n" //
+ " href=\"https://bazel.build/rules/depsets\">Depsets overview</a> for more"
+ " information.\n" //
+ "<p>All"
+ " elements (direct and indirect) of a depset must be of the same type, as"
+ " obtained by the expression <code>type(x)</code>.\n" //
Expand Down Expand Up @@ -322,18 +323,18 @@ public Depset depset(
name = "select",
doc =
"<code>select()</code> is the helper function that makes a rule attribute "
+ "<a href=\"$BE_ROOT/common-definitions.html#configurable-attributes\">"
+ "<a href=\"${link common-definitions#configurable-attributes}\">"
+ "configurable</a>. See "
+ "<a href=\"$BE_ROOT/functions.html#select\">build encyclopedia</a> for details.",
+ "<a href=\"${link functions#select}\">build encyclopedia</a> for details.",
parameters = {
@Param(
name = "x",
positional = true,
doc =
"A dict that maps configuration conditions to values. Each key is a "
+ "<a href=\"$BE_ROOT/../skylark/lib/Label.html\">Label</a> or a label string"
+ "<a href=\"Label.html\">Label</a> or a label string"
+ " that identifies a config_setting or constraint_value instance. See the"
+ " <a href=\"$BE_ROOT/../skylark/macros.html#label-resolution-in-macros\">"
+ " <a href=\"$STARLARK_DOCS_ROOT/macros.html#label-resolution-in-macros\">"
+ "documentation on macros</a> for when to use a Label instead of a string."),
@Param(
name = "no_match_error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/main/query.html#sky-query for details and"
+ " https://bazel.build/versions/reference/query#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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ <T> QueryTaskCallable<Void> getConfiguredTargetsForConfigFunction(
+ "A short ID is any prefix of a full ID. cquery shows short IDs. 'bazel "
+ "config' shows full IDs.\n"
+ "\n"
+ "For more help, see https://docs.bazel.build/cquery.html.",
+ "For more help, see https://bazel.build/docs/cquery.",
ConfigurableQuery.Code.INCORRECT_CONFIG_ARGUMENT_ERROR);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Remote caching and execution with Bazel

The documentation has been moved to https://docs.bazel.build/versions/main/remote-caching.html.
The documentation has been moved to https://bazel.build/docs/remote-caching.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,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/main/remote-caching.html")
+ "TLS. See https://dbaze.build/docs/remote-caching")
public String remoteCache;

@Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Metadata getMetadata() {
</p>
<p>
See the <a href="../toolchains.html">Toolchains</a> page for more details.
See the <a href="${link toolchains}">Toolchains</a> page for more details.
</p>
<h4 id="toolchain_type_examples">Example</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public RuleClass build(RuleClass.Builder builder, final RuleDefinitionEnvironmen
implementations of Parcelable), otherwise use <code>idl_srcs</code> for
Android IDL definitions that need to be translated to Java interfaces and
use <code>idl_parcelable</code>
for non-preprcessed AIDL files.
for non-preprocessed AIDL files.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public RuleClass build(RuleClass.Builder builder, final RuleDefinitionEnvironmen
<code>res</code> directory.
<br/>
Generated files (from genrules) can be referenced by
<a href="../build-ref.html#labels">Label</a> here as well. The only restriction is that
<a href="${link build-ref#labels}">Label</a> here as well. The only restriction is that
the generated outputs must be under the same "<code>res</code>" directory as any other
resource files that are included.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
Expand Down Expand Up @@ -591,7 +591,7 @@ removed from the APK. This is only supported for rules using local resources (i.
<li><code>shrink_resources = 1</code>: Turns on Android resource shrinking</li>
<li><code>shrink_resources = 0</code>: Turns off Android resource shrinking</li>
<li><code>shrink_resources = -1</code>: Shrinking is controlled by the
<a href="../user-manual.html#flag--android_resource_shrinking">
<a href="${link user-manual#flag--android_resource_shrinking}">
--android_resource_shrinking</a> flag.</li>
</ul>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
Expand Down
Loading

0 comments on commit 2ee79b8

Please sign in to comment.