Project: /_project.yaml Book: /_book.yaml
{% include “_buttons.html” %}
If you're planning to add, change, or remove a user-facing feature, or make a significant architectural change to Bazel, you must write a design document and have it reviewed before you can submit the change.
Here are some examples of significant changes:
When you write a design document, you can coordinate with other Bazel developers and seek guidance from Bazel's core team. For example, when a proposal adds, removes, or modifies any function or object available in BUILD, WORKSPACE, or bzl files, add the Starlark team as reviewers. Design documents are reviewed before submission because:
Bazel's design review policy helps to maximize the likelihood that:
To help you get started, take a look at the design documents in the Bazel Proposals Repository{: .external}. Designs are works in progress, so implementation details can change over time and with feedback. The published design documents capture the initial design, and not the ongoing changes as designs are implemented. Always go to the documentation for descriptions of current Bazel functionality.
As a contributor, you can write a design document, send pull requests and request reviewers for your proposal.
All design documents must have a header that includes:
The document can be written either as a world-readable Google Doc or using Markdown. Read below about for a Markdown / Google Docs comparison.
Proposals that have a user-visible impact must have a section documenting the impact on backward compatibility (and a rollout plan if needed).
Share your design doc by creating a pull request (PR) to add the document to the design index{: .external}. Add your markdown file or a document link to your PR.
When possible, choose a lead reviewer. and cc other reviewers. If you don't choose a lead reviewer, a Bazel maintainer will assign one to your PR.
After you create your PR, reviewers can make preliminary comments during the code review. For example, the lead reviewer can suggest extra reviewers, or point out missing information. The lead reviewer approves the PR when they believe the review process can start. This doesn't mean the proposal is perfect or will be approved; it means that the proposal contains enough information to start the discussion.
Send an announcement to bazel-dev{: .external} when the PR is submitted.
You may copy other groups (for example, bazel-discuss{: .external}, to get feedback from Bazel end-users).
Anyone interested can comment on your proposal. Try to answer questions, clarify the proposal, and address concerns.
Discussion should happen on the announcement thread. If the proposal is in a Google Doc, comments may be used instead (Note that anonymous comments are allowed).
Create a new PR to update the status of the proposal, when iteration is complete. Send the PR to the same lead reviewer and cc the other reviewers.
To officially accept the proposal, the lead reviewer approves the PR after ensuring that the other reviewers agree with the decision.
There must be at least 1 week between the first announcement and the approval of a proposal. This ensures that users had enough time to read the document and share their concerns.
Implementation can begin before the proposal is accepted, for example as a proof-of-concept or an experimentation. However, you cannot submit the change before the review is complete.
A lead reviewer should be a domain expert who is:
Consider checking the contacts for various team labels.
Decide what works best for you, since both are accepted.
Benefits of using Google Docs:
Benefits of using Markdown files:
You can choose to first iterate on a Google Doc, and then convert it to Markdown for posterity.
For consistency, use the Bazel design doc template{: .external}. It includes the necessary header and creates visual consistency with other Bazel related documents. To do that, click on File > Make a copy or click this link to make a copy of the design doc template{: .external}.
To make your document readable to the world, click on Share > Advanced > Changeā¦, and choose “On - Anyone with the link”. If you allow comments on the document, anyone can comment anonymously, even without a Google account.
Documents are stored on GitHub and use the GitHub flavor of Markdown{: .external} (Specification{: .external}).
Create a PR to update an existing document. Significant changes should be reviewed by the document reviewers. Trivial changes (such as typos, formatting) can be approved by anyone.
A reviewer comments, reviews and approves design documents.
You're responsible for reviewing design documents, asking for additional information if needed, and approving a design that passes the review process.
Follow this process for all design review requests. Do not approve designs affecting Bazel if they are not in the design index{: .external}.
You‘re responsible for making the go / no-go decision on implementation of a pending design. If you’re not able to do this, you should identify a suitable delegate (reassign the PR to the delegate), or reassign the bug to a Bazel manager for further disposition.