Skip to content

Commit 285973d

Browse files
authored
Do copy (#34)
* chore: remove work folder Improve awk script a bit to fix some syntax issues * delete broken comments * chore: fix comment syntax * chore: remove trailing whitespace
1 parent 6555665 commit 285973d

File tree

443 files changed

+15505
-52712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+15505
-52712
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
__pycache__/
44
.venv/
55
.hugo_build.lock
6+
node_modules

about/faq.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For our server code base, we use the following development workflow:
5656

5757
Bazel is a cornerstone of this philosophy: since Bazel requires all dependencies to be fully specified, we can predict which programs and tests are affected by a change, and vet them before submission.
5858

59-
More background on the development process at Google can be found on the [eng tools blog](http://google-engtools.blogspot.com/){: .external}.
59+
More background on the development process at Google can be found on the [eng tools blog](http://google-engtools.blogspot.com/).
6060

6161
## Why did you open up Bazel?
6262

@@ -70,8 +70,8 @@ Building software should be fun and easy. Slow and unpredictable builds take the
7070

7171
## Can I see examples?
7272

73-
Yes; see a [simple example](https://github.com/bazelbuild/bazel/blob/master/examples/cpp/BUILD){: .external}
74-
or read the [Bazel source code](https://github.com/bazelbuild/bazel/blob/master/src/BUILD){: .external} for a more complex example.
73+
Yes; see a [simple example](https://github.com/bazelbuild/bazel/blob/master/examples/cpp/BUILD)
74+
or read the [Bazel source code](https://github.com/bazelbuild/bazel/blob/master/src/BUILD) for a more complex example.
7575

7676

7777
## What is Bazel best at?
@@ -127,7 +127,7 @@ Bazel has conventions for structuring more complex programs, for example, a Java
127127

128128
## Can I build Docker images with Bazel?
129129

130-
Yes, you can use our [Docker rules](https://github.com/bazelbuild/rules_docker){: .external} to build reproducible Docker images.
130+
Yes, you can use our [Docker rules](https://github.com/bazelbuild/rules_docker) to build reproducible Docker images.
131131

132132
## Will Bazel make my builds reproducible automatically?
133133

@@ -140,15 +140,15 @@ For Java and C++ binaries, yes, assuming you do not change the toolchain. If you
140140

141141
## Do you have binary releases?
142142

143-
Yes, you can find the latest [release binaries](https://github.com/bazelbuild/bazel/releases/latest){: .external} and review our [release policy](/release/)
143+
Yes, you can find the latest [release binaries](https://github.com/bazelbuild/bazel/releases/latest) and review our [release policy](/release/)
144144

145145
## I use Eclipse/IntelliJ/XCode. How does Bazel interoperate with IDEs?
146146

147147
For IntelliJ, check out the [IntelliJ with Bazel plugin](https://ij.bazel.build/).
148148

149149
For XCode, check out [Tulsi](http://tulsi.bazel.build/).
150150

151-
For Eclipse, check out [E4B plugin](https://github.com/bazelbuild/e4b){: .external}.
151+
For Eclipse, check out [E4B plugin](https://github.com/bazelbuild/e4b).
152152

153153
For other IDEs, check out the [blog post](https://blog.bazel.build/2016/06/10/ide-support.html) on how these plugins work.
154154

@@ -164,7 +164,7 @@ See our [Roadmaps](/about/roadmap).
164164

165165
## Can I use Bazel for my INSERT LANGUAGE HERE project?
166166

167-
Bazel is extensible. Anyone can add support for new languages. Many languages are supported: see the [build encyclopedia](/reference/be/overview) for a list of recommendations and [awesomebazel.com](https://awesomebazel.com/){: .external} for a more comprehensive list.
167+
Bazel is extensible. Anyone can add support for new languages. Many languages are supported: see the [build encyclopedia](/reference/be/overview) for a list of recommendations and [awesomebazel.com](https://awesomebazel.com/) for a more comprehensive list.
168168

169169
If you would like to develop extensions or learn how they work, see the documentation for [extending Bazel](/extending/concepts).
170170

@@ -195,7 +195,7 @@ We are reachable at bazel-discuss@googlegroups.com.
195195

196196
## Where do I report bugs?
197197

198-
Open an issue [on GitHub](https://github.com/bazelbuild/bazel/issues){: .external}.
198+
Open an issue [on GitHub](https://github.com/bazelbuild/bazel/issues).
199199

200200
## What’s up with the word “Blaze” in the codebase?
201201

about/intro.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It uses a human-readable, high-level build language. Bazel supports projects in
1010
multiple languages and builds outputs for multiple platforms. Bazel supports
1111
large codebases across multiple repositories, and large numbers of users.
1212

13-
## Benefits {:#benefits}
13+
## Benefits
1414

1515
Bazel offers the following advantages:
1616

@@ -39,7 +39,7 @@ Bazel offers the following advantages:
3939
supported, and you can extend Bazel to support any other language or
4040
framework.
4141

42-
## Using Bazel {:#using-bazel}
42+
## Using Bazel
4343

4444
To build or test a project with Bazel, you typically do the following:
4545

@@ -54,7 +54,7 @@ To build or test a project with Bazel, you typically do the following:
5454

5555
You write your `BUILD` file by declaring build targets using
5656
[Starlark](/rules/language), a domain-specific language. (See example
57-
[here](https://github.com/bazelbuild/bazel/blob/master/examples/cpp/BUILD){: .external}.)
57+
[here](https://github.com/bazelbuild/bazel/blob/master/examples/cpp/BUILD).)
5858

5959
A build target specifies a set of input artifacts that Bazel will build plus
6060
their dependencies, the build rule Bazel will use to build it, and options
@@ -72,7 +72,7 @@ In addition to building, you can also use Bazel to run
7272
[tests](/reference/test-encyclopedia) and [query](/query/guide) the build
7373
to trace dependencies in your code.
7474

75-
## Bazel build process {:#bazel-build-process}
75+
## Bazel build process
7676

7777
When running a build or a test, Bazel does the following:
7878

@@ -92,7 +92,7 @@ correctness, you can set up Bazel to run builds and tests
9292
[hermetically](/basics/hermeticity) through sandboxing, minimizing skew
9393
and maximizing [reproducibility](/run/build#correct-incremental-rebuilds).
9494

95-
### Action graph {:#action-graph}
95+
### Action graph
9696

9797
The action graph represents the build artifacts, the relationships between them,
9898
and the build actions that Bazel will perform. Thanks to this graph, Bazel can
@@ -101,7 +101,7 @@ file content as well as changes to actions, such as build or test commands, and
101101
know what build work has previously been done. The graph also enables you to
102102
easily [trace dependencies](/query/guide) in your code.
103103

104-
## Getting started tutorials {:#getting-started-tutorials}
104+
## Getting started tutorials
105105

106106
To get started with Bazel, see [Getting Started](/start/) or jump
107107
directly to the Bazel tutorials:

about/vision.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Bazel's abstraction layer — instructions specific to languages, platforms, and
4646
toolchains implemented in a simple extensibility language — allows it to be
4747
easily applied to any context.
4848

49-
## Bazel core competencies {:#bazel-core-competencies}
49+
## Bazel core competencies
5050

5151
1. Bazel supports **multi-language, multi-platform** builds and tests. You can
5252
run a single command to build and test your entire source tree, no matter
@@ -63,7 +63,7 @@ easily applied to any context.
6363
possible. Bazel interfaces with de-facto standard tools for a given
6464
language/platform.
6565

66-
## Serving language communities {:#language-communities}
66+
## Serving language communities
6767

6868
Software engineering evolves in the context of language communities — typically,
6969
self-organizing groups of people who use common tools and practices.
@@ -74,7 +74,7 @@ available that integrate with the workflows and conventions of that community.
7474
Bazel is committed to be extensible and open, and to support good rulesets for
7575
any language.
7676

77-
### Requirements of a good ruleset {:#ruleset-requirements}
77+
### Requirements of a good ruleset
7878

7979
1. The rules need to support efficient **building and testing** for the
8080
language, including code coverage.

about/why.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build tool with [integrated testing](#integrated-testing) that supports multiple
1010
[languages](#multi-language), [repositories](#multi-repository), and
1111
[platforms](#multi-platform) in an industry-leading [ecosystem](#ecosystem).
1212

13-
## Bazel is fast {:#fast}
13+
## Bazel is fast
1414

1515
Bazel knows exactly what input files each build command needs, avoiding
1616
unnecessary work by re-running only when the set of input files have
@@ -23,7 +23,7 @@ This is supported by multiple caching layers, in memory, on disk and on the
2323
remote build farm, if available. At Google, we routinely achieve cache hit rates
2424
north of 99%.
2525

26-
## Bazel is correct {:#correct}
26+
## Bazel is correct
2727

2828
Bazel ensures that your binaries are built *only* from your own
2929
source code. Bazel actions run in individual sandboxes and Bazel tracks
@@ -35,7 +35,7 @@ by bit.
3535
Say goodbye to endless `make clean` invocations and to chasing phantom bugs
3636
that were in fact resolved in source code that never got built.
3737

38-
## Bazel is extensible {:#extensible}
38+
## Bazel is extensible
3939

4040
Harness the full power of Bazel by writing your own rules and macros to
4141
customize Bazel for your specific needs across a wide range of projects.
@@ -45,7 +45,7 @@ in-house programming language that's a subset of Python. Starlark makes
4545
rule-writing accessible to most developers, while also creating rules that can
4646
be used across the ecosystem.
4747

48-
## Integrated testing {:#integrated-testing}
48+
## Integrated testing
4949

5050
Bazel's [integrated test runner](/docs/user-manual#running-tests)
5151
knows and runs only those tests needing to be re-run, using remote execution
@@ -56,28 +56,28 @@ Bazel [provides facilities](/remote/bep) to upload test results to a central
5656
location, thereby facilitating efficient communication of test outcomes, be it
5757
on CI or by individual developers.
5858

59-
## Multi-language support {:#multi-language}
59+
## Multi-language support
6060

6161
Bazel supports many common programming languages including C++, Java,
6262
Kotlin, Python, Go, and Rust. You can build multiple binaries (for example,
6363
backend, web UI and mobile app) in the same Bazel invocation without being
6464
constrained to one language's idiomatic build tool.
6565

66-
## Multi-repository support {:#multi-repository}
66+
## Multi-repository support
6767

6868
Bazel can [gather source code from multiple locations](/external/overview): you
6969
don't need to vendor your dependencies (but you can!), you can instead point
7070
Bazel to the location of your source code or prebuilt artifacts (e.g. a git
7171
repository or Maven Central), and it takes care of the rest.
7272

73-
## Multi-platform support {:#multi-platform}
73+
## Multi-platform support
7474

7575
Bazel can simultaneously build projects for multiple platforms including Linux,
7676
macOS, Windows, and Android. It also provides powerful
7777
[cross-compilation capabilities](/extending/platforms) to build code for one
7878
platform while running the build on another.
7979

80-
## Wide ecosystem {:#ecosystem}
80+
## Wide ecosystem
8181

8282
[Industry leaders](/community/users) love Bazel, building a large
8383
community of developers who use and contribute to Bazel. Find a tools, services

advanced/performance/build-performance-metrics.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ how you can use these metrics to detect and fix build performance issues.
2424

2525
There are a few main ways to extract metrics from your Bazel builds, namely:
2626

27-
## Build Event Protocol (BEP) {:#build-event-protocol}
27+
## Build Event Protocol (BEP)
2828

2929
Bazel outputs a variety of protocol buffers
3030
[`build_event_stream.proto`](https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto)
@@ -33,7 +33,7 @@ can be aggregated by a backend specified by you. Depending on your use cases,
3333
you might decide to aggregate the metrics in various ways, but here we will go
3434
over some concepts and proto fields that would be useful in general to consider.
3535

36-
## Bazel’s query / cquery / aquery commands {:#bazel-commands-query-cquery-aquery}
36+
## Bazel’s query / cquery / aquery commands
3737

3838
Bazel provides 3 different query modes ([query](/query/quickstart),
3939
[cquery](/query/cquery) and [aquery](/query/aquery)) that allow users
@@ -42,14 +42,14 @@ respectively. The query language provides a
4242
[suite of functions](/query/language#functions) usable across the different
4343
query modes, that allows you to customize your queries according to your needs.
4444

45-
## JSON Trace Profiles {:#json-trace-profiles}
45+
## JSON Trace Profiles
4646

4747
For every build-like Bazel invocation, Bazel writes a trace profile in JSON
4848
format. The [JSON trace profile](/advanced/performance/json-trace-profile) can
4949
be very useful to quickly understand what Bazel spent time on during the
5050
invocation.
5151

52-
## Execution Log {:#execution-log}
52+
## Execution Log
5353

5454
The [execution log](/remote/cache-remote) can help you to troubleshoot and fix
5555
missing remote cache hits due to machine and environment differences or
@@ -61,7 +61,7 @@ make comparisons between local and remote machine performance or to find out
6161
which part of the spawn execution is consistently slower than expected (for
6262
example due to queuing).
6363

64-
## Execution Graph Log {:#execution-graph-log}
64+
## Execution Graph Log
6565

6666
While the JSON trace profile contains the critical path information, sometimes
6767
you need additional information on the dependency graph of the executed actions.
@@ -77,7 +77,7 @@ by removing a particular node from the execution graph.
7777
The data helps you predict the impact of changes to the build and action graph
7878
before you actually do them.
7979

80-
## Benchmarking with bazel-bench {:#bazel-bench}
80+
## Benchmarking with bazel-bench
8181

8282
[Bazel bench](https://github.com/bazelbuild/bazel-bench) is a
8383
benchmarking tool for Git projects to benchmark build performance in the

advanced/performance/iteration-speed.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: 'Optimize Iteration Speed'
99
This page describes how to optimize Bazel's build performance when running Bazel
1010
repeatedly.
1111

12-
## Bazel's Runtime State {:#bazel-runtime-state}
12+
## Bazel's Runtime State
1313

1414
A Bazel invocation involves several interacting parts.
1515

@@ -34,7 +34,7 @@ A Bazel invocation involves several interacting parts.
3434

3535
* The result of the Bazel invocation is made available in the output tree.
3636

37-
## Running Bazel Iteratively {:#run-iteratively}
37+
## Running Bazel Iteratively
3838

3939
In a typical developer workflow, it is common to build (or run) a piece of code
4040
repeatedly, often at a very high frequency (e.g. to resolve some compilation
@@ -66,7 +66,7 @@ cache can be kept locally
6666
[remotely](https://bazel.build/remote/caching). The cache can be shared among
6767
Bazel servers, and indeed among developers.
6868

69-
## Avoid discarding the analysis cache {:#avoid-discarding-cache}
69+
## Avoid discarding the analysis cache
7070

7171
Bazel will print a warning if either the analysis cache was discarded or the
7272
server was restarted. Either of these should be avoided during iterative use:

advanced/performance/json-trace-profile.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ You can use these keyboard controls to navigate:
5454
### Bazel Invocation Analyzer
5555

5656
The open-source
57-
[Bazel Invocation Analyzer](https://github.com/EngFlow/bazel_invocation_analyzer){: .external}
57+
[Bazel Invocation Analyzer](https://github.com/EngFlow/bazel_invocation_analyzer)
5858
consumes a profile format and prints suggestions on how to improve
5959
the build’s performance. This analysis can be performed using its CLI or on
60-
[https://analyzer.engflow.com](https://analyzer.engflow.com){: .external}.
60+
[https://analyzer.engflow.com](https://analyzer.engflow.com).
6161

6262
### `jq`
6363

@@ -77,7 +77,7 @@ $ zcat $(../bazel-6.0.0rc1-linux-x86_64 info output_base)/command.profile.gz | j
7777
[...]
7878
```
7979

80-
## Profile information {:#profile-information}
80+
## Profile information
8181

8282
The profile contains multiple rows. Usually the bulk of rows represent Bazel
8383
threads and their corresponding events, but some special rows are also included.
@@ -100,7 +100,7 @@ Figure 1 shows a profile created with Bazel v5.3.1 and includes these rows:
100100
* `Garbage Collector`: Displays minor and major Garbage Collection (GC)
101101
pauses.
102102

103-
## Common performance issues {:#common-performance-issues}
103+
## Common performance issues
104104

105105
When analyzing performance profiles, look for:
106106

@@ -118,7 +118,7 @@ When analyzing performance profiles, look for:
118118
or Bazel itself to introduce more parallelism. This can also happen when
119119
there is an unusual amount of GC.
120120

121-
## Profile file format {:#profile-file-format}
121+
## Profile file format
122122

123123
The top-level object contains metadata (`otherData`) and the actual tracing data
124124
(`traceEvents`). The metadata contains extra info, for example the invocation ID
@@ -157,4 +157,4 @@ each other; pass
157157
if you would like to prevent event merging.
158158

159159
See also the
160-
[Chrome Trace Event Format Specification](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview){: .external}.
160+
[Chrome Trace Event Format Specification](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview).

advanced/performance/memory.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ title: 'Optimize Memory'
88

99
This page describes how to limit and reduce the memory Bazel uses.
1010

11-
## Running Bazel with Limited RAM {:#running-bazel}
11+
## Running Bazel with Limited RAM
1212

1313
In certain situations, you may want Bazel to use minimal memory. You can set the
1414
maximum heap via the startup flag
1515
[`--host_jvm_args`](/docs/user-manual#host-jvm-args),
1616
like `--host_jvm_args=-Xmx2g`.
1717

18-
### Trade incremental build speeds for memory {:#trade-incremental}
18+
### Trade incremental build speeds for memory
1919

2020
If your builds are too big, Bazel may throw an `OutOfMemoryError` (OOM) when
2121
it doesn't have enough memory. You can make Bazel use less memory, at the cost
@@ -42,7 +42,7 @@ prevent most re-execution).
4242
incremental builds have to build from scratch (except for the on-disk action
4343
cache). Alone, it does not affect the high-water mark of the current build.
4444

45-
### Trade build flexibility for memory with Skyfocus (Experimental) {:#trade-flexibility}
45+
### Trade build flexibility for memory with Skyfocus (Experimental)
4646

4747
If you want to make Bazel use less memory *and* retain incremental build speeds,
4848
you can tell Bazel the working set of files that you will be modifying, and
@@ -91,7 +91,7 @@ and incremental builds to handle changes to files under `dir1`, `dir2`, and
9191
`dir3/subdir` will retain their fast speeds, with the tradeoff that Bazel cannot
9292
rebuild changed files outside of these directories.
9393

94-
## Memory Profiling {:#memory-profiling}
94+
## Memory Profiling
9595

9696
Bazel comes with a built-in memory profiler that can help you check your rule’s
9797
memory use. Read more about this process on the

0 commit comments

Comments
 (0)