-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBazel Configurability Roadmap - Bazel.html
475 lines (408 loc) · 24.1 KB
/
Bazel Configurability 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
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost:12345/roadmaps/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 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/configuration.html">
<!-- Webfont -->
<style class="anchorjs"></style><link href="./Bazel Configurability 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="./Bazel Configurability Roadmap - Bazel_files/bootstrap.min.css" rel="stylesheet">
<link href="./Bazel Configurability Roadmap - Bazel_files/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="./Bazel Configurability Roadmap - Bazel_files/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 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/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/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/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/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-2020-roadmap">Bazel Configurability 2020 Roadmap<a class="anchorjs-link " href="http://localhost:12345/roadmaps/configuration.html#bazel-configurability-2020-roadmap" aria-label="Anchor link for: bazel configurability 2020 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>
<h2 id="previous-roadmaps">Previous Roadmaps<a class="anchorjs-link " href="http://localhost:12345/roadmaps/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/2019/configuration.html">2019</a> (w/ EOY review)</li>
<li><a href="http://localhost:12345/roadmaps/2018/configuration.html">2018</a></li>
</ul>
<h2 id="goal">Goal<a class="anchorjs-link " href="http://localhost:12345/roadmaps/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><code class="highlighter-rouge">$ bazel build //:all</code> <em>just works</em>, for any project and any targeted platforms.</p>
<ul>
<li>Builds don’t require command-line flags.</li>
<li>Each target automatically uses correct settings (e.g. <code class="highlighter-rouge">android_binary</code> uses the right NDK).</li>
<li>It’s easy to target multiple platforms.</li>
<li>Dependencies can be configured differently than their parents.</li>
<li>Builds scale well, particularly w.r.t graph size and action caching.</li>
</ul>
<p>We also support
<a href="https://docs.bazel.build/versions/master/cquery.html"><code class="highlighter-rouge">cquery</code></a>, <a href="https://docs.bazel.build/versions/master/skylark/config.html"><code class="highlighter-rouge">Starlark
configuration</code></a>,
and
<a href="https://docs.bazel.build/versions/master/configurable-attributes.html"><code class="highlighter-rouge">select()</code></a>.</p>
<h2 id="roadmap">Roadmap<a class="anchorjs-link " href="http://localhost:12345/roadmaps/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 the flag has to
be manually set. ETAs will change, but we’ll keep them refreshed as we best
understand them.</p>
<h3 id="platforms">Platforms<a class="anchorjs-link " href="http://localhost:12345/roadmaps/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/platforms.html">Platforms Roadmap</a> for detailed priorities.</p>
<div class="padbottom"></div>
<p><span class="etabox">Q1 2020</span><strong>Toolchains can build for both target and
exec platforms</strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/10523">#10523</a>)</p>
<div class="padbottom"></div>
<p><span class="etabox">Q2 2020</span><strong>Builds support <a href="https://docs.google.com/document/d/1U9HzdDmtRnm244CaRM6JV-q2408mbNODAMewcGjnnbM/">multiple execution
platforms</a></strong>
<span class="inprogressstatus">IN PROGRESS</span></p>
<div class="padbottom"></div>
<p><span class="etabox">mid 2020</span><strong>C++ rules use the new <a href="https://docs.bazel.build/versions/master/platforms-intro.html">platforms
API</a></strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/6516">#6516</a>)</p>
<ul>
<li>Already <a href="https://github.com/bazelbuild/bazel/issues/7260">ready</a> but need
<a href="https://docs.bazel.build/versions/master/platforms-intro.html#how-to-use-platforms-today">platform
mappings</a>
to <a href="http://localhost:12345/roadmaps/507230303">support</a> Android/IOS projects</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">mid 2020</span><strong>Java rules use the new <a href="https://docs.bazel.build/versions/master/platforms-intro.html">platforms
API</a></strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/6521">#6521</a>)</p>
<ul>
<li>Same as C++ but also need <a href="https://github.com/bazelbuild/rules_java/pull/8">platform definitions</a></li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">late 2020</span><strong>Help Android, iOS rule owners support the
new <a href="https://docs.bazel.build/versions/master/platforms-intro.html">platforms
API</a></strong>
<span class="notstartedstatus">NOT STARTED</span></p>
<div class="padbottom"></div>
<p><span class="etabox">blocked</span><strong><code class="highlighter-rouge">bazel build //:all</code> automatically skips
platform-incompatible targets</strong>
<span class="inprogressstatus">DESIGNED</span>
(<a href="https://docs.google.com/document/d/12n5QNHmFSkuh5yAbdEex64ot4hRgR-moL1zRimU7wHQ/edit?ts=5dfbe2fe">design</a>)</p>
<ul>
<li>Design ready, implementation help needed</li>
</ul>
<h3 id="efficiency">Efficiency<a class="anchorjs-link " href="http://localhost:12345/roadmaps/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">Q1 2020</span><strong>Faster incremental tests on <code class="highlighter-rouge">--test_*</code>
changes</strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/6842">#6842</a>)</p>
<ul>
<li>Specifically, changing <code class="highlighter-rouge">--test_*</code> doesn’t redo the analysis phase</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Q1 2020</span><strong>A diganostic tool explains performance
impact of configuration APIs</strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/10613">#10613</a>)</p>
<ul>
<li>For example, how does a
<a href="https://docs.bazel.build/versions/master/skylark/config.html#user-defined-transitions">transition</a>
affect the configured target graph, which targets are responsible,
and how could trimming help?</li>
<li>Also quantifies action caching inefficiency</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">mid 2020</span><strong>An experimental Bazel mode automatically
“trims” build graphs</strong>
<span class="notstartedstatus">NOT STARTED</span> (<a href="https://github.com/bazelbuild/bazel/issues/6524">#6524</a>)</p>
<ul>
<li>e.g. C++ rules don’t re-analyze because of Java flag changes</li>
<li>Building a binary’s <em>Mac</em> and <em>Linux</em> versions simultaneously doesn’t double the build graph</li>
</ul>
<div class="padbottom"></div>
<p><span class="etabox">Jul 2019</span><strong>An experimental Bazel mode caches
cross-platform Java compilation</strong>
<span class="inprogressstatus">IN PROGRESS</span> (<a href="https://github.com/bazelbuild/bazel/issues/6526">#6526</a>)</p>
<ul>
<li>Improves multiplatform build speed</li>
<li>Proof of concepts a <a href="https://docs.google.com/document/d/17snvmic26-QdGuwVw55Gl0oOufw9sCVuOAvHqGZJFr4/edit">more general
design</a>
that guarantees ideal caching for <em>all</em> actions</li>
</ul>
<h3 id="features">Features<a class="anchorjs-link " href="http://localhost:12345/roadmaps/configuration.html#features" aria-label="Anchor link for: features" 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">Mar 2020</span><strong>Projects can declare and compliance-check software
licenses</strong> (<a href="https://github.com/bazelbuild/bazel/issues/7444">#7444</a>)
<span class="inprogressstatus">in progress</span></p>
<h3 id="documentation">Documentation<a class="anchorjs-link " href="http://localhost:12345/roadmaps/configuration.html#documentation" aria-label="Anchor link for: documentation" 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">Jun 2020</span><strong>Guide to designing efficient multiplatform builds</strong>
<span class="notstartedstatus">NOT STARTED</span></p>
</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 Roadmap - Bazel_files/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="./Bazel Configurability Roadmap - Bazel_files/bootstrap.min.js"></script>
<!-- Anchor JS -->
<script type="text/javascript" src="./Bazel Configurability 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>