@@ -4,144 +4,96 @@ Book: /_book.yaml
4
4
5
5
{% include "_ buttons.html" %}
6
6
7
- ## Overview {:#overview}
8
-
9
- As the Bazel project continues to evolve in response to your needs, we want to
10
- share our 2024 update.
11
-
12
- This roadmap describes current initiatives and predictions for the future of
13
- Bazel development, giving you visibility into current priorities and ongoing
14
- projects.
15
-
16
- ## Bazel 8.0 Release {:#bazel-8.0}
17
-
18
- We plan to bring Bazel 8.0 [ long term support
19
- (LTS)] ( https://bazel.build/release/versioning ) to you in late 2024.
20
- The following features are planned to be implemented.
21
-
22
- ### Bzlmod: external dependency management system {:#bzlmod:-external}
23
-
24
- [ Bzlmod] ( https://bazel.build/docs/bzlmod ) automatically resolves transitive
25
- dependencies, allowing projects to scale while staying fast and
26
- resource-efficient.
27
-
28
- With Bazel 8, we will disable WORKSPACE support by default (it will still be
29
- possible to enable it using ` --enable_workspace ` ); with Bazel 9 WORKSPACE
30
- support will be removed. Starting with Bazel 7.1, you can set
31
- ` --noenable_workspace ` to opt into the new behavior.
32
-
33
- Bazel 8.0 will contain a number of enhancements to
34
- [ Bazel's external dependency management]
35
- (https://docs.google.com/document/d/1moQfNcEIttsk6vYanNKIy3ZuK53hQUFq1b1r0rmsYVg/edit#heading=h.lgyp7ubwxmjc )
36
- functionality, including:
37
-
38
- * The new flag ` --enable_workspace ` can be set to ` false ` to completely
39
- disable WORKSPACE functionality.
40
- * New directory watching API (see
41
- [ #21435 ] ( https://github.com/bazelbuild/bazel/pull/21435 ) , shipped in Bazel
42
- 7.1).
43
- * Improved scheme for generating canonical repository names for better
44
- cacheability of actions across dependency version updates.
45
- ([ #21316 ] ( https://github.com/bazelbuild/bazel/pull/21316 ) , shipped in Bazel
46
- 7.1)
47
- * An improved shared repository cache (see
48
- [ #12227 ] ( https://github.com/bazelbuild/bazel/issues/12227 ) ).
49
- * Vendor and offline mode support — allows users to run builds with
50
- pre-downloaded dependencies (see
51
- [ #19563 ] ( https://github.com
8000
/bazelbuild/bazel/issues/19563 ) ).
52
- * Reduced merge conflicts in lock files
53
- ([ #20396 ] ( https://github.com/bazelbuild/bazel/issues/20369 ) ).
54
- * Segmented MODULE.bazel
55
- ([ #17880 ] ( https://github.com/bazelbuild/bazel/issues/17880 ) )
56
- * Allow overriding module extension generated repository
57
- ([ #19301 ] ( https://github.com/bazelbuild/bazel/issues/19301 ) )
58
- * Improved documentation (e.g.
59
- [ #18030 ] ( https://github.com/bazelbuild/bazel/issues/18030 ) ,
60
- [ #15821 ] ( https://github.com/bazelbuild/bazel/issues/15821 ) ) and migration
61
- guide and migration tooling.
62
-
63
- ### Remote execution improvements {:#remote-execution}
64
-
65
- * Add support for asynchronous execution, speeding up remote execution by
66
- increased parallelism with flag ` --jobs ` .
67
- * Make it easier to debug cache misses by a new compact execution log,
68
- reducing its size by 100x and its runtime overhead significantly (see
69
- [ #18643 ] ( https://github.com/bazelbuild/bazel/issues/18643 ) ).
70
- * Implement garbage collection for the disk cache (see
71
- [ #5139 ] ( https://github.com/bazelbuild/bazel/issues/5139 ) ).
72
- * Implement remote output service to allow lazy downloading of arbitrary build
73
- outputs (see
74
- [ #20933 ] ( https://github.com/bazelbuild/bazel/discussions/20933 ) ).
75
-
76
- ### Migration of Android, C++, Java, Python, and Proto rules {:#migration-android,}
77
-
78
- Complete migration of Android, C++, Java, and Python rulesets to dedicated
79
- repositories and decoupling them from the Bazel releases. This effort allows
80
- Bazel users and rule authors to
81
-
82
- * Update rules independently of Bazel.
83
- * Update and customize rules as needed.
84
-
85
- The new location of the rulesets is going to be ` bazelbuild/rules_android ` ,
86
- ` rules_cc ` , ` rules_java ` , ` rules_python ` and ` google/protobuf ` . ` rules_proto ` is
87
- going to be deprecated.
88
-
89
- Bazel 8 will provide a temporary migration flag that will automatically use the
90
- rulesets that were previously part of the binary from their repositories. All
91
- the users of those rulesets are expected to eventually depend on their
92
- repositories and load them similarly to other rulesets that were never part of
93
- Bazel.
94
-
95
<
6D40
code class="diff-text syntax-highlighted-line deletion">- Bazel 8 will also improve on the existing extending rules and subrule APIs and
96
- mark them as non-experimental.
97
-
98
- ### Starlark improvements {:#starlark-improvements}
99
-
100
- * Symbolic Macros are a new way of writing macros that is friendlier to
101
- ` BUILD ` users, macro authors, and tooling. Compared to legacy macros, which
102
- Bazel has only limited insight into, symbolic macros help users avoid common
103
- pitfalls and enforce best practices.
104
- * Package finalizers are a proposed feature for adding first-class support for
105
- custom package validation logic. They are intended to help us deprecate
106
- ` native.existing_rules() ` .
107
-
108
- ### Configurability {:#configurability}
109
-
110
- * Output path mapping continues to stabilize: promising better remote cache
111
- performance and build speed for rule designers who use transitions.
112
- * Automatically set build flags suitable for a given ` --platforms ` .
113
- * Define project-supported flag combinations and automatically build targets
114
- with default flags without having to set bazelrcs.
115
- * Don't redo build analysis every time build flags change.
116
-
117
- ### Project Skyfocus - minimize retained data structures {:#project-skyfocus}
118
-
119
- Bazel holds a lot of state in RAM for fast incremental builds. However,
120
- developers often change a small subset of the source files (e.g. almost never
121
- one of the external dependencies). With Skyfocus, Bazel will provide an
122
- experimental way to drop unnecessary incremental state and reduce Bazel's memory
123
- footprint, while still providing the same fast incremental build experience.
124
-
125
- The initial scope aims to improve the retained heap metric only. Peak heap
126
- reduction is a possibility, but not included in the initial scope.
127
-
128
- ### Misc {:#misc}
129
-
130
- * Mobile install v3, a simpler and better maintained approach to incrementally
131
- deploy Android applications.
132
- * Garbage collection for repository caches and Bazel's ` install_base ` .
133
- * Reduced sandboxing overhead.
134
-
135
- ### Bazel-JetBrains* IntelliJ IDEA support {:#bazel-jetbrains* -intellij}
136
-
137
- Incremental IntelliJ plugin updates to support the latest JetBrains plugin
138
- release.
139
-
140
- * This roadmap snapshots targets, and should not be taken as guarantees.
141
- Priorities are subject to change in response to developer and customer
142
- feedback, or new market opportunities.*
143
-
144
- * To be notified of new features — including updates to this roadmap — join the
145
- [ Google Group] ( https://groups.google.com/g/bazel-discuss ) community.*
146
-
147
- * Copyright © 2022 JetBrains s.r.o. JetBrains and IntelliJ are registered trademarks of JetBrains s.r.o
7
+ As Bazel continues to evolve in response to your needs, we want to share our
8
+ 2025 roadmap update.
9
+
10
+ We plan to bring Bazel 9.0
11
+ [ long term support (LTS)] ( https://bazel.build/release/versioning ) to you in late
12
+ 2025 .
13
+
14
+ ## Full transition to Bzlmod
15
+
16
+ [ Bzlmod] ( https://bazel.build/docs/bzlmod ) has been the standard external
17
+ dependency system in Bazel since Bazel 7, replacing the legacy WORKSPACE system.
18
+ As of March 2025, the [ Bazel Central Registry] ( https://registry.bazel.build/ )
19
+ hosts more than 650 modules.
20
+
21
+ With Bazel 9, we will completely remove WORKSPACE functionality, and Bzlmod will
22
+ be the only way to introduce external dependencies in Bazel. To minimize the
23
+ migration cost for the community, we'll focus on further improving our migration
24
+ [ guide] ( https://bazel.build/external/migration ) and
25
+ [ tool] ( https://github.com/bazelbuild/bazel-central-registry/tree/main/tools#migrate_to_bzlmodpy ) .
26
+
27
+ Additionally, we aim to implement an improved shared repository cache (see
28
+ [ #12227 ] ( https://github.com/bazelbuild/bazel/issues/12227 ) )
29
+ with garbage collection, and may backport it to Bazel 8. The Bazel Central
30
+ Registry will also support verifying SLSA attestations.
31
+
32
+ ## Migration of Android, C++, Java, Python, and Proto rules
33
+
34
+ With Bazel 8, we have migrated support for Android, Java, Python, and Proto
35
+ rules out of the Bazel codebase into Starlark rules in their corresponding
36
+ repositories. To ease the migration, we implemented the autoload features in
37
+ Bazel, which can be controlled with
38
+ [ --incompatible_autoload_externally] ( https://github.com/bazelbuild/bazel/issues/23043 )
39
+ and [ --incompatible_disable_autoloads_in_main_repo] ( https://github.com/bazelbuild/bazel/issues/25755 )
40
+ flags.
41
+
42
+ With Bazel 9, we aim to disable autoloads by default and require every project
43
+ to explicitly load required rules in BUILD files.
44
+
45
+ We will rewrite most of C++ language support to Starlark, detach it from Bazel
46
+ binary and move it into the [ /rules_cc] ( https://github.com/bazelbuild/rules_cc )
47
+ repository. This is the last remaining major language support that is still part
48
+ of Bazel.
49
+
50
+ We're also porting unit tests for C++, Java, and Proto rules to Starlark, moving
51
+ them to repositories next to the implementation to increase velocity of rule
52
+ authors.
53
+
54
+ ## Starlark improvements
55
+
56
+ Bazel will have the ability to evaluate symbolic macros lazily. This means that
57
+ a symbolic macro won't run if the targets it declares are not requested,
58
+ improving performance for very large packages.
59
+
60
+ Starlark will have an experimental type system, similar to Python's type
61
+ annotations. We expect the type system to stabilize _ after_ Bazel 9 is launched.
62
+
63
+ ## Configurability
64
+
65
+ Our main focus is reducing the cost and confusion of build flags.
66
+
67
+ We're [ experimenting] ( https://github.com/bazelbuild/bazel/issues/24839 ) with a
68
+ new project configuration model that doesn't make users have to know which build
69
+ and test flags to set where. So ` $ bazel test //foo ` automatically sets the
70
+ right flags based on ` foo ` 's project's policy. This will likely remain
71
+ experimental in 9.0 but guiding feedback is welcome.
72
+
73
+ [ Flag scoping] ( https://github.com/bazelbuild/bazel/issues/24042 ) lets you strip
74
+ out Starlark flags when they leave project boundaries, so they don't break
75
+ caching on transitive dependencies that don't need them. This makes builds that
76
+ use [ transitions] ( https://bazel.build/extending/config#user-defined-transitions )
77
+ cheaper and faster.
78
+ [ Here's] ( https://github.com/gregestren/snippets/tree/master/project_scoped_flags )
79
+ an example. We're extending the idea to control which flags propagate to
80
+ [ exec configurations] ( https://bazel.build/extending/rules#configurations ) and
81
+ are considering even more flexible support like custom Starlark to determine
82
+ which dependency edges should propagate flags.
83
+
84
+ We're up-prioritizing effort to move built-in language flags out of Bazel and
85
+ into Starlark, where they can live with related rule definitions.
86
+
87
+ ## Remote execution improvements
88
+
89
+ We plan to add support for asynchronous execution, speeding up remote execution
90
+ by increasing parallelism.
91
+
92
+ ---
93
+
94
+ To follow updates to the roadmap and discuss planned features, join the
95
+ community Slack server at [ slack.bazel.build] ( https://slack.bazel.build/ ) .
96
+
97
+ * This roadmap is intended to help inform the community about the team's
98
+ intentions for Bazel 9.0. Priorities are subject to change in response to
99
+ developer and customer feedback, or to new market opportunities.*
0 commit comments