-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBazel Configurability 2019 Roadmap - Bazel.html
593 lines (506 loc) · 32.2 KB
/
Bazel Configurability 2019 Roadmap - Bazel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
<!DOCTYPE html>
<!-- saved from url=(0055)http://localhost:12345/roadmaps/2019/configuration.html -->
<html lang="en" itemscope="" itemtype="https://schema.org/WebPage"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bazel Configurability Roadmap - Bazel</title>
<script async="" src="./Bazel Configurability 2019 Roadmap - Bazel_files/analytics.js"></script><script>
var current_url = window.location.href;
// Do a shortcut so that be.bazel.build redirect to the build encyclopedia
var be_url = new RegExp("^https?://be(\.bazel.build)?/?");
if (be_url.test(current_url)) {
window.location.replace(current_url.replace(be_url, "https://docs.bazel.build/be/overview.html"));
}
var be_url = new RegExp("^https?://be(\.bazel.build)?/([a-zA-Z0-9_-]+)([/#](.*))?");
if (be_url.test(current_url)) {
window.location.replace(current_url.replace(be_url, "https://docs.bazel.build/be/$2.html#$4"));
}
// And a short to code reviews
var cr_url = new RegExp("^https?://cr(\.bazel.build)?/([0-9]+)")
if (cr_url.test(current_url)) {
window.location.replace(current_url.replace(cr_url, "https://bazel-review.googlesource.com/c/$2"));
}
// Code review dashboard
var cr_url = new RegExp("^https?://cr(\.bazel.build)?/?")
if (cr_url.test(current_url)) {
window.location.replace(current_url.replace(cr_url, "https://bazel-review.googlesource.com/"));
}
</script>
<link rel="canonical" href="http://localhost:12345/roadmaps/2019/configuration.html">
<!-- Webfont -->
<style class="anchorjs"></style><link href="./Bazel Configurability 2019 Roadmap - Bazel_files/css" rel="stylesheet">
<link rel="icon" type="image/png" href="http://localhost:12345/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="http://localhost:12345/images/favicon-16x16.png" sizes="16x16">
<!-- Bootstrap -->
<link href="https://www.bazel.build/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="https://www.bazel.build/assets/css/font-awesome.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Custom stylesheet -->
<link rel="stylesheet" type="text/css" href="https://www.bazel.build/css/main.css">
<!-- metadata -->
<meta name="og:title" content="Bazel Configurability Roadmap">
<meta name="og:image" content="https://bazel.build/images/bazel-og-image.png">
</head>
<body>
<nav id="common-nav" class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://localhost:12345/">
<img class="navbar-logo" src="./Bazel Configurability 2019 Roadmap - Bazel_files/bazel-navbar.svg">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/bazelbuild/bazel">
<span class="hidden-sm">GitHub</span>
<span class="nav-icon visible-sm"><i class="fa fa-github"></i></span>
</a>
</li>
</ul>
<form class="navbar-form navbar-right" action="http://localhost:12345/search.html" id="cse-search-box">
<div class="form-group">
<input type="hidden" name="cx" value="009927877080525621790:2pxlpaexqpc">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="UTF-8">
<input type="search" name="q" id="q" class="form-control input-sm" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://docs.bazel.build/">Documentation</a>
</li>
<li>
<a href="http://localhost:12345/contributing.html">Contribute</a>
</li>
<li>
<a href="https://blog.bazel.build/">
<span class="hidden-sm">Blog</span>
<span class="nav-icon visible-sm"><i class="fa fa-rss"></i></span>
</a>
</li>
<li>
<a href="https://twitter.com/bazelbuild">
<span class="visible-xs">Twitter</span>
<span><i class="nav-icon fa fa-twitter hidden-xs"></i></span>
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/bazel">
<span class="visible-xs">StackOverflow</span>
<span><i class="nav-icon fa fa-stack-overflow hidden-xs"></i></span>
</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="page-title-bar">
<div class="container">
<h1 id="contribute">Contribute<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#contribute" aria-label="Anchor link for: contribute" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h1>
</div>
</div>
<div class="container vpad">
<div class="row">
<div class="col-lg-3">
<a class="btn btn-default btn-lg btn-block sidebar-toggle" data-toggle="collapse" href="http://localhost:12345/roadmaps/2019/configuration.html#sidebar-nav" aria-expanded="false" aria-controls="sidebar-nav">
<i class="glyphicon glyphicon-menu-hamburger"></i> Navigation
</a>
<nav class="sidebar collapse" id="sidebar-nav">
<ul class="sidebar-nav">
<li><a href="http://localhost:12345/contributing.html">Contributing to Bazel</a></li>
<li><a href="https://github.com/bazelbuild/bazel/wiki/Bazel-Users">Who's Using Bazel</a></li>
<li><a href="http://localhost:12345/governance.html">Governance</a></li>
<li><a href="http://localhost:12345/roadmap.html">Roadmap</a></li>
<li><a href="http://localhost:12345/naming.html">Naming Bazel projects</a></li>
<li><a href="http://localhost:12345/support.html">Support</a></li>
</ul>
<h3 id="technical-docs">Technical Docs<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#technical-docs" aria-label="Anchor link for: technical docs" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h3>
<ul class="sidebar-nav">
<li><a href="http://localhost:12345/designs/skyframe.html">Skyframe</a></li>
<li><a href="http://localhost:12345/maintainers-guide.html">Guide for Bazel Maintainers</a></li>
<li><a href="http://localhost:12345/designs/index.html">Design Documents</a></li>
<li><a href="http://localhost:12345/breaking-changes-guide.html">Rolling out breaking changes</a></li>
<li><a href="http://localhost:12345/release-notes.html">Release Notes</a></li>
<li><a href="http://localhost:12345/recommended-rules.html">Recommended Rules</a></li>
<li><a href="http://localhost:12345/windows-chocolatey-maintenance.html">Maintaining Bazel Chocolatey package on Windows</a></li>
<li><a href="http://localhost:12345/windows-scoop-maintenance.html">Maintaining Bazel Scoop package on Windows</a></li>
</ul>
<h3 id="external-resources">External Resources<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#external-resources" aria-label="Anchor link for: external resources" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h3>
<ul class="sidebar-nav">
<li><a href="https://github.com/bazelbuild/bazel">GitHub</a></li>
<li><a href="https://source.bazel.build/">Search Bazel code</a></li>
<li><a href="http://localhost:12345/browse-and-search-user-guide.html">Search user guide</a></li>
<li><a href="https://groups.google.com/forum/#!forum/bazel-dev">Developer mailing list</a></li>
<li><a href="https://slack.bazel.build/">Slack</a></li>
<li><a href="http://localhost:12345/experts.html">Community Experts</a></li>
</ul>
</nav>
</div>
<div class="col-lg-9">
<style>
.padbottom { padding-bottom: 10px; }
.etabox {
background: #EFEFEF;
color: #38761D;
font-size: 15px;
font-weight: bold;
display: inline;
padding: 6px;
margin-right: 10px;
}
.donestatus {
color: #00D000;
font-weight: bold;
padding-left: 10px;
}
.inprogressstatus {
color: #D0D000;
font-weight: bold;
padding-left: 10px;
}
.notstartedstatus {
color: #D00000;
font-weight: bold;
padding-left: 10px;
}
</style>
<h1 id="bazel-configurability-2019-roadmap">Bazel Configurability 2019 Roadmap<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#bazel-configurability-2019-roadmap" aria-label="Anchor link for: bazel configurability 2019 roadmap" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h1>
<p><em>Last verified: 2020-01-17</em> (<a href="https://github.com/bazelbuild/bazel-website/commits/master/roadmaps/configuration.md">update history</a>)</p>
<p><em>Point of contact:</em> <a href="https://github.com/gregestren">gregestren</a></p>
<p><em>Discuss:</em> <a href="https://github.com/bazelbuild/bazel/issues/6431">Configurability roadmap: discussion</a></p>
<p><strong>This roadmap has been retired. See <a href="http://localhost:12345/roadmaps/configuration.html">here</a> for the current roadmap.</strong></p>
<h2 id="previous-roadmaps">Previous roadmaps<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#previous-roadmaps" aria-label="Anchor link for: previous roadmaps" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h2>
<ul>
<li><a href="http://localhost:12345/roadmaps/2018/configuration.html">2018</a></li>
</ul>
<h2 id="eoy-review">EOY Review<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#eoy-review" aria-label="Anchor link for: eoy review" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h2>
<p><em>Status as of Jan 2020:</em></p>
<p>Platforms:</p>
<ul>
<li>C++ rules support the new <a href="https://docs.bazel.build/versions/master/platforms-intro.html">platforms
API</a>. Deferred
<a href="https://github.com/bazelbuild/bazel/issues/7260">enabling</a> by default since
depending Android and iOS projects
<a href="https://github.com/bazelbuild/bazel/issues/8716">break</a>.</li>
<li>Java rules support the new platforms API. <a href="https://github.com/bazelbuild/rules_java/pull/8">Actual platform
definitions</a> remain pending.</li>
<li>To enable C++ and Java support in 2020, we’ll use <a href="https://docs.bazel.build/versions/master/platforms-intro.html#how-to-use-platforms-today">platform
mappings</a>
to manage Android / iOS integration. We’ll need help from project
owners to ensure we don’t break them.</li>
<li>Lesson learned: global rollout is an involved cross-team effort.</li>
</ul>
<p>User-defined configuration:</p>
<ul>
<li><a href="https://docs.bazel.build/versions/master/skylark/config.html">Starlark build
configuration</a>
is v1.0 feature-complete: the core API is working and stable.</li>
<li>Some features will continue to need bake-in time
(<a href="https://github.com/bazelbuild/bazel/issues/10499">example</a>). We’ll
prioritize these as individual feature requests vs. a larger overarching effort.</li>
</ul>
<p>Efficiency:</p>
<ul>
<li>Due to an unanticipated temporary developer squeeze, this work stalled in
Q4 to support basic maintenance (API bug fixes, cquery support, etc.).</li>
<li>As of 2020 the squeeze is over. Trimming and caching efforts will ramp up in
earnest starting Q1.</li>
</ul>
<p>Collaboration:</p>
<ul>
<li>Extensive collaboration with <a href="https://github.com/AustinSchuh">Austin Schuh</a> produced <a href="https://docs.google.com/document/d/12n5QNHmFSkuh5yAbdEex64ot4hRgR-moL1zRimU7wHQ/edit?ts=5dfbe2fe">platform-incompatible target skipping</a> design. Implementation help wanted!</li>
</ul>
<h2 id="goal">Goal<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#goal" aria-label="Anchor link for: goal" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h2>
<p><strong><code class="highlighter-rouge">$ bazel build :all</code></strong> <strong><em>just works</em></strong>, for whatever platform(s) you build for.</p>
<ul>
<li>Targets “know” how to build themselves. For example, an <code class="highlighter-rouge">android_binary</code> automatically chooses the right SDK.</li>
<li>Builds don’t require command-line flags.</li>
<li>Any target can be built with any other. For example, a binary’s <em>Mac</em> and <em>Linux</em> versions can be built in the same command.</li>
<li>Dependencies can build differently than their parents. For example, a test builds helper binaries without debug symbols.</li>
<li>All rule logic and related flags are user-defined. Nothing requires a Bazel release.</li>
<li>Builds can target any platform or any mix of platforms. Nothing requires a Bazel release.</li>
<li>These features scale well for large builds.</li>
</ul>
<h2 id="roadmap">Roadmap<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#roadmap" aria-label="Anchor link for: roadmap" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h2>
<p>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 <a href="https://docs.bazel.build/versions/master/backward-compatibility.html#incompatible-changes-and-migration-recipes">incompatible
flag</a>,
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.</p>
<h3 id="platforms">Platforms<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#platforms" aria-label="Anchor link for: platforms" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h3>
<p>Also see the <a href="http://localhost:12345/roadmaps/2019/platforms.html">Platforms Roadmap</a> for detailed priorities.</p>
<div class="padbottom"></div>
<p><span class="etabox">Jun 2019</span><strong>C++ rules fully support
<a href="https://docs.bazel.build/versions/master/platforms.html">platforms</a> and
<a href="https://docs.bazel.build/versions/master/toolchains.html">toolchains</a></strong>
<span class="inprogressstatus">PARTIALLY DONE</span> (<a href="https://github.com/bazelbuild/bazel/issues/6516">#6516</a>)</p>
<ul>
<li>This gives them first-class Starlark support, <code class="highlighter-rouge">select()</code> <a href="https://docs.bazel.build/versions/master/be/general.html#config_setting.constraint_values">on
platforms</a>,
and configuration via
<a href="https://docs.bazel.build/versions/master/platforms.html#specifying-a-platform-for-a-build">--platforms</a></li>
<li>Sets best practices for adding platform and toolchain support to other rules</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jun 2019</span><strong>Java rules fully support
<a href="https://docs.bazel.build/versions/master/platforms.html">platforms</a> and
<a href="https://docs.bazel.build/versions/master/toolchains.html">toolchains</a></strong>
<span class="inprogressstatus">PARTIALLY DONE</span> (<a href="https://github.com/bazelbuild/bazel/issues/6521">#6521</a>)</p>
<div class="padbottom"></div>
<p><span class="etabox">Jun 2019</span><strong>There’s <em>one</em> standard way to select platforms
at the command line</strong>
<a href="https://bazel.build/roadmaps/platforms.html#replace---cpu-and---host_cpu-flags">see status</a> (<a href="https://github.com/bazelbuild/bazel/issues/6518">#6518</a>)</p>
<ul>
<li><code class="highlighter-rouge">$ bazel build //a:myrule --platforms=@bazel_tools/platforms:mac</code></li>
<li><code class="highlighter-rouge">--cpu</code>, <code class="highlighter-rouge">--host_cpu</code>, <code class="highlighter-rouge">--crosstool_top</code>, <code class="highlighter-rouge">--javabase</code>, <code class="highlighter-rouge">--apple_crosstool_top</code>, etc. are deprecated</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jun 2019</span><strong>Legacy flags like <code class="highlighter-rouge">--cpu</code> automatically set <code class="highlighter-rouge">--platform</code> while the former are removed</strong>
<span class="donestatus">DONE</span> (<a href="https://docs.bazel.build/versions/master/platforms-intro.html#platform-mappings">w/ opt
in</a>)
(<a href="https://github.com/bazelbuild/bazel/issues/6426">#6426</a>)</p>
<ul>
<li>This prevents <code class="highlighter-rouge">.bazelrc</code>s, <code class="highlighter-rouge">select()</code>s on <code class="highlighter-rouge">--cpu</code>, and legacy command lines from breaking as rules adopt platforms</li>
<li>Rules can get platforms’ benefits without having to wait on migration</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Aug 2019</span><strong>All supported Bazel rules support
<a href="https://docs.bazel.build/versions/master/platforms.html">platforms</a> and
<a href="https://docs.bazel.build/versions/master/toolchains.html">toolchains</a></strong>
<span class="inprogressstatus">DONE FOR PYTHON</span></p>
<ul>
<li>Python: <a href="https://github.com/bazelbuild/bazel/issues/7375">#7375</a></li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">late 2019</span><strong>Flagless multiplatform builds
(unoptimized)</strong>
<span class="notstartedstatus">NOT STARTED</span> (<a href="https://github.com/bazelbuild/bazel/issues/6519">#6519</a>)</p>
<ul>
<li>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">cat </span>a/BUILD
cc_binary<span class="o">(</span>name <span class="o">=</span> <span class="s2">"app_for_linux"</span>, platforms <span class="o">=</span> <span class="o">[</span><span class="s2">"//platforms:linux"</span><span class="o">])</span>
cc_binary<span class="o">(</span>name <span class="o">=</span> <span class="s2">"app_for_mac"</span>, platforms <span class="o">=</span> <span class="o">[</span><span class="s2">"//platforms:mac"</span><span class="o">])</span>
<span class="nv">$ </span>bazel build //a:all <span class="c"># No command line flags!</span>
</code></pre></div> </div>
</li>
<li><em>Unoptimized</em> means <a href="http://localhost:12345/roadmaps/2019/configuration.html#efficiency">memory and performance</a> issues may not be resolved</li>
</ul>
<h3 id="user-defined-build-settings">User-Defined Build Settings<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#user-defined-build-settings" aria-label="Anchor link for: user defined build settings" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h3>
<p>See <a href="https://docs.google.com/document/d/1vc8v-kXjvgZOdQdnxPTaV0rrLxtP2XwnD2tAZlYJOqw/edit?usp=sharing">Starlark Build Configuration</a> for in-depth motivation and design.</p>
<div class="padbottom"></div>
<p><span class="etabox">Mar 2019</span><strong>Starlark supports custom configuration transitions</strong>
<span class="donestatus">DONE</span> (<a href="http://github.com/bazelbuild/bazel/issues/5574#issuecomment-458349702">#5574</a>)</p>
<ul>
<li>Rule designers can have rules change their flags or their dependencies’ flags</li>
<li>This may have <a href="http://localhost:12345/roadmaps/2019/configuration.html#efficiency">memory and performance</a> consequences</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>Starlark supports <a href="https://docs.google.com/document/d/1VIRx06cZB4wLU-ASq1XKFHmx67yfHtNOCbCempaPeaA/edit">fancy</a> transitions</strong>
<span class="donestatus">DONE</span> (<a href="http://github.com/bazelbuild/bazel/issues/5574">#5574</a>)</p>
<ul>
<li>Transitions can read a rule’s attributes to determine what to change</li>
<li>Transitions on a rule can read attributes with <code class="highlighter-rouge">select()</code></li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>Starlark supports user-defined build settings</strong>
<span class="donestatus">DONE</span> (<a href="http://github.com/bazelbuild/bazel/issues/5577">#5577</a>)</p>
<ul>
<li>
<p>A standard API defines how to declare custom settings. This consolidates <a href="https://docs.bazel.build/versions/master/command-line-reference.html">command
line
flags</a>,
<a href="https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java#L246">“secret”
flags</a>,
<a href="https://github.com/bazelbuild/bazel/blob/b3cf83cd20f30d77e6768de651a3e652f86d6f78/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java#L423">–define</a>,
<a href="https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java;l=835?q=file:BuildConfiguration.java">–features</a>,
and <a href="https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107">feature
flags</a>).</p>
</li>
<li>All hard-coded Bazel flags can be migrated to this API. Actual migration may
not have begun.</li>
<li>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 <a href="https://docs.bazel.build/versions/master/platforms.html#specifying-a-platform-for-a-build"><code class="highlighter-rouge">--platforms</code></a> and <a href="https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107">feature
flags</a>.</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>All native Bazel rules can be implemented
in Starlark</strong>
<span class="donestatus">DONE</span> (<a href="http://github.com/bazelbuild/bazel/issues/5578">#5578</a>)</p>
<ul>
<li>This automatically comes out of user-defined build settings and custom transitions</li>
</ul>
<h3 id="efficiency">Efficiency<a class="anchorjs-link " href="http://localhost:12345/roadmaps/2019/configuration.html#efficiency" aria-label="Anchor link for: efficiency" data-anchorjs-icon="" style="font-family: anchorjs-icons; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; padding-left: 0.375em;"></a></h3>
<div class="padbottom"></div>
<p><span class="etabox">May 2019</span><strong>An experimental Bazel mode automatically
shrinks build graphs</strong>
<span class="donestatus">DONE</span> (<a href="https://github.com/bazelbuild/bazel/issues/6524">#6524</a>)</p>
<ul>
<li>No rule builds twice when unrelated flags change</li>
<li>Building the <em>Mac</em> and <em>Linux</em> versions of a binary at the same time doesn’t double the build graph</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>This mode automatically optimizes <a href="https://github.com/bazelbuild/bazel/issues/5579">test
trimming</a> and <a href="https://github.com/bazelbuild/bazel/blob/d6a98282e229b311dd56e65b72003197120f299a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java#L3107">feature flags</a></strong>
<span class="inprogressstatus">PARTIALLY DONE</span> (<a href="https://github.com/bazelbuild/bazel/issues/6524">#6524</a>)</p>
<ul>
<li>No rule builds twice when unrelated flags change</li>
<li>Building the <em>Mac</em> and <em>Linux</em> versions of a binary at the same time doesn’t double the build graph</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>An experimental Bazel mode makes identical actions unique</strong>
<span class="inprogressstatus">PARTIALLY DONE</span> (<a href="https://github.com/bazelbuild/bazel/issues/6526">#6526</a>)</p>
<ul>
<li>Stops different actions from writing to the same path and overwriting each other’s output</li>
<li>Improves multiplatform build time and remoe execution caching</li>
<li>Makes pure Java compilation cacehable across different CPUs.</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>Projects can selectively opt into automatic shareable actions</strong>
<span class="notstartedstatus">NOT STARTED</span> (<a href="https://github.com/bazelbuild/bazel/issues/6526">#6526</a>)</p>
<ul>
<li>Exposes the benefits of experimental unique actions while recognizing complete migration may take time</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>Documentation explains how to use
<a href="http://localhost:12345/roadmaps/2019/configuration.html#user-defined-build-settings">configuration transitions</a> efficiently</strong>
<span class="notstartedstatus">NOT STARTED</span> (<a href="https://github.com/bazelbuild/bazel/issues/6525">#6525</a>)</p>
<ul>
<li>Explains why builds may use more memory and be slower</li>
<li>Explains how to minimize this and make informed use of these features</li>
<li>Points to tools for profiling your build</li>
<li>Explains ongoing work to automatically improve efficiency</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">late 2019</span><strong>Bazel automatically shrinks graphs with
mixed build settings</strong>
<span class="notstartedstatus">NOT STARTED</span> (<a href="https://github.com/bazelbuild/bazel/issues/6524">#6524</a>)</p>
<ul>
<li>Productionizes experimental build graph shrinking</li>
</ul>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-sm-4 col-md-2">
<p>About</p>
<ul class="list-unstyled">
<li><a href="https://github.com/bazelbuild/bazel/wiki/Bazel-Users">Who's Using Bazel?</a></li>
<li><a href="http://localhost:12345/roadmap.html">Roadmap</a></li>
<li><a href="http://localhost:12345/contributing.html">Contribute</a></li>
<li><a href="http://localhost:12345/governance.html">Governance Plan</a></li>
<li><a href="https://policies.google.com/privacy">Privacy Policy</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-2">
<p>Support</p>
<ul class="list-unstyled">
<li><a href="https://docs.bazel.build/">Documentation</a></li>
<li><a href="http://localhost:12345/faq.html">FAQ</a></li>
<li><a href="https://github.com/bazelbuild/bazel/issues">Issue Tracker</a></li>
<li><a href="http://localhost:12345/experts.html">Community Experts</a></li>
<li><a href="http://stackoverflow.com/questions/tagged/bazel">Stack Overflow</a></li>
<li><a href="http://localhost:12345/support.html">Support Policy</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-2">
<p>Stay Connected</p>
<ul class="list-unstyled">
<li><a href="https://twitter.com/bazelbuild">Twitter</a></li>
<li><a href="https://blog.bazel.build/">Blog</a></li>
<li><a href="https://github.com/bazelbuild/bazel">GitHub</a></li>
<li><a href="https://groups.google.com/forum/#!forum/bazel-discuss">Discussion group</a></li>
<li><a href="https://slack.bazel.build/">Slack</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<p class="text-muted">© 2020 Google</p>
</div>
</div>
</div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="./Bazel Configurability 2019 Roadmap - Bazel_files/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="./Bazel Configurability 2019 Roadmap - Bazel_files/bootstrap.min.js"></script>
<!-- Anchor JS -->
<script type="text/javascript" src="./Bazel Configurability 2019 Roadmap - Bazel_files/anchor.min.js"></script>
<script>
// Automatically add anchors and links to all header elements that don't already have them.
anchors.add();
</script>
<script>
var shiftWindow = function() {
if (location.hash.length !== 0) {
window.scrollBy(0, -50);
}
};
window.addEventListener("hashchange", shiftWindow);
var highlightCurrentSidebarNav = function() {
var href = location.pathname;
var item = $('#sidebar-nav [href$="' + href + '"]');
if (item) {
var li = item.parent();
li.addClass("active");
if (li.parent() && li.parent().is("ul")) {
do {
var ul = li.parent();
if (ul.hasClass("collapse")) {
ul.collapse("show");
}
li = ul.parent();
} while (li && li.is("li"));
}
}
};
$(document).ready(function() {
// Scroll to anchor of location hash, adjusted for fixed navbar.
window.setTimeout(function() {
shiftWindow();
}, 1);
// Flip the caret when submenu toggles are clicked.
$(".sidebar-submenu").on("show.bs.collapse", function() {
var toggle = $('[href$="#' + $(this).attr('id') + '"]');
if (toggle) {
toggle.addClass("dropup");
}
});
$(".sidebar-submenu").on("hide.bs.collapse", function() {
var toggle = $('[href$="#' + $(this).attr('id') + '"]');
if (toggle) {
toggle.removeClass("dropup");
}
});
// Highlight the current page on the sidebar nav.
highlightCurrentSidebarNav();
});
</script>
<!-- Google Analytics tracking code -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61082125-1', 'auto');
ga('send', 'pageview');
</script>
</body></html>