Bazel Configurability 2020 Roadmap
Last verified: 2021-01-25 (update history)
Point of contact: gregestren
Discuss: Configurability roadmap: discussion
This roadmap has been retired. See here for the current roadmap.
Previous Roadmaps
EOY Review
Status as of Jan 2021:
7 initiatives DONE. 12 IN PROGRESS. 6 NOT STARTED.
Platforms:
- Incompatible target skipping delivered in Bazel 4.0. Big thanks to @philsc for carrying the feature through.
- Java rules migrated to platforms. Big thanks to @comius for implementation.
- Core devs are doubling down on migrating Android rules. This will also unlock C++ rules. We’re continuing this focus in the interest of making Bazel’s platform API the standard for all projects. This is involved work that will continue through 2021.
- Multiple execution platforms was deprioritized for Android work. But it has new commitment in 2021 (it now has dedicated ownership).
Other work:
- Flag
aliases
delivered in Bazel 4.0:
write
//my/package:my_flag
in Starlark and set it as--myflag
at the command line. Big thanks to @warkahscott for delivering the feature and @juliexxia for guiding it. - –trim_test_configuration is expected to land in Bazel 4.1. This makes it possible to test with different flags without slow rebuilds. Big thanks to @sdtwigg.
- Other efficiency efforts, like cacheable output paths, continue slowly because of insufficient dev allocation. They’ll continue to move forward, but collaborators welcome!
For 2021, we’re going to put more effort behind fewer initiatives at once. We’ll note “later in the year” efforts but not give them estimates until they’re actively prioritized.
Goal
$ bazel build //:all
just works, for any project and any targeted platforms.
- Builds don’t require command-line flags.
- Each target automatically uses correct settings (e.g.
android_binary
uses the right NDK). - It’s easy to target multiple platforms.
- Dependencies can be configured differently than their parents.
- Builds scale well, particularly w.r.t graph size and action caching.
We also support
cquery
, Starlark
configuration
,
and
select()
.
Roadmap
Dates are approximate based on our best understanding of problem complexity and developer availability. Dates represent expected availability in released Bazel. If a feature requires an incompatible flag, dates represent the first time the feature can be used, even if the flag has to be manually set. ETAs will change, but we’ll keep them refreshed as we best understand them.
Platforms
Q1 2020Toolchains can build both buildtime and runtime artifacts DONE (#10523)
- For example, compiler tools (which run on the build machine) and generated source code (which runs on the target machine)
Q2 2020Builds support multiple execution platforms IN PROGRESS (#11748)
Fall 2020C++ rules use the new platforms API IN PROGRESS (#6516)
- Already ready but need platform mappings to support Android/IOS projects
- Final update: we’re fulfilling this by implementing proper Android / iOS support in 2021
Fall 2020Java rules use the new platforms API DONE (#4592)
- Same as C++ but also need platform definitions
Fall 2020Android rules use the new platforms API IN PROGRESS (#11749)
- Final update: primary focus in 2021
mid 2020bazel build //:all
automatically skips
platform-incompatible targets
DONE (#10945)
2021Deprecate and remove --cpu
and related flags
NOT STARTED
Efficiency
Q3 2020Faster incremental tests on --test_*
changes
DONE (#6842)
-
*Final update: expected to land in Bazel 4.1.
-
Specifically, changing
--test_*
doesn’t redo the analysis phase
August 2020A diganostic tool explains performance impact of configuration APIs DONE (#10613)
- For example, how does a transition affect the configured target graph, which targets are responsible, and how could trimming help?
- Also quantifies action caching inefficiency
Unclear ETAAn experimental Bazel mode automatically “trims” build graphs NOT STARTED (#6524)
- e.g. C++ rules don’t re-analyze because of Java flag changes
- Building a binary’s Mac and Linux versions simultaneously doesn’t double the build graph
October 2020An experimental Bazel mode caches cross-platform Java compilation IN PROGRESS (#6526)
- Improves multiplatform build speed
- Proof-of-concepts a more general design that guarantees ideal caching for all actions
- Final update: continuing to get part-time effort. Help appreciated.
Features
September 2020Short and sharp Starlark flags DONE (#11750)
late 2020Projects can declare and compliance-check software licenses in progress (#7444)
Documentation
late 2020Guide to designing efficient multiplatform builds NOT STARTED
- What are performance bottleneck concerns?
- What options are there for relieving them?
- What tools are available for measuring?
- *Final update: deprioritized for lack of user interest.