Skip to content

Commit a39f152

Browse files
burn down broken files with new mdx transform tool
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
1 parent 20da10c commit a39f152

File tree

142 files changed

+9845
-17495
lines changed

Some content is hidden

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

142 files changed

+9845
-17495
lines changed

about/faq.mdx

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: 'FAQ'
33
---
44

5-
6-
75
If you have questions or need support, see [Getting Help](/help).
86

97
## What is Bazel?
@@ -14,19 +12,19 @@ Bazel is a tool that automates software builds and tests. Supported build tasks
1412

1513
Bazel was designed to fit the way software is developed at Google. It has the following features:
1614

17-
* Multi-language support: Bazel supports [many languages](/reference/be/overview), and can be extended to support arbitrary programming languages.
18-
* High-level build language: Projects are described in the `BUILD` language, a concise text format that describes a project as sets of small interconnected libraries, binaries and tests. In contrast, with tools like Make, you have to describe individual files and compiler invocations.
19-
* Multi-platform support: The same tool and the same `BUILD` files can be used to build software for different architectures, and even different platforms. At Google, we use Bazel to build everything from server applications running on systems in our data centers to client apps running on mobile phones.
20-
* Reproducibility: In `BUILD` files, each library, test and binary must specify its direct dependencies completely. Bazel uses this dependency information to know what must be rebuilt when you make changes to a source file, and which tasks can run in parallel. This means that all builds are incremental and will always produce the same result.
21-
* Scalable: Bazel can handle large builds; at Google, it is common for a server binary to have 100k source files, and builds where no files were changed take about ~200ms.
15+
- Multi-language support: Bazel supports [many languages](/reference/be/overview), and can be extended to support arbitrary programming languages.
16+
- High-level build language: Projects are described in the `BUILD` language, a concise text format that describes a project as sets of small interconnected libraries, binaries and tests. In contrast, with tools like Make, you have to describe individual files and compiler invocations.
17+
- Multi-platform support: The same tool and the same `BUILD` files can be used to build software for different architectures, and even different platforms. At Google, we use Bazel to build everything from server applications running on systems in our data centers to client apps running on mobile phones.
18+
- Reproducibility: In `BUILD` files, each library, test and binary must specify its direct dependencies completely. Bazel uses this dependency information to know what must be rebuilt when you make changes to a source file, and which tasks can run in parallel. This means that all builds are incremental and will always produce the same result.
19+
- Scalable: Bazel can handle large builds; at Google, it is common for a server binary to have 100k source files, and builds where no files were changed take about \~200ms.
2220

2321
## Why doesn’t Google use...?
2422

25-
* Make, Ninja: These tools give very exact control over what commands get invoked to build files, but it’s up to the user to write rules that are correct.
26-
* Users interact with Bazel on a higher level. For example, Bazel has built-in rules for “Java test”, “C++ binary”, and notions such as “target platform” and “host platform”. These rules have been battle tested to be foolproof.
27-
* Ant and Maven: Ant and Maven are primarily geared toward Java, while Bazel handles multiple languages. Bazel encourages subdividing codebases in smaller reusable units, and can rebuild only ones that need rebuilding. This speeds up development when working with larger codebases.
28-
* Gradle: Bazel configuration files are much more structured than Gradle’s, letting Bazel understand exactly what each action does. This allows for more parallelism and better reproducibility.
29-
* Pants, Buck: Both tools were created and developed by ex-Googlers at Twitter and Foursquare, and Facebook respectively. They have been modeled after Bazel, but their feature sets are different, so they aren’t viable alternatives for us.
23+
- Make, Ninja: These tools give very exact control over what commands get invoked to build files, but it’s up to the user to write rules that are correct.
24+
- Users interact with Bazel on a higher level. For example, Bazel has built-in rules for “Java test”, “C++ binary”, and notions such as “target platform” and “host platform”. These rules have been battle tested to be foolproof.
25+
- Ant and Maven: Ant and Maven are primarily geared toward Java, while Bazel handles multiple languages. Bazel encourages subdividing codebases in smaller reusable units, and can rebuild only ones that need rebuilding. This speeds up development when working with larger codebases.
26+
- Gradle: Bazel configuration files are much more structured than Gradle’s, letting Bazel understand exactly what each action does. This allows for more parallelism and better reproducibility.
27+
- Pants, Buck: Both tools were created and developed by ex-Googlers at Twitter and Foursquare, and Facebook respectively. They have been modeled after Bazel, but their feature sets are different, so they aren’t viable alternatives for us.
3028

3129
## Where did Bazel come from?
3230

@@ -48,10 +46,10 @@ Bazel runs build operations locally by default. However, Bazel can also connect
4846

4947
For our server code base, we use the following development workflow:
5048

51-
* All our server code is in a single, gigantic version control system.
52-
* Everybody builds their software with Bazel.
53-
* Different teams own different parts of the source tree, and make their components available as `BUILD` targets.
54-
* Branching is primarily used for managing releases, so everybody develops their software at the head revision.
49+
- All our server code is in a single, gigantic version control system.
50+
- Everybody builds their software with Bazel.
51+
- Different teams own different parts of the source tree, and make their components available as `BUILD` targets.
52+
- Branching is primarily used for managing releases, so everybody develops their software at the head revision.
5553

5654
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.
5755

@@ -63,24 +61,22 @@ Building software should be fun and easy. Slow and unpredictable builds take the
6361

6462
## Why would I want to use Bazel?
6563

66-
* Bazel may give you faster build times because it can recompile only the files that need to be recompiled. Similarly, it can skip re-running tests that it knows haven’t changed.
67-
* Bazel produces deterministic results. This eliminates skew between incremental and clean builds, laptop and CI system, etc.
68-
* Bazel can build different client and server apps with the same tool from the same workspace. For example, you can change a client/server protocol in a single commit, and test that the updated mobile app works with the updated server, building both with the same tool, reaping all the aforementioned benefits of Bazel.
64+
- Bazel may give you faster build times because it can recompile only the files that need to be recompiled. Similarly, it can skip re-running tests that it knows haven’t changed.
65+
- Bazel produces deterministic results. This eliminates skew between incremental and clean builds, laptop and CI system, etc.
66+
- Bazel can build different client and server apps with the same tool from the same workspace. For example, you can change a client/server protocol in a single commit, and test that the updated mobile app works with the updated server, building both with the same tool, reaping all the aforementioned benefits of Bazel.
6967

7068
## Can I see examples?
7169

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

7672
## What is Bazel best at?
7773

7874
Bazel shines at building and testing projects with the following properties:
7975

80-
* Projects with a large codebase
81-
* Projects written in (multiple) compiled languages
82-
* Projects that deploy on multiple platforms
83-
* Projects that have extensive tests
76+
- Projects with a large codebase
77+
- Projects written in (multiple) compiled languages
78+
- Projects that deploy on multiple platforms
79+
- Projects that have extensive tests
8480

8581
## Where can I run Bazel?
8682

@@ -90,11 +86,13 @@ Porting to other UNIX platforms should be relatively easy, as long as a JDK is a
9086

9187
## What should I not use Bazel for?
9288

93-
* Bazel tries to be smart about caching. This means that it is not good for running build operations whose outputs should not be cached. For example, the following steps should not be run from Bazel:
94-
* A compilation step that fetches data from the internet.
95-
* A test step that connects to the QA instance of your site.
96-
* A deployment step that changes your site’s cloud configuration.
97-
* If your build consists of a few long, sequential steps, Bazel may not be able to help much. You’ll get more speed by breaking long steps into smaller, discrete targets that Bazel can run in parallel.
89+
- Bazel tries to be smart about caching. This means that it is not good for running build operations whose outputs should not be cached. For example, the following steps should not be run from Bazel:
90+
91+
- A compilation step that fetches data from the internet.
92+
- A test step that connects to the QA instance of your site.
93+
- A deployment step that changes your site’s cloud configuration.
94+
95+
- If your build consists of a few long, sequential steps, Bazel may not be able to help much. You’ll get more speed by breaking long steps into smaller, discrete targets that Bazel can run in parallel.
9896

9997
## How stable is Bazel’s feature set?
10098

@@ -132,10 +130,10 @@ Yes, you can use our [Docker rules](https://github.com/bazelbuild/rules_docker)
132130

133131
For Java and C++ binaries, yes, assuming you do not change the toolchain. If you have build steps that involve custom recipes (for example, executing binaries through a shell script inside a rule), you will need to take some extra care:
134132

135-
* Do not use dependencies that were not declared. Sandboxed execution (–spawn\_strategy=sandboxed, only on Linux) can help find undeclared dependencies.
136-
* Avoid storing timestamps and user-IDs in generated files. ZIP files and other archives are especially prone to this.
137-
* Avoid connecting to the network. Sandboxed execution can help here too.
138-
* Avoid processes that use random numbers, in particular, dictionary traversal is randomized in many programming languages.
133+
- Do not use dependencies that were not declared. Sandboxed execution (–spawn\_strategy=sandboxed, only on Linux) can help find undeclared dependencies.
134+
- Avoid storing timestamps and user-IDs in generated files. ZIP files and other archives are especially prone to this.
135+
- Avoid connecting to the network. Sandboxed execution can help here too.
136+
- Avoid processes that use random numbers, in particular, dictionary traversal is randomized in many programming languages.
139137

140138
## Do you have binary releases?
141139

@@ -179,8 +177,8 @@ We still have to refactor the interfaces between the public code in Bazel and ou
179177

180178
Open sourcing Bazel is a work-in-progress. In particular, we’re still working on open sourcing:
181179

182-
* Many of our unit and integration tests (which should make contributing patches easier).
183-
* Full IDE integration.
180+
- Many of our unit and integration tests (which should make contributing patches easier).
181+
- Full IDE integration.
184182

185183
Beyond code, we’d like to eventually have all code reviews, bug tracking, and design decisions happen publicly, with the Bazel community involved. We are not there yet, so some changes will simply appear in the Bazel repository without clear explanation. Despite this lack of transparency, we want to support external developers and collaborate. Thus, we are opening up the code, even though some of the development is still happening internal to Google. Please let us know if anything seems unclear or unjustified as we transition to an open model.
186184

@@ -190,7 +188,7 @@ Yes, some of the code base either integrates with Google-specific technology or
190188

191189
## How do I contact the team?
192190

193-
We are reachable at bazel-discuss@googlegroups.com.
191+
We are reachable at [bazel-discuss@googlegroups.com](mailto:bazel-discuss@googlegroups.com).
194192

195193
## Where do I report bugs?
196194

0 commit comments

Comments
 (0)