Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Refresh configurability roadmap #184

Merged
merged 1 commit into from
Apr 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 52 additions & 45 deletions roadmaps/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ title: Bazel Configurability Roadmap

# Bazel Configurability 2019 Roadmap

*Last verified: 2019-01-28* ([update history](https://github.com/bazelbuild/bazel-website/commits/master/roadmaps/configuration.md))
*Last verified: 2019-04-25* ([update history](https://github.com/bazelbuild/bazel-website/commits/master/roadmaps/configuration.md))

*Point of contact:* [gregestren](https://github.com/gregestren)

Expand All @@ -57,8 +57,12 @@ title: Bazel Configurability Roadmap
## Roadmap

Dates are approximate based on our best understanding of problem complexity
and developer availability. ETAs will change, but we'll keep them refreshed and
current.
and developer availability. Dates represent expected availability in released
Bazel. If a feature requires an [incompatible
flag](https://docs.bazel.build/versions/master/backward-compatibility.html#incompatible-changes-and-migration-recipes),
dates represent the first time the feature can be used, even if it requires
setting the flag before it's on by default. ETAs will change, but we'll keep
them refreshed and current.

### Platforms
Also see the [Platforms Roadmap](platforms.html) for detailed priorities.
Expand All @@ -73,7 +77,7 @@ Also see the [Platforms Roadmap](platforms.html) for detailed priorities.
platforms](https://docs.bazel.build/versions/master/be/general.html#config_setting.constraint_values),
and configuration via
[-\-platforms](https://docs.bazel.build/versions/master/platforms.html#specifying-a-platform-for-a-build)
* These set best practice templates for adding platform and toolchain support to other rules
* Sets best practices for adding platform and toolchain support to other rules


<div class="padbottom"></div>
Expand All @@ -82,9 +86,6 @@ and configuration via
[toolchains](https://docs.bazel.build/versions/master/toolchains.html)**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katre - is this June landing estimate at all reasonable for Java toolchain support?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forwarding question to @iirina, who is doing the work.

<span class="inprogressstatus">IN PROGRESS</span> ([#6521](https://github.com/bazelbuild/bazel/issues/6521))

* A second major rule set adopts this API


<div class="padbottom"></div>
<span class="etabox">Jun 2019</span>**There's _one_ standard way to select platforms
at the command line**
Expand All @@ -96,11 +97,18 @@ at the command line**

<div class="padbottom"></div>
<span class="etabox">Jun 2019</span>**Legacy flags like `--cpu` automatically set `--platform` while the former are removed**
<span class="notstartedstatus">NOT STARTED</span> ([#6426](https://github.com/bazelbuild/bazel/issues/6426))
<span class="inprogressstatus">IN PROGRESS</span> ([#6426](https://github.com/bazelbuild/bazel/issues/6426))

* This prevents `.bazelrc`s, `select()`s on `--cpu`, and legacy command lines from breaking as rules adopt platforms
* Rules can leverage the benefits of platforms without having to wait on migration
* Rules can get platforms' benefits without having to wait on migration

<div class="padbottom"></div>
<span class="etabox">Aug 2019</span>**All supported Bazel rules support
[platforms](https://docs.bazel.build/versions/master/platforms.html) and
[toolchains](https://docs.bazel.build/versions/master/toolchains.html)**
<span class="inprogressstatus">IN PROGRESS</span>

* Python: [#7375](https://github.com/bazelbuild/bazel/issues/7375)

<div class="padbottom"></div>
<span class="etabox">late 2019</span>**Flagless multiplatform builds
Expand All @@ -114,37 +122,29 @@ at the command line**

$ bazel build //a:all # No command line flags!
```
* *Unoptimized* means [memory and performance](#memory-and-performance) issues may not be resolved


<div class="padbottom"></div>
<span class="etabox">late 2019</span>**All supported Bazel rules fully support
[platforms](https://docs.bazel.build/versions/master/platforms.html) and
[toolchains](https://docs.bazel.build/versions/master/toolchains.html)**
<span class="notstartedstatus">NOT STARTED</span>

* *Unoptimized* means [memory and performance](#efficiency) issues may not be resolved

### User-Defined Build Settings
See [Starlark Build Configuration](https://docs.google.com/document/d/1vc8v-kXjvgZOdQdnxPTaV0rrLxtP2XwnD2tAZlYJOqw/edit?usp=sharing) for in-depth motivation and design.

<div class="padbottom"></div>
<span class="etabox">Mar 2019</span>**Starlark supports custom configuration transitions**
<span class="inprogressstatus">IN PROGRESS</span> ([#5574](http://github.com/bazelbuild/bazel/issues/5574))
<span class="donestatus">DONE</span> ([#5574](http://github.com/bazelbuild/bazel/issues/5574#issuecomment-458349702))

* Rule designers can have rules change their flags or their dependencies' flags
* This may have [memory and performance](#memory-and-performance) consequences
* This may have [memory and performance](#efficiency) consequences


<div class="padbottom"></div>
<span class="etabox">Apr 2019</span>**Starlark supports [fancy](https://docs.google.com/document/d/1VIRx06cZB4wLU-ASq1XKFHmx67yfHtNOCbCempaPeaA/edit) transitions**
<span class="etabox">Jul 2019</span>**Starlark supports [fancy](https://docs.google.com/document/d/1VIRx06cZB4wLU-ASq1XKFHmx67yfHtNOCbCempaPeaA/edit) transitions**
<span class="inprogressstatus">IN PROGRESS</span> ([#5574](http://github.com/bazelbuild/bazel/issues/5574))

* Transitions can read a rule's attributes to determine what to change
* Transitions can read a rule's attributes to determine what to change <span class="donestatus">DONE</span>
* Transitions on a rule can read attributes with `select()`


<div class="padbottom"></div>
<span class="etabox">Apr 2019</span>**Starlark supports user-defined build settings**
<span class="etabox">Jul 2019</span>**Starlark supports user-defined build settings**
<span class="inprogressstatus">IN PROGRESS</span> ([#5577](http://github.com/bazelbuild/bazel/issues/5577))

* A standard API defines how to declare custom settings. This consolidates [command
Expand All @@ -155,39 +155,37 @@ See [Starlark Build Configuration](https://docs.google.com/document/d/1vc8v-kXjv
[--define](https://github.com/bazelbuild/bazel/blob/b3cf83cd20f30d77e6768de651a3e652f86d6f78/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java#L423),
[--features](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java;l=835?q=file:BuildConfiguration.java),
and [feature
flags](https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107)).
flags](https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107)). <span
class="donestatus">DONE</span>

* All hard-coded Bazel flags can be migrated to this API. Actual migration may
not have begun.
not have begun. <span class="inprogressstatus">IN PROGRESS</span>
* End users (i.e. non-rule designers) can't customize settings. For end users, we want to start
by seeing how far we can get with [`--platforms`](https://docs.bazel.build/versions/master/platforms.html#specifying-a-platform-for-a-build) and [feature
flags](https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107).


<div class="padbottom"></div>
<span class="etabox">Apr 2019</span>**All native Bazel rules can be implemented
<span class="etabox">Jul 2019</span>**All native Bazel rules can be implemented
in Starlark**
<span class="inprogressstatus">IN PROGRESS</span> ([#5578](http://github.com/bazelbuild/bazel/issues/5578))

* This automatically comes out of user-defined build settings and custom transitions


### Memory and Performance
### Efficiency

<div class="padbottom"></div>
<span class="etabox">Mar 2019</span>**Documentation explains how to use
[configuration transitions](#user-defined-build-settings) efficiently**
<span class="notstartedstatus">NOT STARTED</span> ([#6525](https://github.com/bazelbuild/bazel/issues/6525))

* Explains why builds may use more memory and take more time
* Explains how to minimize these risks and make informed use of these features
* Points to tools for profiling your build
* Explains ongoing work to automatically improve efficiency
<span class="etabox">May 2019</span>**An experimental Bazel mode automatically
shrinks build graphs**
<span class="donestatus">DONE</span> ([#6524](https://github.com/bazelbuild/bazel/issues/6524))

* No rule builds twice when unrelated flags change
* Building the *Mac* and *Linux* versions of a binary at the same time doesn't double the build graph

<div class="padbottom"></div>
<span class="etabox">May 2019</span>**An experimental Bazel mode automatically
shrinks build graphs**
<span class="etabox">Jul 2019</span>**This mode automatically optimizes [test
trimming](https://github.com/bazelbuild/bazel/issues/5579) and [feature flags](https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107)**
<span class="inprogressstatus">IN PROGRESS</span> ([#6524](https://github.com/bazelbuild/bazel/issues/6524))

* No rule builds twice when unrelated flags change
Expand All @@ -196,25 +194,34 @@ shrinks build graphs**

<div class="padbottom"></div>
<span class="etabox">Jul 2019</span>**An experimental Bazel mode makes identical actions unique**
<span class="notstartedstatus">NOT STARTED</span> ([#6526](https://github.com/bazelbuild/bazel/issues/6526))
<span class="inprogressstatus">IN PROGRESS</span> ([#6526](https://github.com/bazelbuild/bazel/issues/6526))

* Stops different actions from writing to the same path and overwriting each other's output
* Improves multiplatform build time and remoe execution caching
* Makes pure Java compilation cacehable across different CPUs.


<div class="padbottom"></div>
<span class="etabox">late 2019</span>**Bazel automatically shrinks graphs with
mixed build settings**
<span class="notstartedstatus">NOT STARTED</span> ([#6524](https://github.com/bazelbuild/bazel/issues/6524))
<span class="etabox">Jul 2019</span>**Projects can selectively opt into automatic shareable actions**
<span class="notstartedstatus">NOT STARTED</span> ([#6526](https://github.com/bazelbuild/bazel/issues/6526))

* Productionizes experimental build graph shrinking
* Exposes the benefits of experimental unique actions while recognizing complete migration may take time


<div class="padbottom"></div>
<span class="etabox">late 2019</span>**Projects can selectively opt into automatic shareable actions**
<span class="notstartedstatus">NOT STARTED</span> ([#6526](https://github.com/bazelbuild/bazel/issues/6526))
<span class="etabox">Jul 2019</span>**Documentation explains how to use
[configuration transitions](#user-defined-build-settings) efficiently**
<span class="notstartedstatus">NOT STARTED</span> ([#6525](https://github.com/bazelbuild/bazel/issues/6525))

* Explains why builds may use more memory and be slower
* Explains how to minimize this and make informed use of these features
* Points to tools for profiling your build
* Explains ongoing work to automatically improve efficiency

* Exposes the benefits of experimental unique actions while recognizing complete migration may take time

<div class="padbottom"></div>
<span class="etabox">late 2019</span>**Bazel automatically shrinks graphs with
mixed build settings**
<span class="notstartedstatus">NOT STARTED</span> ([#6524](https://github.com/bazelbuild/bazel/issues/6524))

* Productionizes experimental build graph shrinking