Skip to content

Commit

Permalink
[blaze-core-fixit] Update Bazel docs and examples links to main or HEAD.
Browse files Browse the repository at this point in the history
RELNOTES: None
PiperOrigin-RevId: 379499545
  • Loading branch information
aiuto authored and Copybara-Service committed Jun 15, 2021
1 parent 81b3561 commit 4e9a77e
Show file tree
Hide file tree
Showing 36 changed files with 104 additions and 104 deletions.
28 changes: 14 additions & 14 deletions CODEBASE.md
Expand Up @@ -90,7 +90,7 @@ from the client are handled by `GrpcServerImpl.run()`.

Bazel creates a somewhat complicated set of directories during a build. A full
description is available
[here](https://docs.bazel.build/versions/master/output_directories.html).
[here](https://docs.bazel.build/versions/main/output_directories.html).

The "workspace" is the source tree Bazel is run in. It usually corresponds to
something you checked out from source control.
Expand Down Expand Up @@ -194,7 +194,7 @@ Bazel learns about option classes in the following ways:
3. From `ConfiguredRuleClassProvider` (these are command line options related
to individual programming languages)
4. Starlark rules can also define their own options (see
[here](https://docs.bazel.build/versions/master/skylark/config.html))
[here](https://docs.bazel.build/versions/main/skylark/config.html))

Each option (excluding Starlark-defined options) is a member variable of a
`FragmentOptions` subclass that has the `@Option` annotation, which specifies
Expand All @@ -212,7 +212,7 @@ Bazel is in the business of building software, which happens by reading and
interpreting the source code. The totality of the source code Bazel operates on
is called "the workspace" and it is structured into repositories, packages and
rules. A description of these concepts for the users of Bazel is available
[here](https://docs.bazel.build/versions/master/build-ref.html).
[here](https://docs.bazel.build/versions/main/build-ref.html).

### Repositories

Expand Down Expand Up @@ -428,10 +428,10 @@ Starlark is used in four contexts:

The dialects available for BUILD and .bzl files are slightly different because
they express different things. A list of differences is available
[here](https://docs.bazel.build/versions/master/skylark/language.html#differences-between-build-and-bzl-files).
[here](https://docs.bazel.build/versions/main/skylark/language.html#differences-between-build-and-bzl-files).

More information about Starlark is available
[here](https://docs.bazel.build/versions/master/skylark/language.html).
[here](https://docs.bazel.build/versions/main/skylark/language.html).

## The loading/analysis phase

Expand Down Expand Up @@ -535,7 +535,7 @@ If a configuration transition results in multiple configurations, it's called a
_split transition._

Configuration transitions can also be implemented in Starlark (documentation
[here](https://docs.bazel.build/versions/master/skylark/config.html))
[here](https://docs.bazel.build/versions/main/skylark/config.html))

### Transitive info providers

Expand Down Expand Up @@ -634,7 +634,7 @@ necessitates the following additional components:

Aspects are a way to "propagate computation down the dependency graph". They are
described for users of Bazel
[here](https://docs.bazel.build/versions/master/skylark/aspects.html). A good
[here](https://docs.bazel.build/versions/main/skylark/aspects.html). A good
motivating example is protocol buffers: a `proto_library` rule should not know
about any particular language, but building the implementation of a protocol
buffer message (the “basic unit” of protocol buffers) in any programming
Expand Down Expand Up @@ -685,7 +685,7 @@ Bazel supports multi-platform builds, that is, builds where there may be
multiple architectures where build actions run and multiple architectures for
which code is built. These architectures are referred to as _platforms_ in Bazel
parlance (full documentation
[here](https://docs.bazel.build/versions/master/platforms.html))
[here](https://docs.bazel.build/versions/main/platforms.html))

A platform is described by a key-value mapping from _constraint settings_ (e.g.
the concept of "CPU architecture") to _constraint values_ (e.g. a particular CPU
Expand All @@ -698,7 +698,7 @@ different compilers; for example, a particular C++ toolchain may run on a
specific OS and be able to target some other OSes. Bazel must determine the C++
compiler that is used based on the set execution and target platform
(documentation for toolchains
[here](https://docs.bazel.build/versions/master/toolchains.html)).
[here](https://docs.bazel.build/versions/main/toolchains.html)).

In order to do this, toolchains are annotated with the set of execution and
target platform constraints they support. In order to do this, the definition of
Expand Down Expand Up @@ -835,7 +835,7 @@ _will_ come to depend on all parts of your code).
Bazel supports this by the mechanism called _visibility: _you can declare that a
particular rule can only be depended on using the visibility attribute
(documentation
[here](https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes)).
[here](https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes)).
This attribute is a little special because unlike every other attribute, the set
of dependencies it generates is not simply the set of labels listed (yes, this
is a design flaw).
Expand Down Expand Up @@ -1090,7 +1090,7 @@ inputs reflects the result of input discovery and pruning done before.

Starlark actions can make use of the facility to declare some inputs as unused
using the `unused_inputs_list=` argument of
<code>[ctx.actions.run()](https://docs.bazel.build/versions/master/skylark/lib/actions.html#run)</code>.
<code>[ctx.actions.run()](https://docs.bazel.build/versions/main/skylark/lib/actions.html#run)</code>.

### Various ways to run actions: Strategies/ActionContexts

Expand Down Expand Up @@ -1254,7 +1254,7 @@ runs the test in the requested way.
Tests are run according to an elaborate protocol that uses environment variables
to tell tests what's expected from them. A detailed description of what Bazel
expects from tests and what tests can expect from Bazel is available
[here](https://docs.bazel.build/versions/master/test-encyclopedia.html). At the
[here](https://docs.bazel.build/versions/main/test-encyclopedia.html). At the
simplest, an exit code of 0 means success, anything else means failure.

In addition to the cache status file, each test process emits a number of other
Expand Down Expand Up @@ -1367,7 +1367,7 @@ attribute of the first test that is executed.
## The query engine

Bazel has a
[little language](https://docs.bazel.build/versions/master/query-how-to.html)
[little language](https://docs.bazel.build/versions/main/query-how-to.html)
used to ask it various things about various graphs. The following query kinds
are provided:

Expand Down Expand Up @@ -1425,7 +1425,7 @@ interested in. For example, the following things are represented as events:
* A test was run (`TestAttempt`, `TestSummary`)

Some of these events are represented outside of Bazel in the
[Build Event Protocol](https://docs.bazel.build/versions/master/build-event-protocol.html)
[Build Event Protocol](https://docs.bazel.build/versions/main/build-event-protocol.html)
(they are `BuildEvent`s). This allows not only `BlazeModule`s, but also things
outside the Bazel process to observe the build. They are accessible either as a
file that contains protocol messages or Bazel can connect to a server (called
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/documentation-sidebar/0/sidebar.html
Expand Up @@ -292,7 +292,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>
<li><a href="/versions/{{ current_version }}/skylark/faq.html">FAQ</a></li>
<li><a href="/versions/{{ current_version }}/skylark/language.html">Starlark language</a></li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/documentation-sidebar/1/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/documentation-sidebar/2/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/documentation-sidebar/3/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/documentation-sidebar/4/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/extending-sidebar/master/sidebar.html
Expand Up @@ -24,7 +24,7 @@ <h3>Writing Rules</h3>
<li><a href="/versions/{{ current_version }}/rules.html">Recommended & Native Rules</a></li>
<li><a href="/versions/{{ current_version }}/skylark/rules-tutorial.html">Writing Rules</a></li>
<li><a href="/versions/{{ current_version }}/skylark/windows_tips.html">Writing Rules on Windows</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Example rules</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Example rules</a></li>
<li><a href="/versions/{{ current_version }}/rule-challenges.html">Rules Challenges</a></li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion site/_includes/getting-started-sidebar/0/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/getting-started-sidebar/1/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/getting-started-sidebar/2/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/getting-started-sidebar/3/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion site/_includes/getting-started-sidebar/4/sidebar.html
Expand Up @@ -207,7 +207,7 @@ <h3>Extending Bazel</h3>
</ul>
</li>

<li><a href="https://github.com/bazelbuild/examples/tree/master/rules">Examples</a></li>
<li><a href="https://github.com/bazelbuild/examples/tree/HEAD/rules">Examples</a></li>
<li><a href="/versions/{{ current_version }}/skylark/lib/skylark-overview.html">Extensions API</a></li>

<li>
Expand Down
6 changes: 3 additions & 3 deletions site/docs/android-ndk.md
Expand Up @@ -104,7 +104,7 @@ ABI](#configuring-the-target-abi).
## Example setup

This example is available in the [Bazel examples
repository](https://github.com/bazelbuild/examples/tree/master/android/ndk).
repository](https://github.com/bazelbuild/examples/tree/HEAD/android/ndk).

In the `BUILD.bazel` file, three targets are defined with the `android_binary`,
`android_library`, and `cc_library` rules.
Expand Down Expand Up @@ -246,8 +246,8 @@ cc_library(
## Integration with platforms and toolchains

Bazel's configuration model is moving towards
[platforms](https://docs.bazel.build/versions/master/platforms.html) and
[toolchains](https://docs.bazel.build/versions/master/toolchains.html). If your
[platforms](https://docs.bazel.build/versions/main/platforms.html) and
[toolchains](https://docs.bazel.build/versions/main/toolchains.html). If your
build uses the `--platforms` flag to select for the architecture or operating system
to build for, you will need to pass the `--extra_toolchains` flag to Bazel in
order to use the NDK.
Expand Down
6 changes: 3 additions & 3 deletions site/docs/aquery.html
Expand Up @@ -317,7 +317,7 @@ <h4>Command options</h4>
<h3 id="aspect-on-aspect">Aspect-on-aspect</h3>

<p>
It is possible for <a href="https://docs.bazel.build/versions/master/skylark/aspects.html">Aspects</a>
It is possible for <a href="https://docs.bazel.build/versions/main/skylark/aspects.html">Aspects</a>
to be applied on top of each other. The aquery output of the action generated by these Aspects would
then include the <i>Aspect path</i>, which is the sequence of Aspects applied to the target which generated the action.
</p>
Expand Down Expand Up @@ -368,13 +368,13 @@ <h3 id="aspect-on-aspect">Aspect-on-aspect</h3>
<code>AspectClass</code> could be the name of the Aspect class (for native Aspects) or
<code>bzl_file%aspect_name</code> (for Starlark Aspects). <code>AspectDescriptor</code> are
sorted in topological order of the
<a href="https://docs.bazel.build/versions/master/skylark/aspects.html#aspect-basics">dependency graph</a>.
<a href="https://docs.bazel.build/versions/main/skylark/aspects.html#aspect-basics">dependency graph</a>.
</p>

<h3 id="linking-json-profile">Linking with the JSON profile</h3>
<p>
While aquery provides information about the actions being run in a build (why they're being run,
their inputs/outputs), the <a href="https://docs.bazel.build/versions/master/skylark/performance.html#performance-profiling">JSON profile</a>
their inputs/outputs), the <a href="https://docs.bazel.build/versions/main/skylark/performance.html#performance-profiling">JSON profile</a>
tells us the timing and duration of their execution.
It is possible to combine these 2 sets of information via a common denominator: an action's primary output.
</p>
Expand Down
8 changes: 4 additions & 4 deletions site/docs/configurable-attributes.md
Expand Up @@ -93,7 +93,7 @@ Certain attributes change the build parameters for all transitive dependencies
under a target. For example, `genrule`'s `tools` changes `--cpu` to the CPU of
the machine running Bazel (which, thanks to cross-compilation, may be different
than the CPU the target is built for). This is known as a
[configuration transition](https://docs.bazel.build/versions/master/glossary.html#transition).
[configuration transition](https://docs.bazel.build/versions/main/glossary.html#transition).

Given

Expand Down Expand Up @@ -212,7 +212,7 @@ config_setting(
)
```

Behavior is the same as for [built-in flags](#built-in-flags). See [here](https://github.com/bazelbuild/examples/tree/master/rules/starlark_configurations/select_on_build_setting)
Behavior is the same as for [built-in flags](#built-in-flags). See [here](https://github.com/bazelbuild/examples/tree/HEAD/rules/starlark_configurations/select_on_build_setting)
for a working example.

[`--define`](command-line-reference.html#flag--define)
Expand Down Expand Up @@ -634,10 +634,10 @@ this.

## <a name="query"></a>Bazel query and cquery
Bazel [`query`](query-how-to.html) operates over Bazel's
[loading phase](https://docs.bazel.build/versions/master/glossary.html#loading-phase).
[loading phase](https://docs.bazel.build/versions/main/glossary.html#loading-phase).
This means it doesn't know what command line flags a target uses since those
flags aren't evaluated until later in the build (in the
[analysis phase](https://docs.bazel.build/versions/master/glossary.html#analysis-phase)).
[analysis phase](https://docs.bazel.build/versions/main/glossary.html#analysis-phase)).
So it can't determine which `select()` branches are chosen.
Bazel [`cquery`](cquery.html) operates after Bazel's analysis phase, so it has
Expand Down

0 comments on commit 4e9a77e

Please sign in to comment.