aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/skylark
diff options
context:
space:
mode:
authorGravatar dzc <dzc@google.com>2017-05-31 20:37:50 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-06-01 14:07:52 +0200
commit22b85a2a3c79c6f3aef1e0a61e485bb135be4551 (patch)
tree8235e8237b171ced2fa9f39f054f9a7d808c0771 /site/docs/skylark
parent40d64293b57f0d62bb15599c730f38484b91d3f0 (diff)
Restructure site/ directory into docs/ which only contains Bazel documentation.
The new docs/ directory in the bazel source tree will only contain the Bazel docs site, which is hosted at docs.bazel.build. This change deletes the marketing site and blog, which have been migrated to the bazel-website and bazel-blog GitHub repositories respectively. This change also updates the serve-docs.sh and ci/build.sh under scripts/ in preparation for publishing the docs site. Note that to help make reviews more manageable, this change is limited to moving files to their new locations. Here are the follow-up changes: * Update all links in docs to remove versions/master in paths and to add correct bazel.build subdomain when linking to pages on the marketing site or the blog. * Set up versioned directories on GCS bucket and add tooling for versioning docs This change is also coordinated with https://bazel-review.googlesource.com/c/11568/ to have the PublishSite job publish to docs.bazel.build rather than www.bazel.build. Issue #2397 RELNOTES: None PiperOrigin-RevId: 157612651
Diffstat (limited to 'site/docs/skylark')
-rw-r--r--site/docs/skylark/aspects.md191
-rw-r--r--site/docs/skylark/build-graph-aspect.svg4
-rw-r--r--site/docs/skylark/build-graph-aspects.pngbin0 -> 25300 bytes
-rw-r--r--site/docs/skylark/build-graph.pngbin0 -> 11582 bytes
-rw-r--r--site/docs/skylark/build-graph.svg4
-rw-r--r--site/docs/skylark/build-style.md114
-rw-r--r--site/docs/skylark/bzl-style.md52
-rw-r--r--site/docs/skylark/concepts.md220
-rw-r--r--site/docs/skylark/cookbook.md950
-rw-r--r--site/docs/skylark/deploying.md144
-rw-r--r--site/docs/skylark/depsets.md401
-rw-r--r--site/docs/skylark/errors/read-only-variable.md30
-rw-r--r--site/docs/skylark/index.md17
-rw-r--r--site/docs/skylark/language.md149
-rw-r--r--site/docs/skylark/macros.md156
-rw-r--r--site/docs/skylark/repository_rules.md113
-rw-r--r--site/docs/skylark/rules.md596
17 files changed, 3121 insertions, 20 deletions
diff --git a/site/docs/skylark/aspects.md b/site/docs/skylark/aspects.md
index ba524f5cf6..5dcaf1bedf 100644
--- a/site/docs/skylark/aspects.md
+++ b/site/docs/skylark/aspects.md
@@ -1,4 +1,191 @@
---
-layout: redirect
-redirect: docs/skylark/aspects.html
+layout: documentation
+title: Aspects
---
+# Aspects
+
+**Status: Experimental**. We may make breaking changes to the API, but we will
+ help you update your code.
+
+Aspects allow augmenting build dependency graphs with additional information
+and actions. Some typical scenarios when aspects can be useful:
+
+* IDEs that integrate Bazel can use aspects to collect information about the
+ project
+* Code generation tools can leverage aspects to execute on their inputs in
+ "target-agnostic" manner. As an example, BUILD files can specify a hierarchy
+ of [protobuf](https://developers.google.com/protocol-buffers/) library
+ definitions, and language-specific rules can use aspects to attach
+ actions generating protobuf support code for a particular language
+
+## Aspect basics
+
+Bazel BUILD files provide a description of a project’s source code: what source
+files are part of the project, what artifacts (_targets_) should be built from
+those files, what the dependencies between those files are, etc. Bazel uses
+this information to perform a build, that is, it figures out the set of actions
+needed to produce the artifacts (such as running compiler or linker) and
+executes those actions. Bazel accomplishes this by constructing a _dependency
+graph_ between targets and visiting this graph to collect those actions.
+
+Consider the following BUILD file:
+
+```python
+java_library(name = 'W', ...)
+java_library(name = 'Y', deps = [':W'], ...)
+java_library(name = 'Z', deps = [':W'], ...)
+java_library(name = 'Q', ...)
+java_library(name = 'T', deps = [':Q'], ...)
+java_library(name = 'X', deps = [':Y',':Z'], runtime_deps = [':T'], ...)
+```
+
+This BUILD file defines a dependency graph shown in Fig 1.
+
+<img src="build-graph.png" alt="Build Graph" width="250px" />
+
+Bazel analyzes this dependency graph by calling implementations of
+[rules](rules.md) (in this case "java_library" starting from leaves of
+the dependency graph). These implementations generate actions that build
+artifacts (such as Jar files), and provide information (such as locations
+and names of those artifacts) to their dependencies in providers that
+they return. Their dependencies can access those providers through the
+[Target object](lib/Target.html). In other words, every target
+defined in the BUILD file generates a node in the dependency graph, and
+the appropriate rule implementation function is called for every node.
+
+Aspects are similar to rules in that they have an implementation function that
+generates actions and returns providers. However, their power comes from
+the way the dependency graph is built for them. An aspect has an implementation
+and a list of all attributes it propagates along. Consider an aspect A that
+propagates along attributes named "deps". This aspect can be applied to
+a target X, yielding an aspect application node A(X). During its application,
+aspect A is applied recursively to all targets that X refers to in its "deps"
+attribute (all attributes in A's propagation list). Thus a single act of
+applying aspect A to a target X yields a "shadow graph" of the original
+dependency graph of targets (see Fig.2).
+
+![Build Graph with Aspect](build-graph-aspects.png)
+
+The only edges that are shadowed are the edges along the attributes in
+the propagation set, thus the `runtime_deps` edge is not shadowed in this
+example. An aspect implementation function is then invoked on all nodes in
+the shadow graph similar to how rule implementations are invoked on the nodes
+of the original graph.
+
+## Defining aspects
+
+Aspect definitions are similiar to rule definitions. Let's take a look at
+the example:
+
+```python
+metal_proto_aspect = aspect(implementation = _metal_proto_aspect_impl,
+ attr_aspects = ["deps"],
+ attrs = {
+ "_protoc" : attr.label(
+ default=Label("//tools:metal_protoc"),
+ executable = True
+ )
+ }
+)
+```
+
+Just like a rule, an aspect has an implementation function. ``attr_aspects``
+specify the aspect's propagation set: a list of attributes of rules along which
+the aspect propagates.
+
+``attrs`` defines a set of attributes for aspects. Aspects are only allowed
+to have private attributes of types ``label`` or ``label_list``. Attributes
+can be used to specify dependencies on tools or libraries that are needed
+for actions generated by aspects.
+
+### Implementation functions
+
+Aspect implementation functions are similiar to the rule implementation
+functions. They return [providers](rules.md#providers), can generate
+[actions](rules.md#actions) and take two arguments:
+
+* `target`: the [target](lib/Target.html) the aspect is being applied to.
+* `ctx`: [`ctx`](lib/ctx.html) object that can be used to access attributes and
+ generate outputs and actions.
+
+Example:
+
+```python
+def _metal_proto_aspect_impl(target, ctx):
+ # For every `src` in proto_library, generate an output file
+ proto_sources = [f for src in ctx.rule.attr.srcs
+ for f in src.files]
+ outputs = [ctx.new_file(f.short_path + ".metal")
+ for f in proto_sources]
+ ctx.action(
+ executable = ctx.executable._protoc,
+ argument = ...
+ inputs = proto_sources
+ outputs = outputs)
+ transitive_outputs = depset(outputs)
+ for dep in ctx.rule.attr.deps:
+ transitive_outputs = transitive_outputs | dep.metal_proto.transitive_outputs
+ return struct(
+ metal_proto = struct(direct_outputs = outputs,
+ transitive_outputs = transitive_outputs))
+```
+
+The implementation function can access the attributes of the target rule via
+[`ctx.rule.attr`](lib/ctx.html#rule). It can examine providers that are
+provided by the target to which it is applied (via the `target` argument).
+
+Just like a rule implementation function, an aspect implementation function
+returns a struct of providers that are accessible to its dependencies.
+
+* The set of providers for an aspect application A(X) is the union of providers
+ that come from the implementation of a rule for target X and from
+ the implementation of aspect A. It is an error if a target and an aspect that
+ is applied to it each provide a provider with the same name.
+* For the aspect implementation, the values of attributes along which
+ the aspect is propagated (from the `attr_aspect` list) are replaced with
+ the results of an application of the aspect to them. For example, if target
+ X has Y and Z in its deps, `ctx.rule.attr.deps` for A(X) will be [A(Y), A(Z)].
+ In the `_metal_proto_aspect_impl` function above, ctx.rule.attr.deps will be
+ Target objects that are the results of applying the aspect to the 'deps'
+ of the original target to which the aspect has been applied.
+ That allows the aspect to examine `metal_proto` provider on them.
+
+
+## Applying aspects
+
+Aspect propagation can be initiated either from a rule or from the command line.
+
+### Applying aspects to rule attributes
+
+Rules can specify that they want to apply aspects to their dependencies.
+The aspects to be applied to a particular attribute can be specified
+using the `aspects` parameter to `attr.label` or `attr.label_list` function:
+
+```python
+metal_proto_library = rule(implementation = _impl,
+ attrs = {
+ 'proto_deps' : attr.label_list(aspects = [metal_proto_aspect]),
+ },
+)
+```
+
+If a rule specifies an aspect on its attributes, the values of that attribute
+will be replaced by the result of aspect application to them (similar to
+what happens during aspect propagation). Thus implementation of
+`metal_proto_library` will have access to `metal_proto` providers
+on the target objects representing its `proto_deps` attribute values.
+
+### Applying aspects from command line.
+
+Aspects can also be applied on the command line, using the `--aspects` flag:
+
+
+```
+bazel build //java/com/company/example:main \
+ --aspects path/to/extension.bzl%metal_proto_aspect
+```
+
+`--aspects` flag takes one argument, which is a specification of the aspect in
+the format `<extension file path>%<aspect top-level name>`.
+
+
diff --git a/site/docs/skylark/build-graph-aspect.svg b/site/docs/skylark/build-graph-aspect.svg
new file mode 100644
index 0000000000..508a916bd3
--- /dev/null
+++ b/site/docs/skylark/build-graph-aspect.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" standalone="yes"?>
+
+<svg version="1.1" viewBox="0.0 0.0 960.0 720.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="p.0"><path d="m0 0l960.0 0l0 720.0l-960.0 0l0 -720.0z" clip-rule="nonzero"></path></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l960.0 0l0 720.0l-960.0 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m110.0 326.28873l0 0c0 -8.288635 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192383 23.496063 15.007874l0 0c0 8.288605 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.719269 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m110.0 326.28873l0 0c0 -8.288635 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192383 23.496063 15.007874l0 0c0 8.288605 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.719269 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m127.3524 333.2087l5.265625 -7.09375l-4.640625 -6.5l2.140625 0l2.46875 3.484375q0.78125 1.078125 1.09375 1.671875q0.453125 -0.75 1.078125 -1.546875l2.734375 -3.609375l1.96875 0l-4.78125 6.40625l5.140625 7.1875l-2.21875 0l-3.421875 -4.859375q-0.296875 -0.40625 -0.59375 -0.90625q-0.453125 0.75 -0.65625 1.03125l-3.40625 4.734375l-2.171875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m79.0 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m79.0 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m101.57115 147.92787l0 -5.765625l-5.234375 -7.828125l2.1875 0l2.671875 4.09375q0.75 1.15625 1.390625 2.296875q0.609375 -1.0625 1.484375 -2.40625l2.625 -3.984375l2.109375 0l-5.4375 7.828125l0 5.765625l-1.796875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m163.51181 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m163.51181 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m181.68489 147.92787l0 -1.671875l6.96875 -8.703125q0.75 -0.9375 1.421875 -1.625l-7.59375 0l0 -1.59375l9.734375 0l0 1.59375l-7.625 9.4375l-0.828125 0.953125l8.6875 0l0 1.609375l-10.765625 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m0 141.00787l0 0c0 -8.28862 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m0 141.00787l0 0c0 -8.28862 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m22.719948 147.92787l0 -12.0l-4.46875 0l0 -1.59375l10.765625 0l0 1.59375l-4.5 0l0 12.0l-1.796875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m110.0 19.007874l0 0c0 -8.288619 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m110.0 19.007874l0 0c0 -8.288619 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m128.53548 25.927872l-3.6093674 -13.59375l1.84375 0l2.0624924 8.90625q0.34375 1.40625 0.578125 2.78125q0.515625 -2.171875 0.609375 -2.515625l2.59375 -9.171875l2.171875 0l1.953125 6.875q0.734375 2.5625 1.046875 4.8125q0.265625 -1.28125 0.6875 -2.953125l2.125 -8.734375l1.8125 0l-3.734375 13.59375l-1.734375 0l-2.859375 -10.359375q-0.359375 -1.296875 -0.421875 -1.59375q-0.21875 0.9375 -0.40625 1.59375l-2.890625 10.359375l-1.828125 0z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m133.49606 311.28085l-30.992126 -155.2756" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m133.49606 311.28085l-29.817726 -149.39166" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m105.29812 161.56589l-2.5080414 -4.127014l-0.7315216 4.7736206z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m133.49606 311.28085l53.51181 -155.2756" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m133.49606 311.28085l51.5569 -149.60301" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m186.61456 162.216l-0.08300781 -4.8286285l-3.0401917 3.752304z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m102.49606 126.0l30.992126 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m102.49606 126.0l29.076675 -86.313965" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m133.13803 40.21334l-0.11654663 -4.8279343l-3.0140533 3.7733269z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m187.00787 126.0l-53.51181 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m187.00787 126.0l-50.495102 -86.81353" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m137.94055 38.356003l-3.7094727 -3.0923195l0.85391235 4.75325z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m110.0 326.28873l-86.48819 -170.26773" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m110.0 326.28873l-83.77092 -164.9183" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m27.701717 160.6224l-3.5278435 -3.2980194l0.5825653 4.7940826z" fill-rule="evenodd"></path><path fill="#cfe2f3" d="m0 19.007874l0 0c0 -8.288619 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m0 19.007874l0 0c0 -8.288619 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m28.005974 24.474747q1.265625 0.859375 2.3125 1.265625l-0.53125 1.25q-1.453125 -0.53125 -2.921875 -1.671875q-1.5 0.84375 -3.328125 0.84375q-1.84375 0 -3.359375 -0.890625q-1.5 -0.890625 -2.3125 -2.5q-0.8125 -1.625 -0.8125 -3.640625q0 -2.015625 0.8125 -3.65625q0.828125 -1.65625 2.328125 -2.515625q1.515625 -0.875 3.375 -0.875q1.890625 0 3.390625 0.90625q1.515625 0.890625 2.3125 2.5q0.796875 1.609375 0.796875 3.625q0 1.6875 -0.515625 3.03125q-0.515625 1.328125 -1.546875 2.328125zm-3.953125 -2.296875q1.5625 0.421875 2.5625 1.296875q1.59375 -1.453125 1.59375 -4.359375q0 -1.65625 -0.5625 -2.875q-0.5625 -1.234375 -1.640625 -1.921875q-1.078125 -0.6875 -2.421875 -0.6875q-2.015625 0 -3.34375 1.390625q-1.328125 1.375 -1.328125 4.109375q0 2.65625 1.3125 4.078125q1.3125 1.40625 3.359375 1.40625q0.953125 0 1.8125 -0.359375q-0.84375 -0.546875 -1.78125 -0.78125l0.4375 -1.296875z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m23.496063 126.0l0 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m23.496063 126.0l0 -86.0" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m25.147795 40.0l-1.6517315 -4.5380974l-1.6517334 4.5380974z" fill-rule="evenodd"></path><path fill="#ffff00" d="m244.7559 329.46457l0 0c0 -8.288635 20.82051 -15.007874 46.503952 -15.007874l0 0c25.68341 0 46.503937 6.7192383 46.503937 15.007874l0 0c0 8.288605 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.683441 0 -46.503952 -6.719269 -46.503952 -15.007874z" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m244.7559 329.46457l0 0c0 -8.288635 20.82051 -15.007874 46.503952 -15.007874l0 0c25.68341 0 46.503937 6.7192383 46.503937 15.007874l0 0c0 8.288605 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.683441 0 -46.503952 -6.719269 -46.503952 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m272.57236 336.38455l5.234375 -13.59375l1.9375 0l5.5625 13.59375l-2.046875 0l-1.59375 -4.125l-5.6875 0l-1.484375 4.125l-1.921875 0zm3.921875 -5.578125l4.609375 0l-1.40625 -3.78125q-0.65625 -1.703125 -0.96875 -2.8125q-0.265625 1.3125 -0.734375 2.59375l-1.5 4.0zm12.990448 9.578125q-1.375 -1.75 -2.328125 -4.078125q-0.953125 -2.34375 -0.953125 -4.84375q0 -2.21875 0.703125 -4.234375q0.84375 -2.34375 2.578125 -4.671875l1.2030945 0q-1.1249695 1.921875 -1.4843445 2.75q-0.5625 1.28125 -0.890625 2.671875q-0.40625 1.734375 -0.40625 3.484375q0 4.46875 2.7812195 8.921875l-1.2030945 0zm1.8532715 -4.0l5.265625 -7.09375l-4.640625 -6.5l2.140625 0l2.46875 3.484375q0.78125 1.078125 1.09375 1.671875q0.453125 -0.75 1.078125 -1.546875l2.734375 -3.609375l1.96875 0l-4.78125 6.40625l5.140625 7.1875l-2.21875 0l-3.421875 -4.859375q-0.296875 -0.40625 -0.59375 -0.90625q-0.453125 0.75 -0.65625 1.03125l-3.40625 4.734375l-2.171875 0zm14.709198 4.0l-1.1875 0q2.765625 -4.453125 2.765625 -8.921875q0 -1.734375 -0.390625 -3.453125q-0.328125 -1.390625 -0.890625 -2.671875q-0.359375 -0.84375 -1.484375 -2.78125l1.1875 0q1.75 2.328125 2.578125 4.671875q0.71875 2.015625 0.71875 4.234375q0 2.5 -0.96875 4.84375q-0.953125 2.328125 -2.328125 4.078125z" fill-rule="nonzero"></path><path fill="#ffff00" d="m217.57217 216.36745l0 0c0 -8.28862 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192535 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007889 -46.503937 15.007889l0 0c-25.68341 0 -46.503937 -6.719269 -46.503937 -15.007889z" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m217.57217 216.36745l0 0c0 -8.28862 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192535 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007889 -46.503937 15.007889l0 0c-25.68341 0 -46.503937 -6.719269 -46.503937 -15.007889z" fill-rule="nonzero"></path><path fill="#000000" d="m245.38861 223.28745l5.234375 -13.59375l1.9375 0l5.5625 13.59375l-2.046875 0l-1.59375 -4.125l-5.6875 0l-1.484375 4.125l-1.921875 0zm3.921875 -5.578125l4.609375 0l-1.40625 -3.78125q-0.65625 -1.703125 -0.96875 -2.8125q-0.265625 1.3125 -0.734375 2.59375l-1.5 4.0zm12.990448 9.578125q-1.375 -1.75 -2.328125 -4.078125q-0.953125 -2.34375 -0.953125 -4.84375q0 -2.21875 0.703125 -4.234375q0.84375 -2.34375 2.578125 -4.671875l1.203125 0q-1.125 1.921875 -1.484375 2.75q-0.5625 1.28125 -0.890625 2.671875q-0.40625 1.734375 -0.40625 3.484375q0 4.46875 2.78125 8.921875l-1.203125 0zm7.072052 -4.0l0 -5.765625l-5.234375 -7.828125l2.1875 0l2.671875 4.09375q0.75 1.15625 1.390625 2.296875q0.609375 -1.0625 1.484375 -2.40625l2.625 -3.984375l2.109375 0l-5.4375 7.828125l0 5.765625l-1.796875 0zm9.490448 4.0l-1.1875 0q2.765625 -4.453125 2.765625 -8.921875q0 -1.734375 -0.390625 -3.453125q-0.328125 -1.390625 -0.890625 -2.671875q-0.359375 -0.84375 -1.484375 -2.78125l1.1875 0q1.75 2.328125 2.578125 4.671875q0.71875 2.015625 0.71875 4.234375q0 2.5 -0.96875 4.84375q-0.953125 2.328125 -2.328125 4.078125z" fill-rule="nonzero"></path><path fill="#ffff00" d="m372.01575 141.00787l0 0c0 -8.28862 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192535 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.68341 0 -46.503937 -6.7192535 -46.503937 -15.007874z" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m372.01575 141.00787l0 0c0 -8.28862 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192535 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.68341 0 -46.503937 -6.7192535 -46.503937 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m400.356 147.92787l5.234375 -13.59375l1.9375 0l5.5625 13.59375l-2.046875 0l-1.59375 -4.125l-5.6875 0l-1.484375 4.125l-1.921875 0zm3.921875 -5.578125l4.609375 0l-1.40625 -3.78125q-0.65625 -1.703125 -0.96875 -2.8125q-0.265625 1.3125 -0.734375 2.59375l-1.5 4.0zm12.990448 9.578125q-1.375 -1.75 -2.328125 -4.078125q-0.953125 -2.34375 -0.953125 -4.84375q0 -2.21875 0.703125 -4.234375q0.84375 -2.34375 2.578125 -4.671875l1.203125 0q-1.125 1.921875 -1.484375 2.75q-0.5625 1.28125 -0.890625 2.671875q-0.40625 1.734375 -0.40625 3.484375q0 4.46875 2.78125 8.921875l-1.203125 0zm2.150177 -4.0l0 -1.671875l6.96875 -8.703125q0.75 -0.9375 1.421875 -1.625l-7.59375 0l0 -1.59375l9.734375 0l0 1.59375l-7.625 9.4375l-0.828125 0.953125l8.6875 0l0 1.609375l-10.765625 0zm13.364716 4.0l-1.1875 0q2.765625 -4.453125 2.765625 -8.921875q0 -1.734375 -0.390625 -3.453125q-0.328125 -1.390625 -0.890625 -2.671875q-0.359375 -0.84375 -1.484375 -2.78125l1.1875 0q1.75 2.328125 2.578125 4.671875q0.71875 2.015625 0.71875 4.234375q0 2.5 -0.96875 4.84375q-0.953125 2.328125 -2.328125 4.078125z" fill-rule="nonzero"></path><path fill="#ffff00" d="m295.0 19.007874l0 0c0 -8.288619 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192545 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.68341 0 -46.503937 -6.7192535 -46.503937 -15.007874z" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m295.0 19.007874l0 0c0 -8.288619 20.820526 -15.007874 46.503937 -15.007874l0 0c25.68341 0 46.503937 6.7192545 46.503937 15.007874l0 0c0 8.28862 -20.820526 15.007874 -46.503937 15.007874l0 0c-25.68341 0 -46.503937 -6.7192535 -46.503937 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m320.2339 25.927872l5.234375 -13.59375l1.9375 0l5.5625 13.59375l-2.046875 0l-1.59375 -4.125l-5.6875 0l-1.484375 4.125l-1.921875 0zm3.921875 -5.578125l4.609375 0l-1.40625 -3.78125q-0.65625 -1.703125 -0.96875 -2.8125q-0.265625 1.3125 -0.734375 2.59375l-1.5 4.0zm12.990448 9.578125q-1.375 -1.75 -2.328125 -4.078125q-0.953125 -2.34375 -0.953125 -4.84375q0 -2.21875 0.703125 -4.234375q0.84375 -2.34375 2.578125 -4.671875l1.203125 0q-1.125 1.921875 -1.484375 2.75q-0.5625 1.28125 -0.890625 2.671875q-0.40625 1.734375 -0.40625 3.484375q0 4.46875 2.78125 8.921875l-1.203125 0zm5.618927 -4.0l-3.609375 -13.59375l1.84375 0l2.0625 8.90625q0.34375 1.40625 0.578125 2.78125q0.515625 -2.171875 0.609375 -2.515625l2.59375 -9.171875l2.171875 0l1.953125 6.875q0.734375 2.5625 1.046875 4.8125q0.265625 -1.28125 0.6875 -2.953125l2.125 -8.734375l1.8125 0l-3.734375 13.59375l-1.734375 0l-2.859375 -10.359375q-0.359375 -1.296875 -0.421875 -1.59375q-0.21875 0.9375 -0.40625 1.59375l-2.890625 10.359375l-1.828125 0zm16.108673 4.0l-1.1875 0q2.765625 -4.453125 2.765625 -8.921875q0 -1.734375 -0.390625 -3.453125q-0.328125 -1.390625 -0.890625 -2.671875q-0.359375 -0.84375 -1.484375 -2.78125l1.1875 0q1.75 2.328125 2.578125 4.671875q0.71875 2.015625 0.71875 4.234375q0 2.5 -0.96875 4.84375q-0.953125 2.328125 -2.328125 4.078125z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m244.7559 329.46457l-87.74803 -3.1810913" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m244.7559 329.46457l-81.75197 -2.9637146" fill-rule="evenodd"></path><path fill="#ff0000" stroke="#ff0000" stroke-width="1.0" stroke-linecap="butt" d="m163.06378 324.8502l-4.5949707 1.4862366l4.475281 1.8150635z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m291.25986 314.4567l-27.181122 -83.086624" fill-rule="nonzero"></path><path stroke="#0000ff" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m291.25986 314.4567l-25.315552 -77.384" fill-rule="evenodd"></path><path fill="#0000ff" stroke="#0000ff" stroke-width="1.0" stroke-linecap="butt" d="m267.51416 236.55911l-2.9808655 -3.799591l-0.158844 4.826721z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m291.25986 314.4567l127.27557 -158.4252" fill-rule="nonzero"></path><path stroke="#0000ff" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m291.25986 314.4567l123.51779 -153.74771" fill-rule="evenodd"></path><path fill="#0000ff" stroke="#0000ff" stroke-width="1.0" stroke-linecap="butt" d="m416.06528 161.74347l1.5545654 -4.572296l-4.129883 2.5033264z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m231.19287 205.75528l-112.09449 -54.141724" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m231.19287 205.7553l-106.6917 -51.53218" fill-rule="evenodd"></path><path fill="#ff0000" stroke="#ff0000" stroke-width="1.0" stroke-linecap="butt" d="m125.21955 152.73578l-4.8047867 -0.48640442l3.3680267 3.4610596z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m372.01575 141.00787l-161.51181 0" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m372.01575 141.00787l-155.51181 0" fill-rule="evenodd"></path><path fill="#ff0000" stroke="#ff0000" stroke-width="1.0" stroke-linecap="butt" d="m216.50394 139.35614l-4.538101 1.6517334l4.538101 1.6517334z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m264.0761 201.35957l77.41733 -167.33858" fill-rule="nonzero"></path><path stroke="#0000ff" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m264.0761 201.35957l74.89804 -161.8931" fill-rule="evenodd"></path><path fill="#0000ff" stroke="#0000ff" stroke-width="1.0" stroke-linecap="butt" d="m340.47324 40.160004l0.40637207 -4.812214l-3.404541 3.4251518z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m418.51968 126.0l-77.00787 -92.0" fill-rule="nonzero"></path><path stroke="#0000ff" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m418.51968 126.0l-73.15671 -87.39908" fill-rule="evenodd"></path><path fill="#0000ff" stroke="#0000ff" stroke-width="1.0" stroke-linecap="butt" d="m346.62955 37.54074l-4.179413 -2.4197235l1.6462708 4.5400887z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m295.0 19.007874l-138.01575 0" fill-rule="nonzero"></path><path stroke="#ff0000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m295.0 19.007874l-132.01575 0" fill-rule="evenodd"></path><path fill="#ff0000" stroke="#ff0000" stroke-width="1.0" stroke-linecap="butt" d="m162.98425 17.356142l-4.538101 1.6517315l4.538101 1.6517334z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m137.17401 206.24611l11.842514 46.771652l-29.102364 7.3700867l-11.842514 -46.771667z" fill-rule="nonzero"></path><path fill="#000000" d="m121.81724 223.98074l0.69675446 -0.17645264q-0.9483261 -0.30786133 -1.2091141 -1.3378601q-0.16491699 -0.6513214 0.05670166 -1.3038177q0.22162628 -0.65249634 0.79623413 -1.1203918q0.57460785 -0.46788025 1.4228363 -0.6826935q0.83306885 -0.21096802 1.5685654 -0.10710144q0.75447845 0.11517334 1.240921 0.57225037q0.50159454 0.4532318 0.6741791 1.1348419q0.1265564 0.4998474 0.014221191 0.94737244q-0.112342834 0.44752502 -0.38420868 0.77427673l2.7415695 -0.6943054l0.23779297 0.93911743l-7.6340103 1.9332886l-0.22244263 -0.8785248zm2.0088654 -3.6517944q-1.0602798 0.2685089 -1.4792023 0.84202576q-0.39993286 0.5848236 -0.24652863 1.1907043q0.15724182 0.6210327 0.76447296 0.91856384q0.60723877 0.29753113 1.6372223 0.036697388q1.1360092 -0.2876892 1.5549316 -0.8612213q0.42275238 -0.55836487 0.2578354 -1.2096863q-0.15724182 -0.6210327 -0.7796173 -0.9147186q-0.6034012 -0.2823944 -1.7091141 -0.0023651123zm1.2829971 9.141266l0.12427521 1.0000916q-0.90574646 -0.012390137 -1.5325394 -0.5145111q-0.62680054 -0.5021057 -0.86841583 -1.4563751q-0.3068161 -1.2117615 0.25512695 -2.111618q0.5619354 -0.8998718 1.9100037 -1.241272q1.4086609 -0.35673523 2.3462524 0.16337585q0.9565811 0.5314331 1.2442245 1.6674652q0.28379822 1.1208649 -0.29711914 2.00943q-0.56578064 0.88471985 -1.9441376 1.2337799q-0.075737 0.019180298 -0.24235535 0.06138611l-1.0431747 -4.119995q-0.8973007 0.275589 -1.2669449 0.8527527q-0.36580658 0.5923004 -0.18938446 1.2890625q0.13039398 0.5149994 0.4799347 0.813324q0.36468506 0.29447937 1.0242538 0.35310364zm0.7361374 -3.458435l0.78237915 3.0899963q0.6814194 -0.23704529 0.95692444 -0.61305237q0.41508484 -0.5886688 0.23482513 -1.3005829q-0.16490936 -0.6513214 -0.71539307 -0.9793396q-0.5353317 -0.3318634 -1.2587357 -0.19702148zm-4.1481476 6.40654l7.649147 -1.9371185l0.21861267 0.8633728l-0.7118988 0.1802826q0.485672 0.19937134 0.7936096 0.524353q0.30792236 0.32496643 0.44599915 0.8702698q0.17642212 0.6967621 -0.049041748 1.3341064q-0.22544861 0.6373596 -0.822876 1.0787811q-0.58229065 0.43759155 -1.3850708 0.6408844q-0.8482208 0.21481323 -1.6065292 0.084487915q-0.74316406 -0.13415527 -1.2562637 -0.63282776q-0.5092621 -0.4835205 -0.6703415 -1.1197052q-0.118888855 -0.46955872 -0.017860413 -0.8981018q0.10486603 -0.4133911 0.34643555 -0.7324524l-2.6961365 0.68278503l-0.23778534 -0.93911743zm5.06176 -0.3792572q-1.0602798 0.26852417 -1.4640503 0.8381958q-0.3886261 0.56585693 -0.23521423 1.1717377q0.15724182 0.62101746 0.7834549 0.9298706q0.645195 0.32014465 1.7660599 0.03630066q1.0451355 -0.26467896 1.4640503 -0.8381958q0.42276 -0.5583801 0.26934814 -1.1642609q-0.15341187 -0.60588074 -0.83273315 -0.9335022q-0.67549133 -0.31248474 -1.7509155 -0.040145874zm0.07243347 4.805786l0.38542175 0.8856201q-0.54125977 0.21765137 -0.7559891 0.64276123q-0.19573975 0.43640137 -0.03466797 1.072586q0.16491699 0.6513214 0.499115 0.8890381q0.33803558 0.2528839 0.701561 0.16082764q0.31808472 -0.080566406 0.43081665 -0.39923096q0.07131958 -0.2276001 0.07646179 -1.0348206q-0.0032958984 -1.0951996 0.074920654 -1.5502014q0.09718323 -0.44369507 0.37672424 -0.7401428q0.28337097 -0.28129578 0.69233704 -0.38487244q0.37867737 -0.09588623 0.72380066 -0.005996704q0.36026 0.08607483 0.6490326 0.3353119q0.2203064 0.16986084 0.4222107 0.52168274q0.2019043 0.3518219 0.30929565 0.77593994q0.16491699 0.6513214 0.10588074 1.1820526q-0.0552063 0.5458832 -0.3309021 0.8574829q-0.25672913 0.3229065 -0.763855 0.54803467l-0.35128784 -0.87812805q0.40493774 -0.18313599 0.5554352 -0.5436249q0.16947937 -0.34916687 0.031417847 -0.89445496q-0.16491699 -0.6513214 -0.4460144 -0.8702698q-0.28108215 -0.2189331 -0.5688782 -0.14605713q-0.1817627 0.046035767 -0.29122925 0.18658447q-0.120788574 0.15953064 -0.16545105 0.42874146q-0.010925293 0.14782715 -0.031417847 0.89445496q-0.0082092285 1.0497589 -0.07510376 1.4857788q-0.06690979 0.4360199 -0.3426056 0.7476196q-0.26055908 0.30775452 -0.7452545 0.43049622q-0.4695511 0.118927 -0.9475479 -0.05015564q-0.47799683 -0.16908264 -0.8356018 -0.62654114q-0.35759735 -0.4574585 -0.5225067 -1.1087799q-0.27230072 -1.0754395 0.021217346 -1.7622681q0.3125 -0.6755066 1.1526642 -1.049469z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m120.55516 255.70743l18.960632 -44.377945l28.283463 12.094482l-18.960632 44.377945z" fill-rule="nonzero"></path><path fill="#000000" d="m143.51901 250.92964l-0.6608734 -0.28259277q0.56707764 0.8202667 0.14962769 1.7973175q-0.26397705 0.6178436 -0.83592224 1.0020447q-0.5719452 0.3841858 -1.3124847 0.4073944q-0.74053955 0.023208618 -1.5450745 -0.3208313q-0.79016113 -0.33789062 -1.3117828 -0.8668213q-0.52986145 -0.54945374 -0.6392975 -1.2080231q-0.123794556 -0.66470337 0.15246582 -1.3112946q0.20259094 -0.4741516 0.56333923 -0.761734q0.36073303 -0.28756714 0.7750244 -0.38230896l-2.600357 -1.1119537l0.3806305 -0.8908539l7.240753 3.096283l-0.35604858 0.833374zm-3.8118286 1.6837463q1.005661 0.43003845 1.6865234 0.2283783q0.67263794 -0.22218323 0.91819763 -0.7969208q0.25169373 -0.5891113 -0.05050659 -1.1941528q-0.30221558 -0.60505676 -1.2791443 -1.0228119q-1.0774994 -0.4607544 -1.7583466 -0.25907898q-0.6747284 0.18730164 -0.93870544 0.80514526q-0.25169373 0.5891113 0.06488037 1.2003021q0.30833435 0.590683 1.3571014 1.0391388zm4.5248566 -8.045364l0.50782776 -0.8704376q0.7124481 0.55955505 0.9061127 1.3391113q0.19366455 0.7795563 -0.19308472 1.6847687q-0.49111938 1.1494751 -1.4836121 1.5237732q-0.9924927 0.37428284 -2.2711334 -0.1724701q-1.3360901 -0.5713501 -1.7658844 -1.553833q-0.4380188 -1.003006 0.022399902 -2.0806427q0.45428467 -1.0632629 1.4550018 -1.417038q0.98635864 -0.35992432 2.2937164 0.1991272q0.07183838 0.030715942 0.22987366 0.09828186l-1.6697998 3.9082336q0.8804016 0.3255005 1.5243073 0.091033936q0.6500397 -0.24884033 0.9324341 -0.90979004q0.20872498 -0.4885254 0.111831665 -0.9378052q-0.11126709 -0.45542908 -0.59999084 -0.90231323zm-2.6828613 2.3024597l1.2523499 -2.9311676q-0.6854248 -0.22512817 -1.1324921 -0.093429565q-0.6870117 0.21603394 -0.97554016 0.8913574q-0.26397705 0.6178436 -0.025375366 1.2126923q0.22424316 0.58869934 0.88105774 0.9205475zm7.183197 -2.5752563l-7.255142 -3.102417l0.3499298 -0.81900024l0.67523193 0.28874207q-0.26512146 -0.45324707 -0.31277466 -0.898468q-0.047668457 -0.44522095 0.17333984 -0.96247864q0.2823944 -0.6609497 0.8481903 -1.030777q0.56581116 -0.36982727 1.3084412 -0.3581543q0.7282715 0.0055389404 1.4897003 0.33113098q0.80451965 0.34403992 1.3282471 0.90786743q0.50935364 0.5576782 0.61473083 1.2654877q0.11151123 0.69343567 -0.14633179 1.2969208q-0.19030762 0.4454193 -0.5305481 0.72476196q-0.3340912 0.26498413 -0.71965027 0.37200928l2.557251 1.0935364l-0.38061523 0.8908386zm-4.253525 -2.770523q1.005661 0.43003845 1.6721497 0.222229q0.6521301 -0.21395874 0.8976898 -0.7886963q0.25169373 -0.5891113 -0.05873108 -1.2146606q-0.31866455 -0.64608765 -1.3817902 -1.1006927q-0.9913025 -0.42388916 -1.6721649 -0.222229q-0.67471313 0.18730164 -0.9202728 0.7620392q-0.24555969 0.57473755 0.095687866 1.247467q0.34739685 0.6583557 1.3674316 1.0945435zm2.8573914 -3.8642426l0.2308197 -0.937912q0.56225586 0.15545654 0.9907837 -0.05215454q0.42030334 -0.2281189 0.67814636 -0.83158875q0.26397705 -0.6178436 0.14251709 -1.0096588q-0.11531067 -0.4061737 -0.46011353 -0.5536194q-0.30169678 -0.1289978 -0.5845947 0.055908203q-0.19474792 0.13764954 -0.6884613 0.77619934q-0.6616821 0.8726196 -0.99983215 1.1868439q-0.3463745 0.29371643 -0.74838257 0.35972595q-0.39587402 0.051635742 -0.78378296 -0.114227295q-0.35916138 -0.15359497 -0.57896423 -0.43450928q-0.23416138 -0.2870636 -0.31251526 -0.66044617q-0.07209778 -0.2687378 -0.019180298 -0.6709595q0.05290222 -0.40220642 0.22479248 -0.8045349q0.26397705 -0.6178436 0.63282776 -1.0039062q0.37498474 -0.4004364 0.7831421 -0.4808197q0.3999176 -0.100875854 0.9395752 0.027923584l-0.2534027 0.91127014q-0.43295288 -0.10017395 -0.77124023 0.09503174q-0.34649658 0.17471313 -0.5675049 0.6919861q-0.26397705 0.6178436 -0.1733551 0.96247864q0.09063721 0.344635 0.36360168 0.46136475q0.1723938 0.07371521 0.3446808 0.028427124q0.19276428 -0.053512573 0.3915558 -0.24040222q0.098358154 -0.11088562 0.56752014 -0.6919708q0.6432648 -0.82951355 0.960907 -1.1355133q0.3176422 -0.306015 0.72579956 -0.38638306q0.39378357 -0.086517334 0.8535156 0.110076904q0.44535828 0.19044495 0.72276306 0.61494446q0.27738953 0.42451477 0.28416443 1.005188q0.0067749023 0.5806885 -0.25720215 1.1985321q-0.4358673 1.0201569 -1.0857849 1.3880005q-0.6581421 0.34733582 -1.5527954 0.13470459z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m81.12184 104.50765l17.41732 -44.976383l28.692917 11.118114l-17.41732 44.97637z" fill-rule="nonzero"></path><path fill="#000000" d="m103.909035 98.94311l-0.6701889 -0.25969696q0.59490204 0.80026245 0.21121216 1.7910614q-0.24263 0.6265335 -0.80107117 1.030159q-0.55844116 0.40361786 -1.2977829 0.45227814q-0.7393341 0.04865265 -1.5552292 -0.2674942q-0.8013153 -0.3105011 -1.340805 -0.8211746q-0.54842377 -0.5308838 -0.6803894 -1.1852722q-0.14653015 -0.6600342 0.10738373 -1.315712q0.186203 -0.48082733 0.5368805 -0.7806244q0.3506775 -0.29979706 0.76148224 -0.40872955l-2.6370697 -1.0218277l0.34983826 -0.90338135l7.34301 2.8453217l-0.3272705 0.8450928zm-3.7519302 1.8137894q1.0198593 0.39518738 1.6934204 0.17022705q0.66464233 -0.2451706 0.8903427 -0.8279953q0.23134613 -0.59739685 -0.09146118 -1.1916733q-0.32279968 -0.5942764 -1.3135223 -0.9781647q-1.0927124 -0.42341614 -1.7662735 -0.19845581q-0.667923 0.21038055 -0.910553 0.8369217q-0.23134613 0.5973892 0.106025696 1.197319q0.32844543 0.5797043 1.3920212 0.9918213zm4.246277 -8.195946l0.47768402 -0.887352q0.73124695 0.5347061 0.951561 1.307106q0.2203064 0.77240753 -0.13516998 1.6903534q-0.4514084 1.1656494 -1.4305115 1.5738373q-0.9791031 0.4081955 -2.2757797 -0.09425354q-1.3549652 -0.52503204 -1.8182373 -1.4921188q-0.4721985 -0.9873123 -0.04901123 -2.080101q0.41754913 -1.0782242 1.4055786 -1.4662018q0.97345734 -0.39362335 2.2992783 0.12011719q0.07285309 0.02822876 0.23311615 0.09033203l-1.5347672 3.9631958q0.8910904 0.29502106 1.5265884 0.03855896q0.6411438 -0.27103424 0.90070343 -0.9412842q0.19184113 -0.49539948 0.079582214 -0.94107056q-0.12683105 -0.4513092 -0.63061523 -0.8811188zm-2.6023788 2.3932877l1.1510773 -2.9724045q-0.6927643 -0.20140839 -1.1350708 -0.05441284q-0.67920685 0.23952484 -0.9444046 0.9243469q-0.24263 0.6265335 0.01625061 1.2127991q0.24430847 0.5806198 0.9121475 0.8896713zm7.0908585 -2.820671l-7.3575745 -2.8509598l0.32162476 -0.83052826l0.68476105 0.26533508q-0.2805252 -0.44384003 -0.34342957 -0.88713837q-0.06291199 -0.44330597 0.14022064 -0.9678421q0.259552 -0.67024994 0.81235504 -1.0593033q0.5527954 -0.38904572 1.2954178 -0.40291595q0.72805023 -0.019515991 1.5002365 0.2796936q0.81588745 0.31614685 1.3586655 0.8616028q0.5282059 0.5398102 0.657814 1.2435608q0.13524628 0.68917084 -0.101737976 1.3011398q-0.17491913 0.45168304 -0.50538635 0.74256134q-0.32482147 0.27629852 -0.70648956 0.39652252l2.593361 1.0048904l-0.34983826 0.90338135zm-4.346245 -2.6225052q1.019867 0.39517975 1.6788559 0.1645813q0.64443207 -0.2362442 0.87013245 -0.8190689q0.2313385 -0.59739685 -0.10038757 -1.2118912q-0.34065247 -0.6347122 -1.4187927 -1.052475q-1.0052948 -0.389534 -1.6788559 -0.1645813q-0.667923 0.21038818 -0.893631 0.7932129q-0.22570038 0.5828247 0.13845062 1.243393q0.36979675 0.6460037 1.4042282 1.0468292zm2.7232208 -3.9600906l0.19850159 -0.9452667q0.56728363 0.1360321 0.9884491 -0.08618164q0.41223907 -0.24243164 0.64923096 -0.854393q0.24262238 -0.62654114 0.107795715 -1.0139236q-0.12918854 -0.40195465 -0.47885895 -0.53744507q-0.30595398 -0.11856079 -0.5823517 0.07596588q-0.18991089 0.14425659 -0.661438 0.7993927q-0.6313782 0.8948288 -0.9585571 1.2204895q-0.33611298 0.3054428 -0.73563385 0.38523102q-0.39388275 0.065223694 -0.78725433 -0.08720398q-0.36424255 -0.14113617 -0.59355927 -0.41432953q-0.24388885 -0.27882385 -0.33501434 -0.64927673q-0.08126831 -0.2660904 -0.04219055 -0.66986847q0.03907776 -0.4037857 0.19706726 -0.81175995q0.24263 -0.62654114 0.59802246 -1.0250549q0.3610382 -0.4130783 0.76620483 -0.50743866q0.39624023 -0.11457825 0.9400253 -0.00440979l-0.2219925 0.9194031q-0.43615723 -0.08522034 -0.76755524 0.12150574q-0.34031677 0.18651581 -0.5434494 0.7110596q-0.24263 0.6265335 -0.14022064 0.9678421q0.10240173 0.3413086 0.37922668 0.44857025q0.1748352 0.06774902 0.34545135 0.016563416q0.19084167 -0.060112 0.38310242 -0.25372314q0.09449768 -0.11419678 0.54345703 -0.7110596q0.6144409 -0.85111237 0.9214096 -1.1678467q0.30697632 -0.3167343 0.71214294 -0.41109467q0.39059448 -0.1000061 0.85681915 0.08065033q0.45165253 0.17501068 0.7434616 0.5897064q0.29180908 0.41469574 0.31850433 0.9947815q0.026695251 0.58008575 -0.21593475 1.2066193q-0.4006195 1.0345078 -1.0375519 1.4244766q-0.64585876 0.36975098 -1.5473099 0.1880188z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m171.07939 43.463318l21.732285 43.08661l-26.803146 13.511818l-21.732285 -43.086617z" fill-rule="nonzero"></path><path fill="#000000" d="m159.94344 64.10798l0.6417999 -0.32354355q-0.9926758 -0.094516754 -1.4711609 -1.0431747q-0.30256653 -0.59988785 -0.22807312 -1.284874q0.07450867 -0.6849899 0.5337219 -1.2664528q0.45922852 -0.58145905 1.2405548 -0.9753418q0.76737976 -0.38684464 1.5079498 -0.4452057q0.7615509 -0.051445007 1.3357697 0.2890129q0.58818054 0.3334236 0.90483093 0.96121216q0.23220825 0.46038055 0.21983337 0.92157364q-0.012390137 0.46119308 -0.20675659 0.83914566l2.5253906 -1.2730789l0.43626404 0.8649521l-7.032013 3.5449257l-0.40811157 -0.8091507zm1.1671906 -4.0005302q-0.9766693 0.49235153 -1.2609406 1.1431007q-0.26327515 0.65766907 0.018188477 1.215702q0.28849792 0.57198715 0.94595337 0.7305031q0.65745544 0.15851593 1.6062164 -0.319767q1.0464325 -0.5275192 1.3307037 -1.1782722q0.29130554 -0.63679886 -0.011276245 -1.2366867q-0.28849792 -0.57198334 -0.9598999 -0.72346497q-0.65042114 -0.14456558 -1.6689453 0.36888504zm3.239624 8.643436l0.33872986 0.94911957q-0.8868866 0.18462372 -1.6079102 -0.16932678q-0.72102356 -0.35394287 -1.1643372 -1.2328491q-0.56292725 -1.116066 -0.2099762 -2.1164017q0.3529358 -1.0003357 1.594696 -1.6263275q1.2975769 -0.6541214 2.3259277 -0.35011292q1.0493164 0.31093597 1.5770721 1.3572464q0.5207062 1.0323639 0.14677429 2.0257797q-0.35998535 0.98638916 -1.6296539 1.626442q-0.06976318 0.03517151 -0.22323608 0.1125412l-1.9139557 -3.7946396q-0.81604004 0.46387482 -1.0514221 1.1074753q-0.22833252 0.657547 0.09535217 1.2992859q0.23924255 0.47433472 0.64530945 0.6895828q0.4200287 0.2082138 1.0766296 0.12218475zm-0.033187866 -3.5353851l1.4354706 2.8459778q0.6136627 -0.37934875 0.8008728 -0.8061905q0.27722168 -0.66469574 -0.053497314 -1.3203888q-0.30256653 -0.59989166 -0.9112549 -0.80049133q-0.59472656 -0.20763397 -1.2715912 0.081092834zm-2.656723 7.153839l7.0459595 -3.5519638l0.40109253 0.79520416l-0.6557617 0.33057404q0.5174408 0.08911133 0.88868713 0.3394165q0.37124634 0.25029755 0.62457275 0.75253296q0.3236847 0.6417389 0.24214172 1.3127747q-0.08154297 0.67103577 -0.5687866 1.2316284q-0.47329712 0.55355835 -1.2127686 0.9263382q-0.78134155 0.39388275 -1.5499268 0.4313736q-0.7546387 0.030464172 -1.3639221 -0.3448105q-0.60224915 -0.36132812 -0.8977814 -0.9472656q-0.21813965 -0.43247986 -0.212677 -0.8726883q0.012496948 -0.42625427 0.17897034 -0.79013824l-2.4835358 1.251976l-0.43626404 -0.8649521zm4.8588104 -1.4694977q-0.9766693 0.49234772 -1.2469788 1.1360626q-0.25636292 0.63668823 0.025100708 1.1947174q0.28849792 0.57199097 0.9669342 0.7374191q0.6994324 0.17235565 1.7319183 -0.34812927q0.9627075 -0.48532104 1.2469788 -1.1360703q0.2913208 -0.6368027 0.009841919 -1.1948318q-0.28146362 -0.5580368 -1.0158386 -0.7302704q-0.72732544 -0.15828705 -1.7179565 0.3411026zm1.1154175 4.67482l0.5687561 0.78066254q-0.48104858 0.33000183 -0.5982666 0.79154205q-0.096206665 0.46846008 0.19932556 1.0543976q0.3025818 0.59988403 0.6804962 0.75933075q0.384964 0.17339325 0.7198181 0.0045928955q0.29299927 -0.14770508 0.33377075 -0.48322296q0.020141602 -0.23763275 -0.15029907 -1.0266113q-0.24130249 -1.0682297 -0.26387024 -1.5293045q-0.0015716553 -0.4541626 0.20687866 -0.8042145q0.21546936 -0.33609772 0.5921936 -0.5260086q0.34880066 -0.17583466 0.70526123 -0.16304779q0.37039185 0.0057525635 0.7064667 0.18630219q0.25198364 0.11794281 0.52557373 0.41748047q0.27357483 0.29953766 0.4705963 0.690155q0.3025818 0.59989166 0.36032104 1.130722q0.06477356 0.5447769 -0.1366272 0.90878296q-0.18040466 0.37091827 -0.6265259 0.70079803l-0.5338135 -0.7807846q0.355484 -0.26669312 0.42404175 -0.6512146q0.089538574 -0.37760162 -0.16378784 -0.87983704q-0.30256653 -0.59988403 -0.6245575 -0.7525253q-0.32199097 -0.15264893 -0.58709717 -0.019012451q-0.16741943 0.08440399 -0.2437439 0.24536133q-0.083221436 0.1819458 -0.06829834 0.45439148q0.021469116 0.14665985 0.16377258 0.87983704q0.22018433 1.0263748 0.2496643 1.4664688q0.02947998 0.440094 -0.17193604 0.8040924q-0.18743896 0.35697174 -0.6339264 0.5820465q-0.43252563 0.21804047 -0.9358978 0.15682983q-0.5033722 -0.061210632 -0.9519043 -0.43003845q-0.4485321 -0.3688202 -0.75109863 -0.96871185q-0.49960327 -0.99050903 -0.36238098 -1.724617q0.15821838 -0.7271881 0.8970947 -1.274643z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m61.231503 170.96638l41.700787 76.44095l-26.330704 14.362198l-41.70079 -76.44093z" fill-rule="nonzero"></path><path fill="#000000" d="m48.99513 188.71129l5.006748 -2.730957l0.41156006 0.75442505l-0.7544441 0.41151428q0.6995926 0.009963989 0.9988899 0.16706848q0.29929733 0.15711975 0.45643616 0.44517517q0.23945236 0.43893433 0.20455933 1.0275116l-0.93901443 0.13842773q0.006214142 -0.41275024 -0.16588974 -0.72824097q-0.1496582 -0.27433777 -0.43398666 -0.40402222q-0.28433228 -0.12966919 -0.63848877 -0.061080933q-0.5274925 0.10974121 -1.0624619 0.40153503l-2.6199684 1.4290771l-0.46393967 -0.85043335zm3.495327 6.4072113l0.7407265 -0.40402222q-1.172226 -0.12593079 -1.7184715 -1.1272583q-0.23945236 -0.43893433 -0.29185104 -0.9264984q-0.031196594 -0.4813385 0.11095047 -0.80804443q0.16334915 -0.32048035 0.49629593 -0.5910797q0.21697617 -0.18954468 0.76566315 -0.4888153l3.1000671 -1.6909485l0.46393967 0.85043335l-2.7708588 1.511383q-0.6721382 0.36660767 -0.87540054 0.54867554q-0.2843132 0.26187134 -0.34165955 0.6135254q-0.049865723 0.36535645 0.15965271 0.74942017q0.20952225 0.38407898 0.58115005 0.6085205q0.39282608 0.23069763 0.7968674 0.18829346q0.41775513 -0.04989624 1.0487442 -0.39405823l2.6885529 -1.4664917l0.46393967 0.85043335l-5.006748 2.730957l-0.41156006 -0.75442505zm1.0423317 1.9106903l5.006748 -2.730957l0.41904068 0.76812744l-0.71329117 0.3890686q1.1223412 0.099746704 1.69104 1.1422119q0.24693298 0.45265198 0.29184723 0.9264984q0.058631897 0.46636963 -0.11843109 0.79434204q-0.15586472 0.33418274 -0.46761322 0.61102295q-0.2244606 0.17582703 -0.8142967 0.4975586l-3.0726357 1.6759796l-0.46393585 -0.85043335l3.0452003 -1.661026q0.5212517 -0.28431702 0.71577835 -0.51501465q0.20824432 -0.23817444 0.2169609 -0.5810852q0.029911041 -0.33668518 -0.1571579 -0.6796112q-0.29183197 -0.5349426 -0.8517647 -0.74568176q-0.5599289 -0.21072388 -1.533844 0.3204956l-2.7297058 1.4889374l-0.46393967 -0.85043335zm4.6103287 6.6566315l-0.6808624 0.5137634q-0.27685547 -0.31173706 -0.42651367 -0.5860748q-0.25441742 -0.46636963 -0.24570465 -0.8092804q0.016197205 -0.32920837 0.1895256 -0.5661316q0.18081284 -0.22322083 0.9489708 -0.6422119l2.8805962 -1.571228l-0.34421158 -0.6309662l0.65842056 -0.35914612l0.34421158 0.6309662l1.234539 -0.6733856l0.9777069 0.5523987l-1.7557907 0.95770264l0.4714203 0.864151l-0.6584244 0.35914612l-0.4714203 -0.864151l-2.935463 1.6011505q-0.35664368 0.1945343 -0.44393158 0.2955475q-0.06608963 0.10723877 -0.082294464 0.24066162q0.0049934387 0.1396637 0.10227203 0.3179779q0.08230972 0.15089417 0.23695374 0.3691101zm5.5927467 -2.0809174l0.9739151 -0.5312195l0.46393585 0.85043335l-0.9739151 0.5312195l-0.46393585 -0.85043335zm-5.9395103 3.2397308l5.006748 -2.7309418l0.46393585 0.85043335l-5.006748 2.7309418l-0.46393585 -0.85043335zm1.1263084 2.064621l5.006748 -2.730957l0.41904068 0.7681427l-0.6995735 0.38157654q0.49757004 0.031173706 0.92656326 0.29553223q0.43647766 0.2780609 0.7058563 0.77186584q0.30680084 0.5623779 0.2681656 1.0462189q-0.024925232 0.47633362 -0.36784363 0.8591614q1.1996613 0.11097717 1.7159805 1.0574188q0.41155243 0.75442505 0.21704102 1.3766632q-0.19451141 0.6222534 -1.0449677 1.0861359l-3.442997 1.878006l-0.45645523 -0.8367157l3.1549377 -1.7208862q0.5075302 -0.27682495 0.682106 -0.47885132q0.18829346 -0.20948792 0.20574188 -0.5037689q0.017448425 -0.29429626 -0.13969421 -0.5823517q-0.29183197 -0.5349426 -0.84303284 -0.697052q-0.54371643 -0.14837646 -1.3118744 0.27061462l-2.9080276 1.5861969l-0.46393585 -0.85043335l3.2509575 -1.7732391q0.562397 -0.3067627 0.7382164 -0.6696472q0.1758194 -0.36286926 -0.07859802 -0.8292389q-0.19455719 -0.35662842 -0.55870056 -0.56736755q-0.35666275 -0.19702148 -0.8018532 -0.13217163q-0.43147278 0.057373047 -1.1173286 0.43147278l-2.592537 1.4141083l-0.46393585 -0.85043335zm7.740425 10.338898l0.36917114 0.9377136q-0.8804016 0.21325684 -1.6124344 -0.1171875q-0.73202515 -0.33044434 -1.2034454 -1.1945953q-0.598629 -1.0973358 -0.27818298 -2.1086426q0.3204422 -1.0113068 1.5412674 -1.6772003q1.2756958 -0.6958313 2.31324 -0.4252472q1.058754 0.2768097 1.6199646 1.3055573q0.5537338 1.0150299 0.21208954 2.020111q-0.32792664 0.9975891 -1.5761871 1.6784515q-0.06858063 0.03741455 -0.21947479 0.11972046l-2.0353317 -3.7309418q-0.8005829 0.49006653 -1.0150452 1.1409912q-0.20697784 0.6646576 0.13723755 1.2956238q0.2544098 0.46635437 0.66719055 0.6683655q0.4264984 0.19451904 1.0799408 0.08728027zm-0.14730835 -3.5326996l1.5265045 2.7982025q0.60105896 -0.3990326 0.7743759 -0.83174133q0.25561523 -0.67337036 -0.096076965 -1.3180542q-0.32176208 -0.5898285 -0.9365616 -0.7706299q-0.60108185 -0.1882782 -1.2682419 0.1222229zm-2.850727 6.454727l0.61727524 -0.33668518l3.0679703 5.6238403l-0.6172714 0.33668518l-3.067974 -5.6238403zm6.958576 8.187897l0.6309891 -0.34417725q-0.9951477 -0.062332153 -1.5039749 -0.9950714q-0.3217697 -0.58981323 -0.26942444 -1.2769012q0.052345276 -0.687088 0.49253082 -1.2831421q0.44017792 -0.59606934 1.2083359 -1.0150604q0.7544403 -0.41151428 1.4926834 -0.4938202q0.7594452 -0.07608032 1.3443222 0.24563599q0.59859467 0.31422424 0.9353256 0.9314728q0.24693298 0.45265198 0.24944305 0.914032q0.0025177002 0.46139526 -0.17953491 0.845459l2.4827957 -1.354248l0.46394348 0.85043335l-6.9134293 3.7709656l-0.43400574 -0.795578zm1.0373535 -4.036484q-0.96019745 0.5237427 -1.2232895 1.1833954q-0.24189758 0.66589355 0.057418823 1.2145538q0.3067932 0.5623932 0.9689789 0.69955444q0.66218567 0.13716125 1.5949478 -0.3716278q1.0287857 -0.5611572 1.2918854 -1.2208099q0.27057648 -0.64593506 -0.051185608 -1.2357483q-0.30680084 -0.5623932 -0.98270416 -0.6920624q-0.65470123 -0.1234436 -1.6560516 0.42274475zm3.5167618 8.534607l0.3691635 0.9377136q-0.8804016 0.21325684 -1.6124268 -0.1171875q-0.7320328 -0.33044434 -1.2034531 -1.1945953q-0.5986252 -1.0973358 -0.27818298 -2.1086426q0.32044983 -1.0113068 1.5412674 -1.6772003q1.2756958 -0.6958313 2.3132477 -0.4252472q1.0587463 0.2768097 1.6199646 1.3055573q0.5537262 1.0150452 0.21208191 2.020111q-0.32792664 0.9975891 -1.5761871 1.6784515q-0.06858063 0.03741455 -0.21946716 0.11972046l-2.0353394 -3.7309418q-0.8005829 0.49006653 -1.0150452 1.1410065q-0.20697784 0.66464233 0.13723755 1.2956085q0.25441742 0.46636963 0.6671982 0.6683655q0.42649078 0.19451904 1.0799408 0.08728027zm-0.14730835 -3.5326996l1.5264969 2.7982025q0.60105896 -0.3990326 0.7743759 -0.83174133q0.25561523 -0.67337036 -0.096076965 -1.3180542q-0.32176208 -0.5898285 -0.9365616 -0.7706299q-0.60108185 -0.1882782 -1.2682343 0.1222229zm-2.4242096 7.2365875l6.927147 -3.7784576l0.4265213 0.78186035l-0.6447067 0.35165405q0.52001953 0.07232666 0.8991318 0.31048584q0.37911224 0.23817444 0.64849854 0.7319641q0.34420776 0.63098145 0.28437805 1.3043518q-0.059822083 0.67337036 -0.5286865 1.2494812q-0.4551468 0.5686188 -1.1821518 0.9651642q-0.76815796 0.41900635 -1.5350876 0.48136902q-0.753212 0.054870605 -1.3742523 -0.3005066q-0.6135559 -0.3416748 -0.9278412 -0.9177704q-0.23196411 -0.42521667 -0.24071503 -0.8654022q-0.0012664795 -0.4264679 0.15335083 -0.795578l-2.4416504 1.3318176l-0.46393585 -0.85043335zm4.8085175 -1.6261292q-0.96019745 0.5237427 -1.2095795 1.1759186q-0.23565674 0.64468384 0.06365967 1.1933594q0.3067932 0.5623779 0.99018097 0.70578q0.7045822 0.14962769 1.7196503 -0.40405273q0.9464798 -0.51626587 1.2095795 -1.1759186q0.27057648 -0.64593506 -0.02873993 -1.1946106q-0.2993164 -0.5486603 -1.0388184 -0.69703674q-0.7320175 -0.13467407 -1.7059326 0.39656067zm1.2656784 4.636566l0.5936203 0.76190186q-0.47011566 0.3454132 -0.5723572 0.8105469q-0.0810318 0.47135925 0.23324585 1.0474548q0.32176208 0.58981323 0.70461273 0.73695374q0.39032745 0.16085815 0.71954346 -0.018707275q0.28805542 -0.15711975 0.31797028 -0.49380493q0.012458801 -0.23817444 -0.18335724 -1.021286q-0.27565002 -1.0599213 -0.31307983 -1.5200653q-0.016227722 -0.45388794 0.18078613 -0.8105316q0.20449829 -0.34292603 0.5748596 -0.54493713q0.34293365 -0.1870575 0.69958496 -0.18580627q0.37036896 -0.0062408447 0.71206665 0.16334534q0.25564575 0.10972595 0.53874207 0.40026855q0.28308868 0.2905426 0.49260712 0.6746063q0.32176208 0.58981323 0.39661407 1.1185455q0.0823288 0.5424347 -0.10720825 0.91278076q-0.16833496 0.3765869 -0.6035385 0.72076416l-0.5587082 -0.7631378q0.34666443 -0.27809143 0.402771 -0.6646576q0.077293396 -0.38032532 -0.19208527 -0.87413025q-0.32176208 -0.58981323 -0.64849854 -0.7319641q-0.32672882 -0.14215088 -0.58735657 1.5258789E-5q-0.16460419 0.089782715 -0.23567963 0.25312805q-0.077308655 0.18455505 -0.053596497 0.45640564q0.026191711 0.14588928 0.19207764 0.87413025q0.25319672 1.0187836 0.29685974 1.4577179q0.043670654 0.43893433 -0.1458664 0.8092804q-0.17581177 0.36288452 -0.61476135 0.6023102q-0.42523193 0.2319336 -0.9302826 0.1870575q-0.5050583 -0.044891357 -0.96523285 -0.39901733q-0.46017456 -0.35414124 -0.78193665 -0.94395447q-0.5312805 -0.9738922 -0.41783142 -1.7120972q0.13464355 -0.73197937 0.85541534 -1.3031158z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m53.480316 46.299507l0 50.92914l-29.984253 0l0 -50.92914z" fill-rule="nonzero"></path><path fill="#000000" d="m34.240314 59.721382l0.71875 0q-0.84375 -0.53125 -0.84375 -1.59375q0 -0.671875 0.375 -1.25q0.375 -0.578125 1.046875 -0.890625q0.671875 -0.3125 1.546875 -0.3125q0.859375 0 1.546875 0.28125q0.703125 0.296875 1.0625 0.859375q0.375 0.5625 0.375 1.265625q0 0.515625 -0.21875 0.921875q-0.21875 0.40625 -0.5625 0.65625l2.828125 0l0 0.96875l-7.875 0l0 -0.90625zm2.84375 -3.046875q-1.09375 0 -1.640625 0.453125q-0.53125 0.46875 -0.53125 1.09375q0 0.640625 0.515625 1.078125q0.515625 0.4375 1.578125 0.4375q1.171875 0 1.71875 -0.453125q0.546875 -0.4375 0.546875 -1.109375q0 -0.640625 -0.53125 -1.078125q-0.515625 -0.421875 -1.65625 -0.421875zm-1.0 9.176498l-0.125 1.0q-0.875 -0.234375 -1.359375 -0.875q-0.484375 -0.640625 -0.484375 -1.625q0 -1.25 0.765625 -1.984375q0.765625 -0.734375 2.15625 -0.734375q1.453125 0 2.234375 0.734375q0.796875 0.75 0.796875 1.921875q0 1.15625 -0.78125 1.875q-0.765625 0.71875 -2.1875 0.71875q-0.078125 0 -0.25 0l0 -4.25q-0.9375 0.046875 -1.4375 0.515625q-0.5 0.484375 -0.5 1.203125q0 0.53125 0.265625 0.90625q0.28125 0.375 0.90625 0.59375zm1.5625 -3.171875l0 3.1875q0.71875 -0.0625 1.078125 -0.359375q0.546875 -0.46875 0.546875 -1.203125q0 -0.671875 -0.453125 -1.125q-0.4375 -0.453125 -1.171875 -0.5zm-5.59375 5.1921234l7.890625 0l0 0.890625l-0.734375 0q0.421875 0.3125 0.640625 0.703125q0.21875 0.390625 0.21875 0.953125q0 0.71875 -0.375 1.28125q-0.375 0.5625 -1.0625 0.84375q-0.671875 0.28125 -1.5 0.28125q-0.875 0 -1.578125 -0.3125q-0.6875 -0.3125 -1.0625 -0.921875q-0.375 -0.59375 -0.375 -1.25q0 -0.484375 0.203125 -0.875q0.203125 -0.375 0.515625 -0.625l-2.78125 0l0 -0.96875zm5.0 0.875q-1.09375 0 -1.625 0.453125q-0.515625 0.453125 -0.515625 1.078125q0 0.640625 0.53125 1.09375q0.546875 0.46875 1.703125 0.46875q1.078125 0 1.625 -0.453125q0.546875 -0.4375 0.546875 -1.0625q0 -0.625 -0.578125 -1.109375q-0.578125 -0.46875 -1.6875 -0.46875zm-1.109375 4.6764984l0.15625 0.953125q-0.578125 0.078125 -0.890625 0.4375q-0.296875 0.375 -0.296875 1.03125q0 0.671875 0.265625 0.984375q0.265625 0.328125 0.640625 0.328125q0.328125 0 0.515625 -0.28125q0.125 -0.203125 0.328125 -0.984375q0.265625 -1.0625 0.453125 -1.484375q0.203125 -0.40625 0.546875 -0.625q0.34375 -0.203125 0.765625 -0.203125q0.390625 0 0.703125 0.171875q0.328125 0.171875 0.546875 0.484375q0.171875 0.21875 0.28125 0.609375q0.109375 0.390625 0.109375 0.828125q0 0.671875 -0.1875 1.171875q-0.1875 0.515625 -0.53125 0.75q-0.328125 0.25 -0.875 0.34375l-0.125 -0.9375q0.4375 -0.078125 0.671875 -0.390625q0.25 -0.296875 0.25 -0.859375q0 -0.671875 -0.21875 -0.953125q-0.21875 -0.28125 -0.515625 -0.28125q-0.1875 0 -0.328125 0.109375q-0.15625 0.125 -0.265625 0.375q-0.046875 0.140625 -0.25 0.859375q-0.265625 1.015625 -0.4375 1.421875q-0.171875 0.40625 -0.515625 0.640625q-0.328125 0.234375 -0.828125 0.234375q-0.484375 0 -0.90625 -0.28125q-0.421875 -0.28125 -0.65625 -0.8125q-0.234375 -0.53125 -0.234375 -1.203125q0 -1.109375 0.453125 -1.703125q0.46875 -0.578125 1.375 -0.734375z" fill-rule="nonzero"></path></g></svg>
+
diff --git a/site/docs/skylark/build-graph-aspects.png b/site/docs/skylark/build-graph-aspects.png
new file mode 100644
index 0000000000..fb8042a5b7
--- /dev/null
+++ b/site/docs/skylark/build-graph-aspects.png
Binary files differ
diff --git a/site/docs/skylark/build-graph.png b/site/docs/skylark/build-graph.png
new file mode 100644
index 0000000000..2efd68ac59
--- /dev/null
+++ b/site/docs/skylark/build-graph.png
Binary files differ
diff --git a/site/docs/skylark/build-graph.svg b/site/docs/skylark/build-graph.svg
new file mode 100644
index 0000000000..cbad06dcb2
--- /dev/null
+++ b/site/docs/skylark/build-graph.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" standalone="yes"?>
+
+<svg version="1.1" viewBox="0.0 0.0 960.0 720.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="p.0"><path d="m0 0l960.0 0l0 720.0l-960.0 0l0 -720.0z" clip-rule="nonzero"></path></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l960.0 0l0 720.0l-960.0 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m105.04724 275.39633l0 0c0 -8.288635 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192383 23.496063 15.007874l0 0c0 8.288605 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.719269 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m105.04724 275.39633l0 0c0 -8.288635 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192383 23.496063 15.007874l0 0c0 8.288605 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.719269 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m122.39964 282.3163l5.265625 -7.09375l-4.640625 -6.5l2.140625 0l2.46875 3.484375q0.78125 1.078125 1.09375 1.671875q0.453125 -0.75 1.078125 -1.546875l2.734375 -3.609375l1.96875 0l-4.78125 6.40625l5.140625 7.1875l-2.21875 0l-3.421875 -4.859375q-0.296875 -0.40625 -0.59375 -0.90625q-0.453125 0.75 -0.65625 1.03125l-3.40625 4.734375l-2.171875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m79.0 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m79.0 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m101.57115 147.92787l0 -5.765625l-5.234375 -7.828125l2.1875 0l2.671875 4.09375q0.75 1.15625 1.390625 2.296875q0.609375 -1.0625 1.484375 -2.40625l2.625 -3.984375l2.109375 0l-5.4375 7.828125l0 5.765625l-1.796875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m163.51181 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m163.51181 141.00787l0 0c0 -8.28862 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m181.68489 147.92787l0 -1.671875l6.96875 -8.703125q0.75 -0.9375 1.421875 -1.625l-7.59375 0l0 -1.59375l9.734375 0l0 1.59375l-7.625 9.4375l-0.828125 0.953125l8.6875 0l0 1.609375l-10.765625 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m0 141.00787l0 0c0 -8.28862 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m0 141.00787l0 0c0 -8.28862 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192535 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m22.719948 147.92787l0 -12.0l-4.46875 0l0 -1.59375l10.765625 0l0 1.59375l-4.5 0l0 12.0l-1.796875 0z" fill-rule="nonzero"></path><path fill="#cfe2f3" d="m110.0 19.007874l0 0c0 -8.288619 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m110.0 19.007874l0 0c0 -8.288619 10.5195465 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976517 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m128.53548 25.927872l-3.6093674 -13.59375l1.84375 0l2.0624924 8.90625q0.34375 1.40625 0.578125 2.78125q0.515625 -2.171875 0.609375 -2.515625l2.59375 -9.171875l2.171875 0l1.953125 6.875q0.734375 2.5625 1.046875 4.8125q0.265625 -1.28125 0.6875 -2.953125l2.125 -8.734375l1.8125 0l-3.734375 13.59375l-1.734375 0l-2.859375 -10.359375q-0.359375 -1.296875 -0.421875 -1.59375q-0.21875 0.9375 -0.40625 1.59375l-2.890625 10.359375l-1.828125 0z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m128.5433 260.38846l-26.047241 -104.37796" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m128.5433 260.38846l-24.594505 -98.55649" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m105.551384 161.43205l-2.7013626 -4.0031433l-0.5038147 4.8029785z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m128.5433 260.38846l58.456696 -104.37796" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m128.5433 260.38846l55.52487 -99.143036" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m185.50931 162.05252l0.7763519 -4.7665253l-3.6585846 3.1523438z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m102.49606 126.0l30.992126 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m102.49606 126.0l29.076675 -86.313965" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m133.13803 40.21334l-0.11654663 -4.8279343l-3.0140533 3.7733269z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m187.00787 126.0l-53.51181 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m187.00787 126.0l-50.495102 -86.81353" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m137.94055 38.356003l-3.7094727 -3.0923195l0.85391235 4.75325z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m105.04724 275.39633l-81.543304 -119.37009" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m105.04724 275.39633l-78.158905 -114.41571" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m28.25222 160.04893l-3.9236736 -2.8155518l1.1959076 4.6789246z" fill-rule="evenodd"></path><path fill="#cfe2f3" d="m0 19.007874l0 0c0 -8.288619 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m0 19.007874l0 0c0 -8.288619 10.519546 -15.007874 23.496063 -15.007874l0 0c12.976517 0 23.496063 6.7192545 23.496063 15.007874l0 0c0 8.28862 -10.5195465 15.007874 -23.496063 15.007874l0 0c-12.976518 0 -23.496063 -6.7192535 -23.496063 -15.007874z" fill-rule="nonzero"></path><path fill="#000000" d="m28.005974 24.474747q1.265625 0.859375 2.3125 1.265625l-0.53125 1.25q-1.453125 -0.53125 -2.921875 -1.671875q-1.5 0.84375 -3.328125 0.84375q-1.84375 0 -3.359375 -0.890625q-1.5 -0.890625 -2.3125 -2.5q-0.8125 -1.625 -0.8125 -3.640625q0 -2.015625 0.8125 -3.65625q0.828125 -1.65625 2.328125 -2.515625q1.515625 -0.875 3.375 -0.875q1.890625 0 3.390625 0.90625q1.515625 0.890625 2.3125 2.5q0.796875 1.609375 0.796875 3.625q0 1.6875 -0.515625 3.03125q-0.515625 1.328125 -1.546875 2.328125zm-3.953125 -2.296875q1.5625 0.421875 2.5625 1.296875q1.59375 -1.453125 1.59375 -4.359375q0 -1.65625 -0.5625 -2.875q-0.5625 -1.234375 -1.640625 -1.921875q-1.078125 -0.6875 -2.421875 -0.6875q-2.015625 0 -3.34375 1.390625q-1.328125 1.375 -1.328125 4.109375q0 2.65625 1.3125 4.078125q1.3125 1.40625 3.359375 1.40625q0.953125 0 1.8125 -0.359375q-0.84375 -0.546875 -1.78125 -0.78125l0.4375 -1.296875z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m23.496063 126.0l0 -92.0" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m23.496063 126.0l0 -86.0" fill-rule="evenodd"></path><path fill="#000000" stroke="#000000" stroke-width="1.0" stroke-linecap="butt" d="m25.147795 40.0l-1.6517315 -4.5380974l-1.6517334 4.5380974z" fill-rule="evenodd"></path><path fill="#000000" fill-opacity="0.0" d="m137.17401 181.13062l11.842514 46.771652l-29.102364 7.3700867l-11.842514 -46.771652z" fill-rule="nonzero"></path><path fill="#000000" d="m121.81724 198.86525l0.69675446 -0.17643738q-0.9483261 -0.30786133 -1.2091141 -1.3378601q-0.16491699 -0.6513214 0.05670166 -1.303833q0.22162628 -0.65249634 0.79623413 -1.1203766q0.57460785 -0.46788025 1.4228363 -0.6826935q0.83306885 -0.21096802 1.5685654 -0.10710144q0.75447845 0.11517334 1.240921 0.5722351q0.50159454 0.4532318 0.6741791 1.1348572q0.1265564 0.4998474 0.014221191 0.94737244q-0.112342834 0.44752502 -0.38420868 0.7742615l2.7415695 -0.69429016l0.23779297 0.93911743l-7.6340103 1.9332886l-0.22244263 -0.87854004zm2.0088654 -3.6517944q-1.0602798 0.2685089 -1.4792023 0.842041q-0.39993286 0.5848236 -0.24652863 1.1907043q0.15724182 0.6210327 0.76447296 0.91856384q0.60723877 0.29753113 1.6372223 0.03668213q1.1360092 -0.2876892 1.5549316 -0.86120605q0.42275238 -0.5583801 0.2578354 -1.2097015q-0.15724182 -0.62101746 -0.7796173 -0.9147186q-0.6034012 -0.28237915 -1.7091141 -0.0023651123zm1.2829971 9.141281l0.12427521 1.0000916q-0.90574646 -0.012390137 -1.5325394 -0.5145111q-0.62680054 -0.502121 -0.86841583 -1.4563751q-0.3068161 -1.2117615 0.25512695 -2.1116333q0.5619354 -0.8998718 1.9100037 -1.2412567q1.4086609 -0.35673523 2.3462524 0.16337585q0.9565811 0.53141785 1.2442245 1.66745q0.28379822 1.1208801 -0.29711914 2.00943q-0.56578064 0.88471985 -1.9441376 1.2337952q-0.075737 0.019180298 -0.24235535 0.06137085l-1.0431747 -4.11998q-0.8973007 0.275589 -1.2669449 0.8527527q-0.36580658 0.5923004 -0.18938446 1.2890625q0.13039398 0.5149994 0.4799347 0.813324q0.36468506 0.29447937 1.0242538 0.35310364zm0.7361374 -3.458435l0.78237915 3.089981q0.6814194 -0.23703003 0.95692444 -0.61305237q0.41508484 -0.5886688 0.23482513 -1.3005676q-0.16490936 -0.6513214 -0.71539307 -0.97935486q-0.5353317 -0.33184814 -1.2587357 -0.19700623zm-4.1481476 6.40654l7.649147 -1.9371338l0.21861267 0.86338806l-0.7118988 0.1802826q0.485672 0.19937134 0.7936096 0.52433777q0.30792236 0.3249817 0.44599915 0.8702698q0.17642212 0.6967621 -0.049041748 1.3341217q-0.22544861 0.63734436 -0.822876 1.0787811q-0.58229065 0.4375763 -1.3850708 0.6408844q-0.8482208 0.21481323 -1.6065292 0.084487915q-0.74316406 -0.13417053 -1.2562637 -0.632843q-0.5092621 -0.4835205 -0.6703415 -1.11969q-0.118888855 -0.46955872 -0.017860413 -0.8981018q0.10486603 -0.4133911 0.34643555 -0.73246765l-2.6961365 0.68278503l-0.23778534 -0.9391022zm5.06176 -0.3792572q-1.0602798 0.2685089 -1.4640503 0.8381958q-0.3886261 0.5658417 -0.23521423 1.1717224q0.15724182 0.6210327 0.7834549 0.9298706q0.645195 0.3201599 1.7660599 0.03630066q1.0451355 -0.26467896 1.4640503 -0.8381958q0.42276 -0.55836487 0.26934814 -1.1642456q-0.15341187 -0.60588074 -0.83273315 -0.93351746q-0.67549133 -0.31248474 -1.7509155 -0.040130615zm0.07243347 4.805786l0.38542175 0.88560486q-0.54125977 0.21766663 -0.7559891 0.64276123q-0.19573975 0.43641663 -0.03466797 1.072586q0.16491699 0.6513214 0.499115 0.88905334q0.33803558 0.2528839 0.701561 0.16081238q0.31808472 -0.08055115 0.43081665 -0.39923096q0.07131958 -0.2276001 0.07646179 -1.0348053q-0.0032958984 -1.0952148 0.074920654 -1.5502167q0.09718323 -0.4436798 0.37672424 -0.74012756q0.28337097 -0.28131104 0.69233704 -0.38487244q0.37867737 -0.09590149 0.72380066 -0.005996704q0.36026 0.08605957 0.6490326 0.33529663q0.2203064 0.16986084 0.4222107 0.52168274q0.2019043 0.35183716 0.30929565 0.77593994q0.16491699 0.6513214 0.10588074 1.1820679q-0.0552063 0.5458832 -0.3309021 0.85746765q-0.25672913 0.3229065 -0.763855 0.5480499l-0.35128784 -0.8781433q0.40493774 -0.18313599 0.5554352 -0.5436096q0.16947937 -0.34916687 0.031417847 -0.89445496q-0.16491699 -0.6513214 -0.4460144 -0.8702698q-0.28108215 -0.21894836 -0.5688782 -0.14605713q-0.1817627 0.046020508 -0.29122925 0.18656921q-0.120788574 0.1595459 -0.16545105 0.42874146q-0.010925293 0.1478424 -0.031417847 0.8944702q-0.0082092285 1.0497589 -0.07510376 1.4857788q-0.06690979 0.4360199 -0.3426056 0.74760437q-0.26055908 0.30776978 -0.7452545 0.43051147q-0.4695511 0.11891174 -0.9475479 -0.0501709q-0.47799683 -0.16906738 -0.8356018 -0.6265259q-0.35759735 -0.4574585 -0.5225067 -1.1087799q-0.27230072 -1.0754395 0.021217346 -1.7622681q0.3125 -0.67552185 1.1526642 -1.049469z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m136.62865 226.32948l18.960632 -44.37796l28.283463 12.094498l-18.960632 44.377945z" fill-rule="nonzero"></path><path fill="#000000" d="m159.5925 221.55168l-0.66085815 -0.28259277q0.5670624 0.8202667 0.14961243 1.7973328q-0.26397705 0.6178436 -0.83592224 1.0020294q-0.57192993 0.38420105 -1.3124847 0.4073944q-0.74053955 0.023208618 -1.5450745 -0.32081604q-0.79016113 -0.33789062 -1.3117828 -0.86683655q-0.52986145 -0.54945374 -0.6392822 -1.2080078q-0.123794556 -0.6647186 0.15245056 -1.3112946q0.20259094 -0.47416687 0.56333923 -0.761734q0.3607483 -0.28756714 0.7750397 -0.38230896l-2.600357 -1.111969l0.38061523 -0.8908386l7.2407684 3.0962677l-0.35606384 0.833374zm-3.8118286 1.6837616q1.005661 0.43003845 1.6865234 0.22836304q0.67263794 -0.22216797 0.91819763 -0.7969055q0.25169373 -0.5891113 -0.05050659 -1.1941681q-0.30220032 -0.6050415 -1.2791443 -1.0227966q-1.0774841 -0.4607544 -1.7583466 -0.25909424q-0.6747284 0.18730164 -0.93870544 0.80514526q-0.25169373 0.5891113 0.06488037 1.2003021q0.3083496 0.590683 1.3571014 1.039154zm4.524872 -8.04538l0.50782776 -0.8704376q0.71243286 0.55955505 0.9061127 1.3391113q0.19366455 0.7795563 -0.19309998 1.6847687q-0.49111938 1.1494751 -1.4836121 1.5237732q-0.9924927 0.3742981 -2.2711182 -0.1724701q-1.3361053 -0.57133484 -1.7658997 -1.5538177q-0.4380188 -1.003006 0.022399902 -2.0806427q0.45428467 -1.0632629 1.4550171 -1.4170532q0.9863434 -0.35992432 2.2937164 0.1991272q0.07182312 0.030715942 0.2298584 0.09829712l-1.6697998 3.9082336q0.88041687 0.32548523 1.5243073 0.091033936q0.6500397 -0.24884033 0.9324341 -0.90979004q0.20872498 -0.4885254 0.111831665 -0.9378052q-0.11126709 -0.45542908 -0.5999756 -0.9023285zm-2.6828766 2.3024597l1.2523499 -2.9311676q-0.6854248 -0.22512817 -1.1324921 -0.09341431q-0.68699646 0.21603394 -0.9755249 0.8913574q-0.26397705 0.6178436 -0.025390625 1.212677q0.22424316 0.5887146 0.88105774 0.9205475zm7.183197 -2.575241l-7.255127 -3.102417l0.34991455 -0.8190155l0.67523193 0.28874207q-0.26512146 -0.4532318 -0.31277466 -0.89845276q-0.0476532 -0.44522095 0.17333984 -0.9624939q0.2823944 -0.6609497 0.84820557 -1.030777q0.5657959 -0.369812 1.3084259 -0.35813904q0.7282715 0.0055236816 1.4897003 0.33113098q0.8045349 0.34402466 1.3282471 0.9078522q0.50935364 0.5576782 0.61473083 1.2654877q0.11151123 0.6934509 -0.14631653 1.2969208q-0.19030762 0.44543457 -0.5305481 0.7247772q-0.33410645 0.26498413 -0.7196655 0.37200928l2.557251 1.0935211l-0.38061523 0.8908539zm-4.253525 -2.770523q1.005661 0.43003845 1.6721497 0.22221375q0.6521301 -0.21394348 0.8976898 -0.78868103q0.25170898 -0.5891113 -0.05873108 -1.2146759q-0.31866455 -0.6460724 -1.3817902 -1.1006775q-0.9913025 -0.42390442 -1.6721497 -0.222229q-0.6747284 0.18728638 -0.9202881 0.7620392q-0.24555969 0.57473755 0.095687866 1.247467q0.34739685 0.6583557 1.3674316 1.0945435zm2.8574066 -3.8642578l0.23080444 -0.937912q0.56225586 0.1554718 0.9907837 -0.052139282q0.42030334 -0.2281189 0.67814636 -0.831604q0.26397705 -0.6178436 0.14251709 -1.0096436q-0.11531067 -0.4061737 -0.46011353 -0.5536194q-0.30169678 -0.12901306 -0.5845947 0.055892944q-0.19473267 0.13764954 -0.68844604 0.7762146q-0.6616974 0.8726196 -0.9998474 1.1868439q-0.3463745 0.29371643 -0.74838257 0.35972595q-0.39587402 0.051635742 -0.7837677 -0.11424255q-0.35917664 -0.15357971 -0.5789795 -0.43450928q-0.23416138 -0.2870636 -0.31251526 -0.66044617q-0.07208252 -0.26872253 -0.019180298 -0.6709442q0.05290222 -0.40222168 0.22480774 -0.8045349q0.2639618 -0.6178436 0.6328125 -1.0039215q0.37498474 -0.4004364 0.7831421 -0.48080444q0.3999176 -0.10089111 0.93959045 0.027923584l-0.25341797 0.9112549q-0.43295288 -0.10017395 -0.77124023 0.095047q-0.34649658 0.17471313 -0.5675049 0.6919708q-0.26397705 0.6178436 -0.17333984 0.96247864q0.09062195 0.34465027 0.36358643 0.46138q0.17240906 0.07371521 0.3446808 0.028427124q0.19277954 -0.053512573 0.39157104 -0.24040222q0.098342896 -0.11088562 0.5675049 -0.6919861q0.6432648 -0.82951355 0.960907 -1.1355133q0.31765747 -0.30599976 0.72579956 -0.3863678q0.39378357 -0.086517334 0.8535156 0.110061646q0.44535828 0.19044495 0.72276306 0.6149597q0.27738953 0.4244995 0.28416443 1.005188q0.0067749023 0.5806732 -0.25720215 1.1985168q-0.4358673 1.0201569 -1.0857849 1.3880005q-0.65812683 0.34733582 -1.5527802 0.13470459z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m81.12184 104.50765l17.41732 -44.976383l28.692917 11.118114l-17.41732 44.97637z" fill-rule="nonzero"></path><path fill="#000000" d="m103.909035 98.94311l-0.6701889 -0.25969696q0.59490204 0.80026245 0.21121216 1.7910614q-0.24263 0.6265335 -0.80107117 1.030159q-0.55844116 0.40361786 -1.2977829 0.45227814q-0.7393341 0.04865265 -1.5552292 -0.2674942q-0.8013153 -0.3105011 -1.340805 -0.8211746q-0.54842377 -0.5308838 -0.6803894 -1.1852722q-0.14653015 -0.6600342 0.10738373 -1.315712q0.186203 -0.48082733 0.5368805 -0.7806244q0.3506775 -0.29979706 0.76148224 -0.40872955l-2.6370697 -1.0218277l0.34983826 -0.90338135l7.34301 2.8453217l-0.3272705 0.8450928zm-3.7519302 1.8137894q1.0198593 0.39518738 1.6934204 0.17022705q0.66464233 -0.2451706 0.8903427 -0.8279953q0.23134613 -0.59739685 -0.09146118 -1.1916733q-0.32279968 -0.5942764 -1.3135223 -0.9781647q-1.0927124 -0.42341614 -1.7662735 -0.19845581q-0.667923 0.21038055 -0.910553 0.8369217q-0.23134613 0.5973892 0.106025696 1.197319q0.32844543 0.5797043 1.3920212 0.9918213zm4.246277 -8.195946l0.47768402 -0.887352q0.73124695 0.5347061 0.951561 1.307106q0.2203064 0.77240753 -0.13516998 1.6903534q-0.4514084 1.1656494 -1.4305115 1.5738373q-0.9791031 0.4081955 -2.2757797 -0.09425354q-1.3549652 -0.52503204 -1.8182373 -1.4921188q-0.4721985 -0.9873123 -0.04901123 -2.080101q0.41754913 -1.0782242 1.4055786 -1.4662018q0.97345734 -0.39362335 2.2992783 0.12011719q0.07285309 0.02822876 0.23311615 0.09033203l-1.5347672 3.9631958q0.8910904 0.29502106 1.5265884 0.03855896q0.6411438 -0.27103424 0.90070343 -0.9412842q0.19184113 -0.49539948 0.079582214 -0.94107056q-0.12683105 -0.4513092 -0.63061523 -0.8811188zm-2.6023788 2.3932877l1.1510773 -2.9724045q-0.6927643 -0.20140839 -1.1350708 -0.05441284q-0.67920685 0.23952484 -0.9444046 0.9243469q-0.24263 0.6265335 0.01625061 1.2127991q0.24430847 0.5806198 0.9121475 0.8896713zm7.0908585 -2.820671l-7.3575745 -2.8509598l0.32162476 -0.83052826l0.68476105 0.26533508q-0.2805252 -0.44384003 -0.34342957 -0.88713837q-0.06291199 -0.44330597 0.14022064 -0.9678421q0.259552 -0.67024994 0.81235504 -1.0593033q0.5527954 -0.38904572 1.2954178 -0.40291595q0.72805023 -0.019515991 1.5002365 0.2796936q0.81588745 0.31614685 1.3586655 0.8616028q0.5282059 0.5398102 0.657814 1.2435608q0.13524628 0.68917084 -0.101737976 1.3011398q-0.17491913 0.45168304 -0.50538635 0.74256134q-0.32482147 0.27629852 -0.70648956 0.39652252l2.593361 1.0048904l-0.34983826 0.90338135zm-4.346245 -2.6225052q1.019867 0.39517975 1.6788559 0.1645813q0.64443207 -0.2362442 0.87013245 -0.8190689q0.2313385 -0.59739685 -0.10038757 -1.2118912q-0.34065247 -0.6347122 -1.4187927 -1.052475q-1.0052948 -0.389534 -1.6788559 -0.1645813q-0.667923 0.21038818 -0.893631 0.7932129q-0.22570038 0.5828247 0.13845062 1.243393q0.36979675 0.6460037 1.4042282 1.0468292zm2.7232208 -3.9600906l0.19850159 -0.9452667q0.56728363 0.1360321 0.9884491 -0.08618164q0.41223907 -0.24243164 0.64923096 -0.854393q0.24262238 -0.62654114 0.107795715 -1.0139236q-0.12918854 -0.40195465 -0.47885895 -0.53744507q-0.30595398 -0.11856079 -0.5823517 0.07596588q-0.18991089 0.14425659 -0.661438 0.7993927q-0.6313782 0.8948288 -0.9585571 1.2204895q-0.33611298 0.3054428 -0.73563385 0.38523102q-0.39388275 0.065223694 -0.78725433 -0.08720398q-0.36424255 -0.14113617 -0.59355927 -0.41432953q-0.24388885 -0.27882385 -0.33501434 -0.64927673q-0.08126831 -0.2660904 -0.04219055 -0.66986847q0.03907776 -0.4037857 0.19706726 -0.81175995q0.24263 -0.62654114 0.59802246 -1.0250549q0.3610382 -0.4130783 0.76620483 -0.50743866q0.39624023 -0.11457825 0.9400253 -0.00440979l-0.2219925 0.9194031q-0.43615723 -0.08522034 -0.76755524 0.12150574q-0.34031677 0.18651581 -0.5434494 0.7110596q-0.24263 0.6265335 -0.14022064 0.9678421q0.10240173 0.3413086 0.37922668 0.44857025q0.1748352 0.06774902 0.34545135 0.016563416q0.19084167 -0.060112 0.38310242 -0.25372314q0.09449768 -0.11419678 0.54345703 -0.7110596q0.6144409 -0.85111237 0.9214096 -1.1678467q0.30697632 -0.3167343 0.71214294 -0.41109467q0.39059448 -0.1000061 0.85681915 0.08065033q0.45165253 0.17501068 0.7434616 0.5897064q0.29180908 0.41469574 0.31850433 0.9947815q0.026695251 0.58008575 -0.21593475 1.2066193q-0.4006195 1.0345078 -1.0375519 1.4244766q-0.64585876 0.36975098 -1.5473099 0.1880188z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m171.07939 43.463318l21.732285 43.08661l-26.803146 13.511818l-21.732285 -43.086617z" fill-rule="nonzero"></path><path fill="#000000" d="m159.94344 64.10798l0.6417999 -0.32354355q-0.9926758 -0.094516754 -1.4711609 -1.0431747q-0.30256653 -0.59988785 -0.22807312 -1.284874q0.07450867 -0.6849899 0.5337219 -1.2664528q0.45922852 -0.58145905 1.2405548 -0.9753418q0.76737976 -0.38684464 1.5079498 -0.4452057q0.7615509 -0.051445007 1.3357697 0.2890129q0.58818054 0.3334236 0.90483093 0.96121216q0.23220825 0.46038055 0.21983337 0.92157364q-0.012390137 0.46119308 -0.20675659 0.83914566l2.5253906 -1.2730789l0.43626404 0.8649521l-7.032013 3.5449257l-0.40811157 -0.8091507zm1.1671906 -4.0005302q-0.9766693 0.49235153 -1.2609406 1.1431007q-0.26327515 0.65766907 0.018188477 1.215702q0.28849792 0.57198715 0.94595337 0.7305031q0.65745544 0.15851593 1.6062164 -0.319767q1.0464325 -0.5275192 1.3307037 -1.1782722q0.29130554 -0.63679886 -0.011276245 -1.2366867q-0.28849792 -0.57198334 -0.9598999 -0.72346497q-0.65042114 -0.14456558 -1.6689453 0.36888504zm3.239624 8.643436l0.33872986 0.94911957q-0.8868866 0.18462372 -1.6079102 -0.16932678q-0.72102356 -0.35394287 -1.1643372 -1.2328491q-0.56292725 -1.116066 -0.2099762 -2.1164017q0.3529358 -1.0003357 1.594696 -1.6263275q1.2975769 -0.6541214 2.3259277 -0.35011292q1.0493164 0.31093597 1.5770721 1.3572464q0.5207062 1.0323639 0.14677429 2.0257797q-0.35998535 0.98638916 -1.6296539 1.626442q-0.06976318 0.03517151 -0.22323608 0.1125412l-1.9139557 -3.7946396q-0.81604004 0.46387482 -1.0514221 1.1074753q-0.22833252 0.657547 0.09535217 1.2992859q0.23924255 0.47433472 0.64530945 0.6895828q0.4200287 0.2082138 1.0766296 0.12218475zm-0.033187866 -3.5353851l1.4354706 2.8459778q0.6136627 -0.37934875 0.8008728 -0.8061905q0.27722168 -0.66469574 -0.053497314 -1.3203888q-0.30256653 -0.59989166 -0.9112549 -0.80049133q-0.59472656 -0.20763397 -1.2715912 0.081092834zm-2.656723 7.153839l7.0459595 -3.5519638l0.40109253 0.79520416l-0.6557617 0.33057404q0.5174408 0.08911133 0.88868713 0.3394165q0.37124634 0.25029755 0.62457275 0.75253296q0.3236847 0.6417389 0.24214172 1.3127747q-0.08154297 0.67103577 -0.5687866 1.2316284q-0.47329712 0.55355835 -1.2127686 0.9263382q-0.78134155 0.39388275 -1.5499268 0.4313736q-0.7546387 0.030464172 -1.3639221 -0.3448105q-0.60224915 -0.36132812 -0.8977814 -0.9472656q-0.21813965 -0.43247986 -0.212677 -0.8726883q0.012496948 -0.42625427 0.17897034 -0.79013824l-2.4835358 1.251976l-0.43626404 -0.8649521zm4.8588104 -1.4694977q-0.9766693 0.49234772 -1.2469788 1.1360626q-0.25636292 0.63668823 0.025100708 1.1947174q0.28849792 0.57199097 0.9669342 0.7374191q0.6994324 0.17235565 1.7319183 -0.34812927q0.9627075 -0.48532104 1.2469788 -1.1360703q0.2913208 -0.6368027 0.009841919 -1.1948318q-0.28146362 -0.5580368 -1.0158386 -0.7302704q-0.72732544 -0.15828705 -1.7179565 0.3411026zm1.1154175 4.67482l0.5687561 0.78066254q-0.48104858 0.33000183 -0.5982666 0.79154205q-0.096206665 0.46846008 0.19932556 1.0543976q0.3025818 0.59988403 0.6804962 0.75933075q0.384964 0.17339325 0.7198181 0.0045928955q0.29299927 -0.14770508 0.33377075 -0.48322296q0.020141602 -0.23763275 -0.15029907 -1.0266113q-0.24130249 -1.0682297 -0.26387024 -1.5293045q-0.0015716553 -0.4541626 0.20687866 -0.8042145q0.21546936 -0.33609772 0.5921936 -0.5260086q0.34880066 -0.17583466 0.70526123 -0.16304779q0.37039185 0.0057525635 0.7064667 0.18630219q0.25198364 0.11794281 0.52557373 0.41748047q0.27357483 0.29953766 0.4705963 0.690155q0.3025818 0.59989166 0.36032104 1.130722q0.06477356 0.5447769 -0.1366272 0.90878296q-0.18040466 0.37091827 -0.6265259 0.70079803l-0.5338135 -0.7807846q0.355484 -0.26669312 0.42404175 -0.6512146q0.089538574 -0.37760162 -0.16378784 -0.87983704q-0.30256653 -0.59988403 -0.6245575 -0.7525253q-0.32199097 -0.15264893 -0.58709717 -0.019012451q-0.16741943 0.08440399 -0.2437439 0.24536133q-0.083221436 0.1819458 -0.06829834 0.45439148q0.021469116 0.14665985 0.16377258 0.87983704q0.22018433 1.0263748 0.2496643 1.4664688q0.02947998 0.440094 -0.17193604 0.8040924q-0.18743896 0.35697174 -0.6339264 0.5820465q-0.43252563 0.21804047 -0.9358978 0.15682983q-0.5033722 -0.061210632 -0.9519043 -0.43003845q-0.4485321 -0.3688202 -0.75109863 -0.96871185q-0.49960327 -0.99050903 -0.36238098 -1.724617q0.15821838 -0.7271881 0.8970947 -1.274643z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m62.48595 164.64017l52.724415 69.291336l-23.874016 18.173233l-52.724415 -69.29135z" fill-rule="nonzero"></path><path fill="#000000" d="m53.061855 184.02805l4.53796 -3.4543457l0.52038574 0.6838989l-0.68379974 0.5205231q0.6930313 -0.09553528 1.0125313 0.014709473q0.31950378 0.11026001 0.5181961 0.37138367q0.30277252 0.39790344 0.35688782 0.98509216l-0.9073601 0.2783203q-0.055992126 -0.4090271 -0.27360916 -0.6950226q-0.18923187 -0.24868774 -0.48981094 -0.33407593q-0.30057907 -0.08538818 -0.64033127 0.03578186q-0.50489426 0.18797302 -0.9897728 0.5570679l-2.3746567 1.8076172l-0.58662033 -0.7709503zm4.4196167 5.8083496l0.67136765 -0.5110626q-1.1776772 0.052078247 -1.8683739 -0.85565186q-0.30277252 -0.39790344 -0.42796326 -0.8720703q-0.10329819 -0.47120667 -0.01197052 -0.8156433q0.113220215 -0.34146118 0.40159607 -0.6591644q0.1859436 -0.22007751 0.68325424 -0.5986481l2.809803 -2.138855l0.58662033 0.77093506l-2.5114174 1.9117279q-0.60920715 0.46374512 -0.78271484 0.6743622q-0.24161911 0.30174255 -0.24536896 0.6580658q0.005710602 0.36875916 0.2706375 0.71691895q0.2649231 0.34817505 0.6660614 0.5140991q0.42303085 0.1689148 0.8160324 0.06611633q0.40543365 -0.11224365 0.9773407 -0.54759216l2.436821 -1.85495l0.58662033 0.7709503l-4.53796 3.454361l-0.52038574 -0.6838989zm1.3179626 1.7320862l4.537956 -3.454361l0.52985 0.69633484l-0.64650345 0.49212646q1.1244316 -0.07044983 1.8435097 0.87457275q0.31223297 0.41033936 0.42796326 0.8720856q0.1281662 0.4522705 0.0025100708 0.80319214q-0.103759766 0.3538971 -0.3702469 0.6745758q-0.19540405 0.20765686 -0.730011 0.61460876l-2.7849388 2.119934l-0.5866165 -0.7709503l2.7600708 -2.100998q0.47244644 -0.3596344 0.6300087 -0.6170349q0.16999054 -0.26686096 0.12697601 -0.60720825q-0.021110535 -0.33740234 -0.25765228 -0.6482544q-0.3690033 -0.48495483 -0.9542084 -0.608963q-0.5852051 -0.12399292 -1.4679298 0.5479431l-2.474121 1.8833313l-0.5866165 -0.77093506zm5.5593147 5.886963l-0.5956726 0.61053467q-0.3205986 -0.26651 -0.5098305 -0.515213q-0.32169342 -0.42277527 -0.36470413 -0.7631378q-0.033546448 -0.32792664 0.10211563 -0.58828735q0.14512634 -0.2479248 0.841362 -0.7779083l2.6108818 -1.987442l-0.43523407 -0.57199097l0.59677124 -0.4542694l0.43523407 0.57199097l1.1189499 -0.85176086l1.0495987 0.39888l-1.5913925 1.2113953l0.59607697 0.783371l-0.59677124 0.4542694l-0.59607697 -0.783371l-2.660614 2.025299q-0.32324982 0.24606323 -0.39432907 0.35906982q-0.04918289 0.115982056 -0.04511261 0.25035095q0.025959015 0.1373291 0.14896011 0.2989807q0.1040802 0.13677979 0.2897873 0.3292389zm5.215065 -2.8999329l0.8827286 -0.67193604l0.5866165 0.77093506l-0.88272095 0.6719513l-0.58662415 -0.7709503zm-5.3833847 4.0979156l4.537964 -3.454361l0.5866165 0.7709503l-4.537956 3.4543457l-0.58662415 -0.77093506zm1.4241486 1.8716278l4.537956 -3.454361l0.5298462 0.6963501l-0.6340637 0.48265076q0.49652863 -0.044128418 0.9603729 0.15261841q0.47331238 0.20916748 0.8139343 0.6568146q0.3879242 0.50982666 0.42256927 0.9940033q0.047073364 0.47473145 -0.23426056 0.90489197q1.2025452 -0.071014404 1.8553925 0.78697205q0.52038574 0.6839142 0.42179108 1.3284302q-0.098594666 0.644516 -0.86943054 1.2312927l-3.1206207 2.3754578l-0.57715607 -0.7585144l2.8595352 -2.176712q0.4600067 -0.35017395 0.6021652 -0.5762024q0.15458679 -0.23548889 0.12753296 -0.52908325q-0.027061462 -0.29359436 -0.22575378 -0.554718q-0.3690033 -0.48495483 -0.9382553 -0.5621948q-0.55979156 -0.06478882 -1.2560272 0.4651947l-2.6357422 2.006363l-0.58662415 -0.7709503l2.9465637 -2.2429657q0.50974274 -0.38801575 0.6289139 -0.7732849q0.11916351 -0.3852539 -0.2025299 -0.8080292q-0.2460022 -0.32330322 -0.63768005 -0.47680664q-0.3822174 -0.1410675 -0.81251526 -0.009887695q-0.41786957 0.12171936 -1.039505 0.5949249l-2.3497925 1.7886963l-0.5866165 -0.7709503zm9.207695 9.056122l0.5060806 0.87153625q-0.83815765 0.34346008 -1.611496 0.12702942q-0.7733383 -0.21644592 -1.3694229 -0.9998169q-0.7569275 -0.99476624 -0.59241486 -2.042923q0.16451263 -1.048172 1.2710266 -1.8904572q1.1562424 -0.8801575 2.22258 -0.76893616q1.0882263 0.11419678 1.7978439 1.0467987q0.70015717 0.92015076 0.5137558 1.9653473q-0.17397308 1.0357208 -1.3053589 1.8969574q-0.062156677 0.047317505 -0.1989212 0.15141296l-2.573555 -3.3822021q-0.7175751 0.6051483 -0.8315811 1.2810211q-0.104537964 0.688324 0.3306961 1.260315q0.32169342 0.42277527 0.76013184 0.560318q0.4508667 0.12808228 1.0806351 -0.07640076zm-0.67742157 -3.4706116l1.9301605 2.5366516q0.53406525 -0.4850769 0.64024353 -0.9390106q0.15129852 -0.7042694 -0.293396 -1.2886963q-0.4068451 -0.5346985 -1.0417786 -0.62083435q-0.6225052 -0.09561157 -1.2352295 0.31188965zm-1.8461914 6.8112946l0.55947113 -0.4258728l3.8792496 5.098175l-0.55947113 0.4258728l-3.8792496 -5.098175zm8.111038 7.0471954l0.57190704 -0.43533325q-0.9930649 0.088272095 -1.6364517 -0.75727844q-0.40685272 -0.5346832 -0.45854187 -1.2219086q-0.051696777 -0.6872101 0.2936859 -1.3428497q0.34537506 -0.65563965 1.0416107 -1.1856232q0.68379974 -0.5205231 1.4011459 -0.7131195q0.7392502 -0.18962097 1.3658218 0.04034424q0.63899994 0.22052002 1.0647736 0.7800751q0.31223297 0.41033936 0.38417053 0.86613464q0.07194519 0.4557953 -0.050186157 0.8629608l2.250328 -1.7129822l0.5866165 0.77093506l-6.2661133 4.7698517l-0.5487671 -0.72120667zm0.4177475 -4.1471863q-0.87029266 0.6624756 -1.0310516 1.3543243q-0.13887024 0.69480896 0.2395935 1.1921997q0.38793182 0.5098114 1.0631332 0.54566956q0.67520905 0.035858154 1.5206375 -0.60769653q0.932457 -0.7097931 1.093216 -1.4016418q0.17021942 -0.67941284 -0.23662567 -1.2140961q-0.3879242 -0.5098114 -1.0755692 -0.5362091q-0.66574097 -0.023422241 -1.5733337 0.66744995zm4.761055 7.908478l0.5060806 0.871521q-0.83815765 0.34346008 -1.611496 0.12702942q-0.77334595 -0.21643066 -1.3694229 -0.9998169q-0.7569275 -0.99476624 -0.59241486 -2.042923q0.16451263 -1.0481567 1.2710266 -1.8904572q1.1562424 -0.8801422 2.22258 -0.7689209q1.0882263 0.11419678 1.7978439 1.0467834q0.70015717 0.920166 0.5137558 1.9653625q-0.17397308 1.0357208 -1.3053589 1.8969421q-0.062164307 0.047317505 -0.1989212 0.15142822l-2.573555 -3.3822174q-0.7175751 0.6051483 -0.8315811 1.2810364q-0.104537964 0.688324 0.3306961 1.260315q0.32169342 0.42277527 0.76013184 0.560318q0.4508667 0.12806702 1.0806351 -0.07640076zm-0.67742157 -3.4706268l1.9301605 2.5366669q0.53406525 -0.48509216 0.64024353 -0.9390106q0.15129852 -0.70428467 -0.293396 -1.2887115q-0.4068451 -0.5346832 -1.0417862 -0.62083435q-0.62249756 -0.09561157 -1.2352219 0.31188965zm-1.3068848 7.5200806l6.278549 -4.779312l0.53930664 0.70877075l-0.58434296 0.4447937q0.5249176 -0.0068359375 0.93551636 0.1715393q0.41059875 0.17837524 0.7512207 0.62602234q0.43523407 0.57199097 0.47746277 1.2467651q0.0422287 0.67477417 -0.33450317 1.3150177q-0.3643036 0.6307678 -1.0232391 1.13237q-0.69623566 0.5299835 -1.4449387 0.7071686q-0.7362747 0.16772461 -1.4036636 -0.09008789q-0.65792084 -0.24537659 -1.0553131 -0.76763916q-0.29330444 -0.38546753 -0.36821747 -0.81936646q-0.065452576 -0.421463 0.031814575 -0.8096924l-2.2130356 1.6845856l-0.5866165 -0.77093506zm4.5083313 -2.332138q-0.87029266 0.6624756 -1.0186157 1.3448486q-0.13589478 0.6729126 0.24256897 1.1703033q0.3879242 0.5098114 1.085022 0.548645q0.71899414 0.041793823 1.6390152 -0.6585388q0.8578644 -0.65301514 1.0186234 -1.3448639q0.17022705 -0.6793976 -0.2082367 -1.1767883q-0.37846375 -0.4973755 -1.1317902 -0.5326843q-0.74385834 -0.022872925 -1.6265869 0.64907837zm1.949089 4.3935547l0.7014847 0.6638794q-0.41270447 0.41233826 -0.44374084 0.88760376q-0.009140015 0.47825623 0.38824463 1.0005035q0.4068451 0.5346832 0.8074341 0.62249756q0.41004944 0.100234985 0.70843506 -0.12690735q0.26109314 -0.19874573 0.23997498 -0.5361328q-0.023536682 -0.23736572 -0.33499146 -0.9821167q-0.43202972 -1.0064392 -0.53829956 -1.4557495q-0.084373474 -0.44631958 0.056678772 -0.8286133q0.15052032 -0.3698578 0.48620605 -0.6253967q0.31082153 -0.23658752 0.66355133 -0.28909302q0.3651657 -0.061965942 0.7284546 0.054229736q0.26922607 0.06997681 0.5927963 0.3146057q0.32357025 0.24461365 0.58849335 0.59277344q0.4068451 0.5346985 0.5604248 1.0461731q0.16304016 0.5239105 0.031440735 0.9186249q-0.109703064 0.39770508 -0.48807526 0.8035431l-0.66716003 -0.6703491q0.30081177 -0.32717896 0.2980652 -0.7178192q0.01915741 -0.38768005 -0.3214569 -0.83532715q-0.40685272 -0.5346832 -0.7512207 -0.62602234q-0.34436798 -0.09132385 -0.5805893 0.08850098q-0.14919281 0.11355591 -0.19485474 0.28578186q-0.04863739 0.19410706 0.015724182 0.45932007q0.047851562 0.14030457 0.3214569 0.83532715q0.40364838 0.96913147 0.5128937 1.3965302q0.10923767 0.42741394 -0.022361755 0.8221283q-0.11916351 0.38526917 -0.51701355 0.68811035q-0.38541412 0.29338074 -0.8914032 0.3250885q-0.5059967 0.031707764 -1.014183 -0.24909973q-0.50818634 -0.28082275 -0.91503143 -0.815506q-0.6717758 -0.8828583 -0.6707611 -1.6298218q0.022903442 -0.7440033 0.64938354 -1.4172668z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m53.480316 55.42551l0 49.165356l-29.984253 0l0 -49.165356z" fill-rule="nonzero"></path><path fill="#000000" d="m34.240314 68.84738l0.71875 0q-0.84375 -0.53125 -0.84375 -1.59375q0 -0.671875 0.375 -1.25q0.375 -0.578125 1.046875 -0.890625q0.671875 -0.3125 1.546875 -0.3125q0.859375 0 1.546875 0.28125q0.703125 0.296875 1.0625 0.859375q0.375 0.5625 0.375 1.265625q0 0.515625 -0.21875 0.921875q-0.21875 0.40625 -0.5625 0.65625l2.828125 0l0 0.96875l-7.875 0l0 -0.90625zm2.84375 -3.046875q-1.09375 0 -1.640625 0.453125q-0.53125 0.46875 -0.53125 1.09375q0 0.640625 0.515625 1.078125q0.515625 0.4375 1.578125 0.4375q1.171875 0 1.71875 -0.453125q0.546875 -0.4375 0.546875 -1.109375q0 -0.640625 -0.53125 -1.078125q-0.515625 -0.421875 -1.65625 -0.421875zm-1.0 9.176498l-0.125 1.0q-0.875 -0.234375 -1.359375 -0.875q-0.484375 -0.640625 -0.484375 -1.625q0 -1.25 0.765625 -1.984375q0.765625 -0.734375 2.15625 -0.734375q1.453125 0 2.234375 0.734375q0.796875 0.75 0.796875 1.921875q0 1.15625 -0.78125 1.875q-0.765625 0.71875 -2.1875 0.71875q-0.078125 0 -0.25 0l0 -4.25q-0.9375 0.046875 -1.4375 0.515625q-0.5 0.484375 -0.5 1.203125q0 0.53125 0.265625 0.90625q0.28125 0.375 0.90625 0.59375zm1.5625 -3.171875l0 3.1875q0.71875 -0.0625 1.078125 -0.359375q0.546875 -0.46875 0.546875 -1.203125q0 -0.671875 -0.453125 -1.125q-0.4375 -0.453125 -1.171875 -0.5zm-5.59375 5.1921234l7.890625 0l0 0.890625l-0.734375 0q0.421875 0.3125 0.640625 0.703125q0.21875 0.390625 0.21875 0.953125q0 0.71875 -0.375 1.28125q-0.375 0.5625 -1.0625 0.84375q-0.671875 0.28125 -1.5 0.28125q-0.875 0 -1.578125 -0.3125q-0.6875 -0.3125 -1.0625 -0.921875q-0.375 -0.59375 -0.375 -1.25q0 -0.484375 0.203125 -0.875q0.203125 -0.375 0.515625 -0.625l-2.78125 0l0 -0.96875zm5.0 0.875q-1.09375 0 -1.625 0.453125q-0.515625 0.453125 -0.515625 1.078125q0 0.640625 0.53125 1.09375q0.546875 0.46875 1.703125 0.46875q1.078125 0 1.625 -0.453125q0.546875 -0.4375 0.546875 -1.0625q0 -0.625 -0.578125 -1.109375q-0.578125 -0.46875 -1.6875 -0.46875zm-1.109375 4.6764984l0.15625 0.953125q-0.578125 0.078125 -0.890625 0.4375q-0.296875 0.375 -0.296875 1.03125q0 0.671875 0.265625 0.984375q0.265625 0.328125 0.640625 0.328125q0.328125 0 0.515625 -0.28125q0.125 -0.203125 0.328125 -0.984375q0.265625 -1.0625 0.453125 -1.484375q0.203125 -0.40625 0.546875 -0.625q0.34375 -0.203125 0.765625 -0.203125q0.390625 0 0.703125 0.171875q0.328125 0.171875 0.546875 0.484375q0.171875 0.21875 0.28125 0.609375q0.109375 0.390625 0.109375 0.828125q0 0.671875 -0.1875 1.171875q-0.1875 0.515625 -0.53125 0.75q-0.328125 0.25 -0.875 0.34375l-0.125 -0.9375q0.4375 -0.078125 0.671875 -0.390625q0.25 -0.296875 0.25 -0.859375q0 -0.671875 -0.21875 -0.953125q-0.21875 -0.28125 -0.515625 -0.28125q-0.1875 0 -0.328125 0.109375q-0.15625 0.125 -0.265625 0.375q-0.046875 0.140625 -0.25 0.859375q-0.265625 1.015625 -0.4375 1.421875q-0.171875 0.40625 -0.515625 0.640625q-0.328125 0.234375 -0.828125 0.234375q-0.484375 0 -0.90625 -0.28125q-0.421875 -0.28125 -0.65625 -0.8125q-0.234375 -0.53125 -0.234375 -1.203125q0 -1.109375 0.453125 -1.703125q0.46875 -0.578125 1.375 -0.734375z" fill-rule="nonzero"></path></g></svg>
+
diff --git a/site/docs/skylark/build-style.md b/site/docs/skylark/build-style.md
index 5a47a30eda..d7787593aa 100644
--- a/site/docs/skylark/build-style.md
+++ b/site/docs/skylark/build-style.md
@@ -1,4 +1,114 @@
---
-layout: redirect
-redirect: docs/skylark/build-style.html
+layout: documentation
+title: Style guide for BUILD files
---
+
+# BUILD file style guide
+
+In `BUILD` files, we take the same approach as in Go: We let the machine take care
+of most formatting issues.
+[Buildifier](https://github.com/bazelbuild/buildifier) is a tool that parses and
+emits the source code in a standard style. Every `BUILD` file is therefore
+formatted in the same automated way, which makes formatting a non-issue during
+code reviews. It also makes it easier for tools to understand, edit, and
+generate `BUILD` files.
+
+`BUILD` file formatting must match the output of `buildifier`.
+
+## Formatting example
+
+```python
+package(default_visibility = ["//visibility:public"])
+
+py_test(
+ name = "foo_test",
+ srcs = glob(["*.py"]),
+ data = [
+ "//data/production/foo:startfoo",
+ "//foo",
+ "//third_party/java/jdk:jdk-k8",
+ ],
+ flaky = 1,
+ deps = [
+ ":check_bar_lib",
+ ":foo_data_check",
+ ":pick_foo_port",
+ "//pyglib",
+ "//testing/pybase",
+ ],
+)
+```
+
+## File structure
+
+We recommend to use the following order (every element is optional):
+
+ * Package description (a comment)
+
+ * All `load()` statements
+
+ * The `package()` function.
+
+ * Calls to rules and macros
+
+Buildifier makes a distinction between a standalone comment and a comment
+attached to an element. If a comment is not attached to a specific element, use
+an empty line after it. The distinction is important when doing automated
+changes (e.g. to decide if we keep or remove a comment when we delete a rule).
+
+```python
+# Standalone comment (e.g. to make a section in a file)
+
+# Comment for the cc_library below
+cc_library(name = "cc")
+```
+
+## Conventions
+
+ * Use uppercase and underscores to declare constants (e.g. `GLOBAL_CONSTANT`),
+ use lowercase and underscores to declare variables (e.g. `my_variable`).
+
+ * Labels should be canonicalized. Use `//foo/bar` instead of `//foo/bar:bar`.
+ Use `:bar` if it is defined in the same package. *Rationale*: It makes clear
+ if a label is local to a package. Sorting a list of labels is messy if all
+ labels do not use the same conventions.
+
+ * Labels should never be split, even if they are longer than 79 characters.
+ Labels should be string literals whenever possible. Rationale: It makes
+ find and replace easy. It also improves readability.
+
+ * The value of the name attribute should be a literal constant string (except
+ in macros). *Rationale*: External tools use the name attribute to refer a
+ rule. They need to find rules without having to interpret code.
+
+## Differences with Python style guide
+
+Although compatibility with
+[Python style guide](https://www.python.org/dev/peps/pep-0008/) is a goal, there
+are a few differences:
+
+ * No strict line length limit. Long comments and long strings are often split
+ to 79 columns, but it is not required. It should not be enforced in code
+ reviews or presubmit scripts. *Rationale*: Labels can be long and exceed this
+ limit. It is common for `BUILD` files to be generated or edited by tools, which
+ does not go well with a line length limit.
+
+ * Implicit string concatenation is not supported. Use the `+` operator.
+ *Rationale*: `BUILD` files contain many string lists. It is easy to forget a
+ comma, which leads to a complete different result. This has created many bugs
+ in the past. [See also this discussion.](https://lwn.net/Articles/551438/)
+
+ * Use spaces around the `=` sign for keywords arguments in rules. *Rationale*:
+ Named arguments are much more frequent than in Python and are always on a
+ separate line. Spaces improve readability. This convention has been around
+ for a long time, and we don't think it is worth modifying all existing
+ `BUILD` files.
+
+ * By default, use double quotation marks for strings. *Rationale*: This is not
+ specified in the Python style guide, but it recommends consistency. So we
+ decided to use only double-quoted strings. Many languages use double-quotes
+ for string literals.
+
+ * Use a single blank line between two top-level definitions. *Rationale*: The
+ structure of a `BUILD` file is not like a typical Python file. It has only
+ top-level statements. Using a single-blank line makes `BUILD` files shorter.
diff --git a/site/docs/skylark/bzl-style.md b/site/docs/skylark/bzl-style.md
index c17600796b..66c2d2918e 100644
--- a/site/docs/skylark/bzl-style.md
+++ b/site/docs/skylark/bzl-style.md
@@ -1,4 +1,52 @@
---
-layout: redirect
-redirect: docs/skylark/bzl-style.html
+layout: documentation
+title: Style guide for bzl files
---
+
+# .bzl file style guide
+
+## Style
+
+* When in doubt, follow the
+ [Python style guide](https://www.python.org/dev/peps/pep-0008/).
+
+* Code should be documented using
+ [docstrings](https://www.python.org/dev/peps/pep-0257/). Use a docstring at
+ the top of the file, and a docstring for each public function.
+
+* Variables and function names use lowercase with words separated by underscores
+ (`[a-z][a-z0-9_]*`), e.g. `cc_library`. Top-level private values start with
+ one underscore. Bazel enforces that private values cannot be used from other
+ files.
+
+* As in BUILD files, there is no strict line length limit as labels can be long.
+ When possible, try to use at most 79 characters per line.
+
+* In keyword arguments, spaces around the equal sign are optional. In general,
+ we follow the BUILD file convention when calling macros and native rules, and
+ the Python convention for other functions, e.g.
+
+```python
+def fct(name, srcs):
+ filtered_srcs = my_filter(source=srcs)
+ native.cc_library(
+ name = name,
+ srcs = filtered_srcs,
+ )
+```
+
+## Macros
+
+A [macro](macros.md) is a function which instantiates one or many rules during
+the loading phase.
+
+* Macros must accept a name attribute and each invocation should specify a name.
+ The generated name attribute of rules should include the name attribute as a
+ prefix. For example, `my_macro(name = "foo")` can generate a rule `foo` and a
+ rule `foo_gen`. *Rationale*: Users should be able to find easily which macro
+ generated a rule. Also, automated refactoring tools need a way to identify a
+ specific rule to edit.
+
+* When calling a macro, use only keyword arguments. *Rationale*: This is for
+ consistency with rules, it greatly improves readability.
+
diff --git a/site/docs/skylark/concepts.md b/site/docs/skylark/concepts.md
index a1e5028f15..8caf553dfb 100644
--- a/site/docs/skylark/concepts.md
+++ b/site/docs/skylark/concepts.md
@@ -1,4 +1,220 @@
---
-layout: redirect
-redirect: docs/skylark/concepts.html
+layout: documentation
+title: Extensions - Overview
---
+# Overview
+
+
+## Loading an extension
+
+Extensions are files with the `.bzl` extension. Use the `load` statement to
+import a symbol from an extension.
+
+```python
+load("//build_tools/rules:maprule.bzl", "maprule")
+```
+
+This code will load the file `build_tools/rules/maprule.bzl` and add the
+`maprule` symbol to the environment. This can be used to load new rules,
+functions or constants (e.g. a string, a list, etc.). Multiple symbols can be
+imported by using additional arguments to the call to `load`. Arguments must
+be string literals (no variable) and `load` statements must appear at
+top-level, i.e. they cannot be in a function body.
+
+`load` also supports aliases, i.e. you can assign different names to the
+imported symbols.
+
+```python
+load("//build_tools/rules:maprule.bzl", maprule_alias = "maprule")
+```
+
+You can define multiple aliases within one `load` statement. Moreover, the
+argument list can contain both aliases and regular symbol names. The following
+example is perfectly legal (please note when to use quotation marks).
+
+```python
+load(":my_rules.bzl", "some_rule", nice_alias = "some_other_rule")
+```
+
+In a `.bzl` file, symbols starting with `_` are private and cannot be loaded
+from another file. Visibility doesn't affect loading (yet): you don't need to
+use `exports_files` to make a `.bzl` file visible.
+
+## Macros and rules
+
+A [macro](macros.md) is a function that instantiates rules. It is useful when a
+BUILD file is getting too repetitive or too complex, as it allows you to reuse
+some code. The function is evaluated as soon as the BUILD file is read. After
+the evaluation of the BUILD file, Bazel has little information about macros: if
+your macro generates a `genrule`, Bazel will behave as if you wrote the
+`genrule`. As a result, `bazel query` will only list the generated `genrule`.
+
+A [rule](rules.md) is more powerful than a macro. It can access Bazel internals
+and have full control over what is going on. It may for example pass information
+to other rules.
+
+If you want to reuse simple logic, start with a macro. If a macro becomes
+complex, it is often a good idea to make it a rule. Support for a new language
+is typically done with a rule. Rules are for advanced users: we expect that most
+people will never have to write one, they will only load and call existing
+rules.
+
+## Evaluation model
+
+A build consists of three phases.
+
+* **Loading phase**. First, we load and evaluate all extensions and all BUILD
+ files that are needed for the build. The execution of the BUILD files simply
+ instantiates rules (each time a rule is called, it gets added to a graph).
+ This is where macros are evaluated.
+
+* **Analysis phase**. The code of the rules is executed (their `implementation`
+ function), and actions are instantiated. An action describes how to generate
+ a set of outputs from a set of inputs, e.g. "run gcc on hello.c and get
+ hello.o". It is important to note that we have to list explicitly which
+ files will be generated before executing the actual commands. In other words,
+ the analysis phase takes the graph generated by the loading phase and
+ generates an action graph.
+
+* **Execution phase**. Actions are executed, when at least one of their outputs is
+ required. If a file is missing or if a command fails to generate one output,
+ the build fails. Tests are also run during this phase.
+
+Bazel uses parallelism to read, parse and evaluate the `.bzl` files and `BUILD`
+files. A file is read at most once per build and the result of the evaluation is
+cached and reused. A file is evaluated only once all its dependencies (`load()`
+statements) have been resolved. By design, loading a `.bzl` file has no visible
+side-effect, it only defines values and functions.
+
+Bazel tries to be clever: it uses dependency analysis to know which files must
+be loaded, which rules must be analyzed, and which actions must be executed. For
+example, if a rule generates actions that we don't need for the current build,
+they will not be executed.
+
+## Backward-incompatible changes
+
+As we make changes and polish the extension mechanism, old features may be
+removed and new features that are not backwards-compatible may be added.
+
+Each release, new incompatible changes will be behind a flag with its default
+value set to `false`. In later releases, the flag will be enabled by default, or
+the flag will be removed entirely.
+
+To check if your code will be compatible with future releases:
+
+* build your code with the flag `--all_incompatible_changes`, or
+* use boolean flags to enable/disable specific incompatible changes.
+
+This following are the planned incompatible changes that are implemented and
+guarded behind flags.
+
+### Set constructor
+
+We are removing the `set` constructor. Use `depset` instead. `set` and `depset`
+are equivalent, you just need to do search and replace to update the old code.
+
+We are doing this to reduce confusion between the specialized
+[depset](depsets.md) data structure and Python's set datatype.
+
+* Flag: `--incompatible_disallow_set_constructor=true`
+* Introduced in: 0.5.1
+
+### Keyword-only arguments
+
+Keyword-only parameters are parameters that can be called only using their name.
+
+``` python
+def foo(arg1, *, arg2): pass
+
+foo(3, arg2=3)
+```
+
+``` python
+def bar(arg1, *rest, arg2): pass
+
+bar(3, arg2=3)
+```
+
+In both examples, `arg2` must be named at the call site. To preserve syntactic
+compatibility with Python 2, we are removing this feature (which we have never
+documented).
+
+* Flag: `--incompatible_disallow_keyword_only_args=true`
+* Introduced in: 0.5.1
+
+### Mutating `+=`
+
+We are changing `left += right` when `left` is a list. The old behavior is
+equivalent to `left = left + right`, which creates a new list and assigns it to
+`left`. The new behavior does not rebind `left`, but instead just mutates the
+list in-place.
+
+``` python
+def fct():
+ li = [1]
+ alias = li
+ li += [2]
+ # Old behavior: alias == [1]
+ # New behavior: alias == [1, 2]
+```
+
+This change makes Skylark more compatible with Python and avoids performance
+issues. The `+=` operator for tuples is unaffected.
+
+* Flag: `--incompatible_list_plus_equals_inplace=true`
+* Introduced in: 0.5.1
+
+### Dictionary concatenation
+
+We are removing the `+` operator on dictionaries. This includes the `+=` form
+where the left-hand side is a dictionary. This is done to improve compatibility
+with Python. A possible workaround is to use the `.update` method instead.
+
+* Flag: `--incompatible_disallow_dict_plus=true`
+* Introduced in: 0.5.1
+
+## Upcoming changes
+
+The following items are upcoming changes.
+
+* Comprehensions currently "leak" the values of their loop variables into the
+ surrounding scope (Python 2 semantics). This will be changed so that
+ comprehension variables are local (Python 3 semantics).
+
+* Previously dictionaries were guaranteed to use sorted order for their keys.
+ Going forward, there is no guarantee on order besides that it is
+ deterministic. As an implementation matter, some kinds of dictionaries may
+ continue to use sorted order while others may use insertion order.
+
+These changes concern the `load()` syntax in particular.
+
+* Currently a `load()` statement can appear anywhere in a file so long as it is
+ at the top-level (not in an indented block of code). In the future they will
+ be required to appear at the beginning of the file, i.e., before any
+ non-`load()` statement.
+
+* In BUILD files, `load()` can overwrite an existing variable with the loaded
+ symbol. This will be disallowed in order to improve consistency with .bzl
+ files. Use load aliases to avoid name clashes.
+
+* The .bzl file can be specified as either a path or a label. In the future only
+ the label form will be allowed.
+
+* Cross-package visibility restrictions do not yet apply to loaded .bzl files.
+ At some point this will change. In order to load a .bzl from another package
+ it will need to be exported, such as by using an `exports_files` declaration.
+ The exact syntax has not yet been decided.
+
+
+## Profiling the code
+
+To profile your code and analyze the performance, use the `--profile` flag:
+
+```
+$ bazel build --nobuild --profile=/tmp/prof //path/to:target
+$ bazel analyze-profile /tmp/prof --html --html_details
+```
+
+Then, open the generated HTML file (`/tmp/prof.html` in the example).
+
+
diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md
index a4a4dadcbb..28303e2457 100644
--- a/site/docs/skylark/cookbook.md
+++ b/site/docs/skylark/cookbook.md
@@ -1,4 +1,950 @@
---
-layout: redirect
-redirect: docs/skylark/cookbook.html
+layout: documentation
+title: Extensions examples
---
+# Extensions examples
+
+## <a name="macro"></a>Macro creating a rule
+
+An example of a macro creating a rule.
+
+`empty.bzl`:
+
+```python
+def _impl(ctx):
+ print("This rule does nothing")
+
+empty = rule(implementation=_impl)
+```
+
+`extension.bzl`:
+
+```python
+# Loading the rule. The rule doesn't have to be in a separate file.
+load("//pkg:empty.bzl", "empty")
+
+def macro(name, visibility=None):
+ # Creating the rule.
+ empty(name = name, visibility = visibility)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "macro")
+
+macro(name = "myrule")
+```
+
+## <a name="macro_native"></a>Macro creating a native rule
+
+An example of a macro creating a native rule. Native rules are special rules
+that are automatically available (without <code>load</code>). They are
+accessed using the <a href="lib/native.html">native</a> module.
+
+`extension.bzl`:
+
+```python
+def macro(name, visibility=None):
+ # Creating a native genrule.
+ native.genrule(
+ name = name,
+ outs = [name + '.txt'],
+ cmd = 'echo hello > $@',
+ visibility = visibility,
+ )
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "macro")
+
+macro(name = "myrule")
+```
+
+## <a name="macro_compound"></a>Macro multiple rules
+
+There's currently no easy way to create a rule that directly uses the
+action of a native rule. You can work around this using macros:
+
+```python
+def _impl(ctx):
+ return struct([...],
+ # When instrumenting this rule, again hide implementation from
+ # users.
+ instrumented_files(
+ source_attributes = ["srcs", "csrcs"],
+ dependency_attributes = ["deps", "cdeps"]))
+
+# This rule is private and can only be accessed from the current file.
+_cc_and_something_else_binary = rule(implementation=_impl)
+
+
+# This macro is public, it's the public interface to instantiate the rule.
+def cc_and_something_else_binary(name, srcs, deps, csrcs, cdeps):
+ cc_binary_name = "%s.cc_binary" % name
+
+ native.cc_binary(
+ name = cc_binary_name,
+ srcs = csrcs,
+ deps = cdeps,
+ visibility = ["//visibility:private"]
+ )
+
+ _cc_and_something_else_binary(
+ name = name,
+ srcs = srcs,
+ deps = deps,
+ # A label attribute so that this depends on the internal rule.
+ cc_binary = cc_binary_name,
+ # Redundant labels attributes so that the rule with this target name knows
+ # about everything it would know about if cc_and_something_else_binary
+ # were an actual rule instead of a macro.
+ csrcs = csrcs,
+ cdeps = cdeps)
+```
+
+
+## <a name="conditional-instantiation"></a>Conditional instantiation
+
+Macros can look at previously instantiated rules. This is done with
+`native.existing_rule`, which returns information on a single rule defined in the same
+`BUILD` file, eg.,
+
+```python
+native.existing_rule("descriptor_proto")
+```
+
+This is useful to avoid instantiating the same rule twice, which is an
+error. For example, the following macro will simulate a test suite,
+instantiating tests for diverse flavors of the same test.
+
+`extension.bzl`:
+
+```python
+def system_test(name, test_file, flavor):
+ n = "system_test_%s_%s_test" % (test_file, flavor)
+ if native.existing_rule(n) == None:
+ native.py_test(
+ name = n,
+ srcs = [
+ "test_driver.py",
+ test_file,
+ ],
+ args = ["--flavor=" + flavor],
+ )
+ return n
+
+def system_test_suite(name, flavors=["default"], test_files=[]):
+ ts = []
+ for flavor in flavors:
+ for test in test_files:
+ ts.append(system_test(name, test, flavor))
+ native.test_suite(name = name, tests = ts)
+```
+
+In the following BUILD file, note how `(basic_test.py, fast)` is emitted for
+both the `smoke` test suite and the `thorough` test suite.
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "system_test_suite")
+
+# Run all files through the 'fast' flavor.
+system_test_suite(
+ name = "smoke",
+ flavors = ["fast"],
+ test_files = glob(["*_test.py"]),
+)
+
+# Run the basic test through all flavors.
+system_test_suite(
+ name = "thorough",
+ flavors = [
+ "fast",
+ "debug",
+ "opt",
+ ],
+ test_files = ["basic_test.py"],
+)
+```
+
+
+## <a name="aggregation"></a>Aggregating over the BUILD file
+
+Macros can collect information from the BUILD file as processed so far. We call
+this aggregation. The typical example is collecting data from all rules of a
+certain kind. This is done by calling
+<a href="lib/native.html#existing_rules">native.existing\_rules</a>, which
+returns a dictionary representing all rules defined so far in the current BUILD
+file. The dictionary has entries of the form `name` => `rule`, with the values
+using the same format as `native.existing_rule`.
+
+```python
+def archive_cc_src_files(tag):
+ """Create an archive of all C++ sources that have the given tag."""
+ all_src = []
+ for r in native.existing_rules().values():
+ if tag in r["tags"] and r["kind"] == "cc_library":
+ all_src.append(r["srcs"])
+ native.genrule(cmd = "zip $@ $^", srcs = all_src, outs = ["out.zip"])
+```
+
+Since `native.existing_rules` constructs a potentially large dictionary, you should avoid
+calling it repeatedly within BUILD file.
+
+## <a name="empty"></a>Empty rule
+
+Minimalist example of a rule that does nothing. If you build it, the target will
+succeed (with no generated file).
+
+`empty.bzl`:
+
+```python
+def _impl(ctx):
+ # You may use print for debugging.
+ print("This rule does nothing")
+
+empty = rule(implementation=_impl)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:empty.bzl", "empty")
+
+empty(name = "nothing")
+```
+
+## <a name="attr"></a>Rule with attributes
+
+Example of a rule that shows how to declare attributes and access them.
+
+`printer.bzl`:
+
+```python
+def _impl(ctx):
+ # You may use print for debugging.
+ print("Rule name = %s, package = %s" % (ctx.label.name, ctx.label.package))
+
+ # This prints the labels of the deps attribute.
+ print("There are %d deps" % len(ctx.attr.deps))
+ for i in ctx.attr.deps:
+ print("- %s" % i.label)
+ # A label can represent any number of files (possibly 0).
+ print(" files = %s" % [f.path for f in i.files])
+
+printer = rule(
+ implementation=_impl,
+ attrs={
+ # Do not declare "name": It is added automatically.
+ "number": attr.int(default = 1),
+ "deps": attr.label_list(allow_files=True),
+ })
+```
+
+`BUILD`:
+
+```python
+load("//pkg:printer.bzl", "printer")
+
+printer(
+ name = "nothing",
+ deps = [
+ "BUILD",
+ ":other",
+ ],
+)
+
+printer(name = "other")
+```
+
+If you execute this file, some information is printed as a warning by the
+rule. No file is generated.
+
+## <a name="shell"></a>Simple shell command
+
+Example of a rule that runs a shell command on an input file specified by
+the user. The output has the same name as the rule, with a `.size` suffix.
+
+While convenient, Shell commands should be used carefully. Generating the
+command-line can lead to escaping and injection issues. It can also create
+portability problems. It is often better to declare a binary target in a
+BUILD file and execute it. See the example [executing a binary](#execute-bin).
+
+`size.bzl`:
+
+```python
+def _impl(ctx):
+ output = ctx.outputs.out
+ input = ctx.file.file
+ # The command may only access files declared in inputs.
+ ctx.action(
+ inputs=[input],
+ outputs=[output],
+ progress_message="Getting size of %s" % input.short_path,
+ command="stat -L -c%%s %s > %s" % (input.path, output.path))
+
+size = rule(
+ implementation=_impl,
+ attrs={"file": attr.label(mandatory=True, allow_files=True, single_file=True)},
+ outputs={"out": "%{name}.size"},
+)
+```
+
+`foo.txt`:
+
+```
+Hello
+```
+
+`BUILD`:
+
+```python
+load("//pkg:size.bzl", "size")
+
+size(
+ name = "foo_size",
+ file = "foo.txt",
+)
+```
+
+## <a name="file"></a>Write string to a file
+
+Example of a rule that writes a string to a file.
+
+`file.bzl`:
+
+```python
+def _impl(ctx):
+ output = ctx.outputs.out
+ ctx.file_action(output=output, content=ctx.attr.content)
+
+file = rule(
+ implementation=_impl,
+ attrs={"content": attr.string()},
+ outputs={"out": "%{name}.txt"},
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:file.bzl", "file")
+
+file(
+ name = "hello",
+ content = "Hello world",
+)
+```
+
+
+## <a name="execute-bin"></a>Execute a binary
+
+This rule executes an existing binary. In this particular example, the
+binary is a tool that merges files. During the analysis phase, we cannot
+access any arbitrary label: the dependency must have been previously
+declared. To do so, the rule needs a label attribute. In this example, we
+will give the label a default value and make it private (so that it is not
+visible to end users). Keeping the label private can simplify maintenance,
+since you can easily change the arguments and flags you pass to the tool.
+
+`execute.bzl`:
+
+```python
+def _impl(ctx):
+ # The list of arguments we pass to the script.
+ args = [ctx.outputs.out.path] + [f.path for f in ctx.files.srcs]
+ # Action to call the script.
+ ctx.action(
+ inputs=ctx.files.srcs,
+ outputs=[ctx.outputs.out],
+ arguments=args,
+ progress_message="Merging into %s" % ctx.outputs.out.short_path,
+ executable=ctx.executable._merge_tool)
+
+concat = rule(
+ implementation=_impl,
+ attrs={
+ "srcs": attr.label_list(allow_files=True),
+ "out": attr.output(mandatory=True),
+ "_merge_tool": attr.label(executable=True, cfg="host", allow_files=True,
+ default=Label("//pkg:merge"))
+ }
+)
+```
+
+Any executable target can be used. In this example, we will use a
+`sh_binary` rule that concatenates all the inputs.
+
+`BUILD`:
+
+```
+load("execute", "concat")
+
+concat(
+ name = "sh",
+ srcs = [
+ "header.html",
+ "body.html",
+ "footer.html",
+ ],
+ out = "page.html",
+)
+
+# This target is used by the shell rule.
+sh_binary(
+ name = "merge",
+ srcs = ["merge.sh"],
+)
+```
+
+`merge.sh`:
+
+```python
+#!/bin/bash
+
+out=$1
+shift
+cat $* > $out
+```
+
+`header.html`:
+
+```
+<html><body>
+```
+
+`body.html`:
+
+```
+content
+```
+
+`footer.html`:
+
+```
+</body></html>
+```
+
+## <a name="execute"></a>Execute an input binary
+
+This rule has a mandatory `binary` attribute. It is a label that can refer
+only to executable rules or files.
+
+`execute.bzl`:
+
+```python
+def _impl(ctx):
+ # ctx.new_file is used for temporary files.
+ # If it should be visible for user, declare it in rule.outputs instead.
+ f = ctx.new_file(ctx.configuration.bin_dir, "hello")
+ # As with outputs, each time you declare a file,
+ # you need an action to generate it.
+ ctx.file_action(output=f, content=ctx.attr.input_content)
+
+ ctx.action(
+ inputs=[f],
+ outputs=[ctx.outputs.out],
+ executable=ctx.executable.binary,
+ progress_message="Executing %s" % ctx.executable.binary.short_path,
+ arguments=[
+ f.path,
+ ctx.outputs.out.path, # Access the output file using
+ # ctx.outputs.<attribute name>
+ ]
+ )
+
+execute = rule(
+ implementation=_impl,
+ attrs={
+ "binary": attr.label(cfg="host", mandatory=True, allow_files=True,
+ executable=True),
+ "input_content": attr.string(),
+ "out": attr.output(mandatory=True),
+ },
+)
+```
+
+`a.sh`:
+
+```bash
+#!/bin/bash
+
+tr 'a-z' 'A-Z' < $1 > $2
+```
+
+`BUILD`:
+
+```python
+load("//pkg:execute.bzl", "execute")
+
+execute(
+ name = "e",
+ input_content = "some text",
+ binary = "a.sh",
+ out = "foo",
+)
+```
+
+## <a name="runfiles"></a>Runfiles and location substitution
+
+`execute.bzl`:
+
+```python
+def _impl(ctx):
+ executable = ctx.outputs.executable
+ command = ctx.attr.command
+ # Expand the label in the command string to a runfiles-relative path.
+ # The second arg is the list of labels that may be expanded.
+ command = ctx.expand_location(command, ctx.attr.data)
+ # Create the output executable file with command as its content.
+ ctx.file_action(
+ output=executable,
+ content=command,
+ executable=True)
+
+ return [DefaultInfo(
+ # Create runfiles from the files specified in the data attribute.
+ # The shell executable - the output of this rule - can use them at runtime.
+ # It is also possible to define data_runfiles and default_runfiles.
+ # However if runfiles is specified it's not possible to define the above
+ # ones since runfiles sets them both.
+ # Remember, that the struct returned by the implementation function needs
+ # to have a field named "runfiles" in order to create the actual runfiles
+ # symlink tree.
+ runfiles=ctx.runfiles(files=ctx.files.data)
+ )]
+
+execute = rule(
+ implementation=_impl,
+ executable=True,
+ attrs={
+ "command": attr.string(),
+ "data": attr.label_list(cfg="data", allow_files=True),
+ },
+)
+```
+
+`data.txt`:
+
+```
+Hello World!
+```
+
+`BUILD`:
+
+```python
+load("//pkg:execute.bzl", "execute")
+
+execute(
+ name = "e",
+ # The location will be expanded to "pkg/data.txt", and it will reference
+ # the data.txt file in runfiles when this target is invoked as
+ # "bazel run //pkg:e".
+ command = "cat $(location :data.txt)",
+ data = [':data.txt']
+)
+```
+
+## <a name="late-bound"></a>Computed dependencies
+
+Bazel needs to know about all dependencies before doing the analysis phase and
+calling the implementation function. Dependencies can be computed based on the
+rule attributes: to do so, use a function as the default
+value of an attribute (the attribute must be private and have type `label` or
+`list of labels`). The parameters of this function must correspond to the
+attributes that are accessed in the function body.
+
+Note: For legacy reasons, the function takes the configuration as an additional
+parameter. Please do not rely on the configuration since it will be removed in
+the future.
+
+The example below computes the md5 sum of a file. The file can be preprocessed
+using a filter. The exact dependencies depend on the filter chosen by the user.
+
+`hash.bzl`:
+
+```python
+_filters = {
+ "comments": Label("//pkg:comments"),
+ "spaces": Label("//pkg:spaces"),
+ "none": None,
+}
+
+def _get_filter(filter, cfg=None): # requires attribute "filter"
+ # Return the value for the attribute "_filter_bin"
+ # It can be a label or None.
+ return _filters[filter]
+
+def _impl(ctx):
+ src = ctx.file.src
+
+ if not ctx.attr._filter_bin:
+ # Skip the processing
+ processed = src
+ else:
+ processed = ctx.new_file(ctx.label.name + "_processed")
+ # Run the selected binary
+ ctx.action(
+ outputs = [processed],
+ inputs = [ctx.file.src],
+ progress_message="Apply filter '%s'" % ctx.attr.filter,
+ arguments = [ctx.file.src.path, processed.path],
+ executable = ctx.executable._filter_bin)
+
+ # Compute the hash
+ out = ctx.outputs.text
+ ctx.action(
+ outputs = [out],
+ inputs = [processed],
+ command = "md5sum < %s > %s" % (processed.path, out.path))
+
+md5_sum = rule(
+ implementation=_impl,
+ attrs={
+ "filter": attr.string(values=_filters.keys(), default="none"),
+ "src": attr.label(mandatory=True, single_file=True, allow_files=True),
+ "_filter_bin": attr.label(default=_get_filter, executable=True),
+ },
+ outputs = {"text": "%{name}.txt"})
+```
+
+`BUILD`:
+
+```python
+load("//pkg:hash.bzl", "md5_sum")
+
+md5_sum(
+ name = "hash",
+ src = "hello.txt",
+ filter = "spaces",
+)
+
+sh_binary(
+ name = "comments",
+ srcs = ["comments.sh"],
+)
+
+sh_binary(
+ name = "spaces",
+ srcs = ["spaces.sh"],
+)
+```
+
+`hello.txt`:
+
+```
+Hello World!
+```
+
+`comments.sh`:
+
+```
+#!/bin/bash
+grep -v '^ *#' $1 > $2 # Remove lines with only a Python-style comment
+```
+
+`spaces.sh`:
+
+```
+#!/bin/bash
+tr -d ' ' < $1 > $2 # Remove spaces
+```
+
+## <a name="mandatory-providers"></a>Mandatory providers
+
+In this example, rules have a `number` attribute. Each rule adds its
+number with the numbers of its transitive dependencies, and write the
+result in a file. This shows how to transfer information from a dependency
+to its dependents.
+
+`sum.bzl`:
+
+```python
+NumberInfo = provider()
+
+def _impl(ctx):
+ result = ctx.attr.number
+ for dep in ctx.attr.deps:
+ result += dep[NumberInfo].number
+ ctx.file_action(output=ctx.outputs.out, content=str(result))
+
+ # Return the provider with result, visible to other rules.
+ return [NumberInfo(number=result)]
+
+sum = rule(
+ implementation=_impl,
+ attrs={
+ "number": attr.int(default=1),
+ # All deps must provide all listed providers.
+ "deps": attr.label_list(providers=[NumberInfo]),
+ },
+ outputs = {"out": "%{name}.sum"}
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:sum.bzl", "sum")
+
+sum(
+ name = "n",
+ deps = ["n2", "n5"],
+)
+
+sum(
+ name = "n2",
+ number = 2,
+)
+
+sum(
+ name = "n5",
+ number = 5,
+)
+```
+
+## <a name="optional-providers"></a>Optional providers
+
+This is a similar example, but dependencies may not provide a number.
+
+`sum.bzl`:
+
+```python
+NumberInfo = provider()
+
+def _impl(ctx):
+ result = ctx.attr.number
+ for dep in ctx.attr.deps:
+ if NumberInfo in dep:
+ result += dep[NumberInfo].number
+ ctx.file_action(output=ctx.outputs.out, content=str(result))
+
+ # Return the provider with result, visible to other rules.
+ return [NumberInfo(number=result)]
+
+sum = rule(
+ implementation=_impl,
+ attrs={
+ "number": attr.int(default=1),
+ "deps": attr.label_list(),
+ },
+ outputs = {"out": "%{name}.sum"}
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:sum.bzl", "sum")
+
+sum(
+ name = "n",
+ deps = ["n2", "n5"],
+)
+
+sum(
+ name = "n2",
+ number = 2,
+)
+
+sum(
+ name = "n5",
+ number = 5,
+)
+```
+
+## <a name="outputs-executable"></a>Default executable output
+
+This example shows how to create a default executable output.
+
+`extension.bzl`:
+
+```python
+def _impl(ctx):
+ ctx.file_action(
+ # Access the executable output file using ctx.outputs.executable.
+ output=ctx.outputs.executable,
+ content="#!/bin/bash\necho Hello!",
+ executable=True
+ )
+ # The executable output is added automatically to this target.
+
+executable_rule = rule(
+ implementation=_impl,
+ executable=True
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "executable_rule")
+
+executable_rule(name = "my_rule")
+```
+
+## <a name="outputs-default"></a>Default outputs
+
+This example shows how to create default outputs for a rule.
+
+`extension.bzl`:
+
+```python
+def _impl(ctx):
+ ctx.file_action(
+ # Access the default outputs using ctx.outputs.<output name>.
+ output=ctx.outputs.my_output,
+ content="Hello World!"
+ )
+ # The default outputs are added automatically to this target.
+
+rule_with_outputs = rule(
+ implementation=_impl,
+ outputs = {
+ # %{name} is substituted with the rule's name
+ "my_output": "%{name}.txt"
+ }
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "rule_with_outputs")
+
+rule_with_outputs(name = "my_rule")
+```
+
+## <a name="outputs-custom"></a>Custom outputs
+
+This example shows how to create custom (user defined) outputs for a rule.
+This rule takes a list of output file name templates from the user and
+creates each of them containing a "Hello World!" message.
+
+`extension.bzl`:
+
+```python
+def _impl(ctx):
+ # Access the custom outputs using ctx.outputs.<attribute name>.
+ for output in ctx.outputs.outs:
+ ctx.file_action(
+ output=output,
+ content="Hello World!"
+ )
+ # The custom outputs are added automatically to this target.
+
+rule_with_outputs = rule(
+ implementation=_impl,
+ attrs={
+ "outs": attr.output_list()
+ }
+)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "rule_with_outputs")
+
+rule_with_outputs(
+ name = "my_rule",
+ outs = ["my_output.txt"]
+)
+```
+
+## <a name="master-rule"></a>Master rules
+
+This example shows how to create master rules to bind other rules together. The
+code below uses genrules for simplicity, but this technique is more useful with
+other rules. For example, if you need to compile C++ files, you can reuse
+`cc_library`.
+
+`extension.bzl`:
+
+```python
+def _impl(ctx):
+ # Aggregate the output files from the depending rules
+ files = depset()
+ files += ctx.attr.dep_rule_1.files
+ files += ctx.attr.dep_rule_2.files
+ return [DefaultInfo(files=files)]
+
+# This rule binds the depending rules together
+master_rule = rule(
+ implementation=_impl,
+ attrs={
+ "dep_rule_1": attr.label(),
+ "dep_rule_2": attr.label()
+ }
+)
+
+def macro(name, cmd, input):
+ # Create the depending rules
+ name_1 = name + "_dep_1"
+ name_2 = name + "_dep_2"
+ native.genrule(
+ name = name_1,
+ cmd = cmd,
+ outs = [name_1 + ".txt"]
+ )
+ native.genrule(
+ name = name_2,
+ cmd = "echo " + input + " >$@",
+ outs = [name_2 + ".txt"]
+ )
+ # Create the master rule
+ master_rule(
+ name = name,
+ dep_rule_1 = ":" + name_1,
+ dep_rule_2 = ":" + name_2
+ )
+```
+
+`BUILD`:
+
+```python
+load("//pkg:extension.bzl", "macro")
+
+# This creates the target :my_rule
+macro(
+ name = "my_rule",
+ cmd = "echo something > $@",
+ input = "Hello World"
+)
+```
+
+## <a name="debugging-tips"></a>Debugging tips
+
+Here are some examples on how to debug macros and rules using
+<a href="lib/globals.html#print">print</a>.
+
+`debug.bzl`:
+
+```python
+print("print something when the module is loaded")
+
+def _impl(ctx):
+ print("print something when the rule implementation is executed")
+ print(type("abc")) # prints string, the type of "abc"
+ print(dir(ctx)) # prints all the fields and methods of ctx
+ print(dir(ctx.attr)) # prints all the attributes of the rule
+ # prints the objects each separated with new line
+ print("object1", "object2", sep="\n")
+
+debug = rule(implementation=_impl)
+```
+
+`BUILD`:
+
+```python
+load("//pkg:debug.bzl", "debug")
+
+debug(
+ name = "printing_rule"
+)
+```
+
diff --git a/site/docs/skylark/deploying.md b/site/docs/skylark/deploying.md
index a56f7183ae..658445175e 100644
--- a/site/docs/skylark/deploying.md
+++ b/site/docs/skylark/deploying.md
@@ -1,4 +1,144 @@
---
-layout: redirect
-redirect: docs/skylark/deploying.html
+layout: documentation
+title: Deploying new Skylark rules
---
+# Deploying new Skylark rules
+
+This documentation is for Skylark rule writers who are planning to make their
+rules available to others.
+
+## Where to put new rules
+
+In general, new rules should go into their own GitHub repository under your
+organization. Contact the [bazel-dev mailing
+list](https://groups.google.com/forum/#!forum/bazel-dev) if you feel like your
+rules belong in the bazelbuild organization.
+
+You can see lots of examples of what your repository should look like on GitHub:
+see all of the repositories named `rules_whatever`. In particular,
+[rules_scala](https://github.com/bazelbuild/rules_scala) is a nice example of
+how to set up your repo.
+
+Rules can be grouped either by language (e.g., Scala) or some notion of platform
+(e.g., Android).
+
+## What a rule repository should contain
+
+Every rule repository should have a certain layout so that users can quickly
+understand new rules.
+
+For example, suppose we are writing new Skylark rules for the (make-believe)
+chaiscript language. We would have the following structure:
+
+```
+.travis.yml
+README.md
+WORKSPACE
+chaiscript/
+ BUILD
+ chaiscript.bzl
+tests/
+ BUILD
+ some_test.sh
+ another_test.py
+examples/
+ BUILD
+ bin.chai
+ lib.chai
+ test.chai
+```
+
+### README.md
+
+At the top level, there should be a README.md that contains (at least) what
+users will need to copy-paste into their WORKSPACE file to use your rule.
+In general, this will be a `git_repository` pointing to your GitHub repo and
+a macro call that downloads/configures any tools your rule needs. For example,
+for the [Go
+rules](https://github.com/bazelbuild/rules_go/blob/master/README.md#setup), this
+looks like:
+
+```
+git_repository(
+ name = "io_bazel_rules_go",
+ remote = "https://github.com/bazelbuild/rules_go.git",
+ tag = "0.0.2",
+)
+load("@io_bazel_rules_go//go:def.bzl", "go_repositories")
+
+go_repositories()
+```
+
+If your rules depend on another repository's rules, specify both in the
+`README.md` (see the [Skydoc rules](https://github.com/bazelbuild/skydoc#setup),
+which depend on the Sass rules, for an example of this).
+
+### Tests
+
+There should be tests that verify that the rules are working as expected. This
+can either be in the standard location for the language the rules are for or a
+`tests/` directory at the top level.
+
+### Optional: Examples
+
+It is useful to users to have an `examples/` directory that shows users a couple
+of basic ways that the rules can be used.
+
+## Testing
+
+Set up Travis as described in their [getting started
+docs](https://docs.travis-ci.com/user/getting-started/). Then add a
+`.travis.yml` file to your repository with the following content:
+
+```
+language:
+ - java
+jdk:
+ - oraclejdk8 # Building Bazel requires JDK8.
+before_install:
+ - wget https://github.com/bazelbuild/bazel/archive/0.3.0.zip # Replace with desired version
+ - unzip 0.3.0.zip
+ - cd bazel-0.3.0
+ - ./compile.sh
+ - sudo cp output/bazel /usr/bin/bazel
+ - cd ..
+ - rm -rf bazel-0.3.0
+script:
+ - bazel build //...
+ - bazel test //...
+```
+
+Right now Bazel has to be compiled from source, as Travis does not support a
+version of GCC that works with the precompiled Bazel binaries. Thus, the
+`before_install` steps download the Bazel source, compile it, and "install" the
+Bazel binary in /usr/bin.
+
+If your repository is under the [bazelbuild organization](https://github.com/bazelbuild),
+contact the [bazel-dev](https://groups.google.com/forum/#!forum/bazel-dev) list
+to have it added to [ci.bazel.build](http://ci.bazel.build).
+
+## Documentation
+
+See the [Skydoc documentation](https://github.com/bazelbuild/skydoc) for
+instructions on how to comment your rules so that documentation can be generated
+automatically.
+
+## FAQs
+
+### Why can't we add our rule to the Bazel GitHub repository?
+
+We want to decouple rules from Bazel releases as much as possible. It's clearer
+who owns individual rules, reducing the load on Bazel developers. For our users,
+decoupling makes it easier to modify, upgrade, downgrade, and replace rules.
+Contributing to rules can be lighter weight than contributing to Bazel -
+depending on the rules -, including full submit access to the corresponding
+GitHub repository. Getting submit access to Bazel itself is a much more involved
+process.
+
+The downside is a more complicated one-time installation process for our users:
+they have to copy-paste a rule into their WORKSPACE file, as shown in the
+README section above.
+
+We used to have all of the Skylark rules in the Bazel repository (under
+`//tools/build_rules` or `//tools/build_defs`). We still have a couple rules
+there, but we are working on moving the remaining rules out.
diff --git a/site/docs/skylark/depsets.md b/site/docs/skylark/depsets.md
new file mode 100644
index 0000000000..24114b3200
--- /dev/null
+++ b/site/docs/skylark/depsets.md
@@ -0,0 +1,401 @@
+---
+layout: documentation
+title: Depsets
+---
+
+# Depsets
+
+Depsets are a specialized data structure for efficiently collecting data across
+a target’s transitive dependencies. Since this use case concerns the [analysis
+phase](concepts.md#evaluation-model), depsets are useful for authors of rules
+and aspects, but probably not macros.
+
+The main feature of depsets is that they support a time- and space-efficient
+merge operation, whose cost is independent of the size of the existing contents.
+Depsets also have well-defined ordering semantics.
+
+Example uses of depsets include:
+
+* storing the paths of all object files for a program’s libraries, which can
+ then be passed to a linker action
+
+* for an interpreted language, storing the transitive source files that will
+ be included in an executable's runfiles
+
+
+## Full example
+
+Suppose we have a hypothetical interpreted language Foo. In order to build each
+`foo_binary` we need to know all the \*.foo files that it directly or indirectly
+depends on.
+
+```python
+# //mypackage:BUILD
+
+load(":foo.bzl", "foo_library", "foo_binary")
+
+# Our hypothetical Foo compiler.
+py_binary(
+ name = "foocc",
+ srcs = ["foocc.py"],
+)
+
+foo_library(
+ name = "a",
+ srcs = ["a.foo", "a_impl.foo"],
+)
+
+foo_library(
+ name = "b",
+ srcs = ["b.foo", "b_impl.foo"],
+ deps = [":a"],
+)
+
+foo_library(
+ name = "c",
+ srcs = ["c.foo", "c_impl.foo"],
+ deps = [":a"],
+)
+
+foo_binary(
+ name = "d",
+ srcs = ["d.foo"],
+ deps = [":b", ":c"],
+)
+```
+
+```python
+# //mypackage:foocc.py
+
+# "Foo compiler" that just concatenates its inputs to form its output.
+import sys
+
+if __name__ == "__main__":
+ assert len(sys.argv) >= 1
+ output = open(sys.argv[1], "wt")
+ for path in sys.argv[2:]:
+ input = open(path, "rt")
+ output.write(input.read())
+```
+
+Here, the transitive sources of the binary `d` are all of the \*.foo files in
+the `srcs` fields of `a`, `b`, `c`, and `d`. In order for the `foo_binary`
+target to know about any file besides `d.foo`, the `foo_library` targets need to
+pass them along in a provider. Each library receives the providers from its own
+dependencies, adds its own immediate sources, and passes on a new provider with
+the augmented contents. The `foo_binary` rule does the same, except that instead
+of returning a provider, it uses the complete list of sources to construct a
+command line for an action.
+
+Here’s a complete implementation of the `foo_library` and `foo_binary` rules.
+
+```python
+# //mypackage/foo.bzl
+
+# A provider with one field, transitive_sources.
+FooFiles = provider()
+
+def get_transitive_srcs(srcs, deps):
+ """Obtain the source files for a target and its transitive dependencies.
+
+ Args:
+ srcs: a list of source files
+ deps: a list of targets that are direct dependencies
+ Returns:
+ a collection of the transitive sources
+ """
+ trans_srcs = depset()
+ for dep in deps:
+ trans_srcs += dep[FooFiles].transitive_sources
+ trans_srcs += srcs
+ return trans_srcs
+
+def _foo_library_impl(ctx):
+ trans_srcs = get_transitive_srcs(ctx.files.srcs, ctx.attr.deps)
+ return [FooFiles(transitive_sources=trans_srcs)]
+
+foo_library = rule(
+ implementation = _foo_library_impl,
+ attrs = {
+ "srcs": attr.label_list(allow_files=True),
+ "deps": attr.label_list(),
+ },
+)
+
+def _foo_binary_impl(ctx):
+ foocc = ctx.executable._foocc
+ out = ctx.outputs.out
+ trans_srcs = get_transitive_srcs(ctx.files.srcs, ctx.attr.deps)
+ srcs_list = trans_srcs.to_list()
+ cmd_string = (foocc.path + " " + out.path + " " +
+ " ".join([src.path for src in srcs_list]))
+ ctx.action(command=cmd_string,
+ inputs=srcs_list + [foocc],
+ outputs=[out])
+
+foo_binary = rule(
+ implementation = _foo_binary_impl,
+ attrs = {
+ "srcs": attr.label_list(allow_files=True),
+ "deps": attr.label_list(),
+ "_foocc": attr.label(default=Label("//mypackage:foocc"),
+ allow_files=True, executable=True, cfg="host")
+ },
+ outputs = {"out": "%{name}.out"},
+)
+```
+
+You can test this by copying these files into a fresh package, renaming the
+labels appropriately, creating the source \*.foo files with dummy content, and
+building the `d` target.
+
+## Description and operations
+
+Conceptually, a depset is a directed acyclic graph (DAG) that typically looks
+similar to the target graph. It is constructed from the leaves up to the root.
+Each target in a dependency chain can add its own contents on top of the
+previous without having to read or copy them.
+
+Each node in the DAG holds a list of direct elements and a list of child nodes.
+The contents of the depset are the transitive elements, i.e. the direct elements
+of all the nodes. A new depset with direct elements but no children can be
+created using the [depset](lib/globals.html#depset) constructor. Given an
+existing depset, the `+` operator can be used to form a new depset that has
+additional contents. Specifically, for the operation `a + b` where `a` is a
+depset, the result is a copy of `a` where:
+
+* if `b` is a depset, then `b` is appended to `a`’s list of children; and
+ otherwise,
+
+* if `b` is an iterable, then `b`’s elements are appended to `a`’s list of
+ direct elements.
+
+In all cases, the original depset is left unmodified because depsets are
+immutable. The returned value shares most of its internal structure with the old
+depset. As with other immutable types, `s += t` is shorthand for `s = s + t`.
+
+```python
+s = depset(["a", "b", "c"])
+t = s
+s += depset(["d", "e"])
+
+print(s) # depset(["d", "e", "a", "b", "c"])
+print(t) # depset(["a", "b", "c"])
+```
+
+To retrieve the contents of a depset, use the
+[to_list()](lib/depset.html#to_list) method. It returns a list of all transitive
+elements, not including duplicates. There is no way to directly inspect the
+precise structure of the DAG, although this structure does affect the order in
+which the elements are returned.
+
+```python
+s = depset(["a", "b", "c"])
+
+print("c" in s.to_list()) # True
+print(s.to_list() == ["a", "b", "c"]) # True
+```
+
+The allowed items in a depset are restricted, just as the allowed keys in
+dictionaries are restricted. In particular, depset contents may not be mutable.
+
+Depsets use reference equality: a depset is equal to itself, but unequal to any
+other depset, even if they have the same contents and same internal structure.
+
+```python
+s = depset(["a", "b", "c"])
+t = s
+print(s == t) # True
+
+t = depset(["a", "b", "c"])
+print(s == t) # False
+
+t = s
+# Trivial modification that adds no elements
+t += []
+print(s == t) # False
+
+d = {}
+d[s] = None
+d[t] = None
+print(len(d)) # 2
+```
+
+To compare depsets by their contents, convert them to sorted lists.
+
+```python
+s = depset(["a", "b", "c"])
+t = depset(["c", "b", "a"])
+print(sorted(s.to_list()) == sorted(t.to_list())) # True
+```
+
+There is no ability to remove elements from a depset. If this is needed, you
+must read out the entire contents of the depset, filter the elements you want to
+remove, and reconstruct a new depset. This is not particularly efficient.
+
+```python
+s = depset(["a", "b", "c"])
+t = depset(["b", "c"])
+
+# Compute set difference s - t. Precompute t.to_list() so it's not done
+# in a loop, and convert it to a dictionary for fast membership tests.
+t_items = {e: None for e in t.to_list()}
+diff_items = [x for x in s.to_list() if x not in t_items]
+# Convert back to depset if it's still going to be used for merge operations.
+s = depset(diff_items)
+print(s) # depset(["a"])
+```
+
+## Order
+
+The `to_list` operation performs a traversal over the DAG. The kind of traversal
+depends on the *order* that was specified at the time the depset was
+constructed. It is useful for Bazel to support multiple orders because sometimes
+tools care about the order of their inputs. For example, a linker action may
+need to ensure that if `B` depends on `A`, then `A.o` comes before `B.o` on the
+linker’s command line. Other tools might have the opposite requirement.
+
+Three traversal orders are supported: `postorder`, `preorder`, and
+`topological`. The first two work exactly like [tree
+traversals](https://en.wikipedia.org/wiki/Tree_traversal#Depth-first_search)
+except that they operate on DAGs and skip already visited nodes. The third order
+works as a topological sort from root to leaves, essentially the same as
+preorder except that shared children are listed only after all of their parents.
+Preorder and postorder operate as left-to-right traversals, but note that within
+each node direct elements have no order relative to children. For topological
+order, there is no left-to-right guarantee, and even the
+all-parents-before-child guarantee does not apply in the case that there are
+duplicate elements in different nodes of the DAG.
+
+```python
+# This demonstrates how the + operator interacts with traversal orders.
+
+def create(order):
+ # Create s with "a" and "b" as direct elements.
+ s = depset(["a", "b"], order=order)
+ # Add a new child with contents "c" and "d".
+ s += depset(["c", "d"], order=order)
+ # Append "e" and "f" as direct elements.
+ s += ["e", "f"]
+ # Add a new child with contents "g" and "h"
+ s += depset(["g", "h"], order=order)
+ # During postorder traversal, all contents of children are emitted first,
+ # then the direct contents.
+ return s
+
+print(create("postorder").to_list()) # ["c", "d", "g", "h", "a", "b", "e", "f"]
+print(create("preorder").to_list()) # ["a", "b", "e", "f", "c", "d", "g", "h"]
+```
+
+```python
+# This demonstrates different orders on a diamond graph.
+
+def create(order):
+ a = depset(["a"], order=order)
+ b = depset(["b"], order=order)
+ b += a
+ c = depset(["c"], order=order)
+ c += a
+ d = depset(["d"], order=order)
+ d = d + b + c
+ return d
+
+print(create("postorder").to_list()) # ["a", "b", "c", "d"]
+print(create("preorder").to_list()) # ["d", "b", "a", "c"]
+print(create("topological").to_list()) # ["d", "b", "c", "a"]
+```
+
+Due to how traversals are implemented, the order must be specified at the time
+the depset is created with the constructor’s `order` keyword argument. If this
+argument is omitted, the depset has the special `default` order, in which case
+there are no guarantees about the order of any of its elements.
+
+For safety, depsets with different orders cannot be merged with the `+` operator
+unless one of them uses the default order; the resulting depset’s order is the
+same as the left operand. Note that when two depsets of different order are
+merged in this way, the child may appear to have had its elements rearranged
+when it is traversed via the parent.
+
+## Performance
+
+To see the motivation for using depsets, consider what would have happened if we
+had implemented `get_transitive_srcs()` without them. A naive way of writing
+this function would be to collect the sources in a list.
+
+```python
+def get_transitive_srcs(srcs, deps):
+ trans_srcs = []
+ for dep in deps:
+ trans_srcs += dep[FooFiles].transitive_sources
+ trans_srcs += srcs
+ return trans_srcs
+```
+
+However, this does not take into account duplicates, so the source files for `a`
+will appear twice on the command line and twice in the contents of the output
+file.
+
+The next alternative is using a general set, which can be simulated by a
+dictionary where the keys are the elements and all the keys map to `None`.
+
+```python
+def get_transitive_srcs(srcs, deps):
+ trans_srcs = {}
+ for dep in deps:
+ for file in dep[FooFiles].transitive_sources:
+ trans_srcs[file] = None
+ for file in srcs:
+ trans_srcs[file] = None
+ return trans_srcs
+```
+
+This gets rid of the duplicates, but it makes the order of the command line
+arguments (and therefore the contents of the files) unspecified, although still
+deterministic.
+
+Moreover, both this approach and the list-based one are asymptotically worse
+than the depset-based approach. Consider the case where there is a long chain of
+dependencies on Foo libraries. Processing every rule requires copying all of the
+transitive sources that came before it into a new data structure. This means
+that the time and space cost for analyzing an individual library or binary
+target is proportional to its own height in the chain. For a chain of length n,
+foolib_1 ← foolib_2 ← … ← foolib_n, the overall cost is effectively the
+[triangle sum](https://en.wikipedia.org/wiki/Triangular_number) 1 + 2 + … + n,
+which is O(n^2). This cost is wasteful because the library rule’s behavior is
+not actually affected by the transitive sources.
+
+Generally speaking, depsets should be used whenever you are accumulating more
+and more information through your transitive dependencies. This helps ensure
+that your build scales well as your target graph grows deeper. The exact
+advantage will depend on how deep the target graph is and how many elements per
+target are added.
+
+To actually get the performance advantage, it’s important to not retrieve the
+contents of the depset unnecessarily in library rules. One call to `to_list()`
+at the end in a binary rule is fine, since the overall cost is just O(n). It’s
+when many non-terminal targets try to call `to_list()` that we start to get into
+quadratic behavior.
+
+## Upcoming changes
+
+The API for depsets is being updated to be more consistent. Here are some recent
+and/or upcoming changes.
+
+* The name “set” has been replaced by “depset”. Do not use the `set`
+ constructor in new code; it is deprecated and will be removed. The traversal
+ orders have undergone a similar renaming; their old names will be removed as
+ well.
+
+* Depset contents should be retrieved using `to_list()`, not by iterating over
+ the depset itself. Direct iteration over depsets is deprecated and will be
+ removed.
+
+* Depset elements currently must have the same type, e.g. all ints or all
+ strings. This restriction will be lifted.
+
+* The `|` operator is defined for depsets as a synonym for `+`. This will be
+ going away; use `+` instead.
+
+* (Pending approval) The `+` operator will be deprecated in favor of a new
+ syntax based on function calls. This avoids confusion regarding how `+`
+ treats direct elements vs children.
diff --git a/site/docs/skylark/errors/read-only-variable.md b/site/docs/skylark/errors/read-only-variable.md
new file mode 100644
index 0000000000..5dc1eeebab
--- /dev/null
+++ b/site/docs/skylark/errors/read-only-variable.md
@@ -0,0 +1,30 @@
+---
+layout: documentation
+title: Variable x is read only
+---
+# Error: Variable x is read only
+
+A global variable cannot be reassigned. It will always point to the same object.
+However, its content might change, if the value is mutable (for example, the
+content of a list). Local variables don't have this restriction.
+
+```python
+a = [1, 2]
+
+a[1] = 3
+
+b = 3
+
+b = 4 # forbidden
+```
+
+`ERROR: /path/ext.bzl:7:1: Variable b is read only`
+
+You will get a similar error if you try to redefine a function (function
+overloading is not supported), for example:
+
+```python
+def foo(x): return x + 1
+
+def foo(x, y): return x + y # forbidden
+```
diff --git a/site/docs/skylark/index.md b/site/docs/skylark/index.md
index 541fcba640..dc336c99da 100644
--- a/site/docs/skylark/index.md
+++ b/site/docs/skylark/index.md
@@ -1,4 +1,17 @@
---
-layout: redirect
-redirect: docs/skylark/index.html
+layout: documentation
+title: Extensions
---
+
+# Extensions
+Skylark is the name of the extension mechanism in Bazel. It lets you add support
+for new languages and tools by writing [custom build rules](rules.md). You can
+also compose existing rules into [macros](macros.md).
+
+## Getting started
+
+Read the [concepts](concepts.md) behind Skylark and try the
+[cookbook examples](cookbook.md). To go further, read about the
+[standard library](lib/globals.html).
+-->
+
diff --git a/site/docs/skylark/language.md b/site/docs/skylark/language.md
new file mode 100644
index 0000000000..583e4f7c0a
--- /dev/null
+++ b/site/docs/skylark/language.md
@@ -0,0 +1,149 @@
+---
+layout: documentation
+title: Extensions - Overview
+---
+# Language
+
+
+## Syntax
+
+The extension language, Skylark, is a superset of the
+[Core Build Language](/docs/build-ref.html#core_build_language)
+and its syntax is a subset of Python.
+It is designed to be simple, thread-safe and integrated with the
+BUILD language. It is not a general-purpose language and most Python
+features are not included.
+
+The following constructs have been added to the Core Build Language: `if`
+statements, `for` loops, and function definitions. They behave like in Python.
+Here is an example to show the syntax:
+
+```python
+def fizz_buzz(n):
+ """Print Fizz Buzz numbers from 1 to n."""
+ for i in range(1, n + 1):
+ s = ""
+ if i % 3 == 0:
+ s += "Fizz"
+ if i % 5 == 0:
+ s += "Buzz"
+ print(s if s else i)
+
+fizz_buzz(20)
+```
+
+The following basic types are supported: [None](lib/globals.html#None),
+[bool](lib/bool.html), [dict](lib/dict.html), function, [int](lib/int.html),
+[list](lib/list.html), [string](lib/string.html). On top of that, two new
+types are specific to Bazel: [depset](lib/depset.html) and
+[struct](lib/struct.html).
+
+Skylark is syntactically a subset of both Python 2 and Python 3, and will remain
+so through at least the 1.x release lifecycle. This ensures that Python-based
+tooling can at least parse Skylark code. Although Skylark is not *semantically*
+a subset of Python, behavioral differences are rare (excluding cases where
+Skylark raises an error).
+
+
+## Mutability
+
+Because evaluation of BUILD and .bzl files is performed in parallel, there are
+some restrictions in order to guarantee thread-safety and determinism. Two
+mutable data structures are available: [lists](lib/list.html) and
+[dicts](lib/dict.html).
+
+In a build, there are many "evaluation contexts": each `.bzl` file and each
+`BUILD` file is loaded in a different context. Each rule is also analyzed in a
+separate context. We allow side-effects (e.g. appending a value to a list or
+deleting an entry in a dictionary) only on objects created during the current
+evaluation context. Once the code in that context is done executing, all of its
+values are frozen.
+
+For example, here is the content of the file `foo.bzl`:
+
+```python
+var = []
+
+def fct():
+ var.append(5)
+
+fct()
+```
+
+The variable `var` is created when `foo.bzl` is loaded. `fct()` is called during
+the same context, so it is safe. At the end of the evaluation, the environment
+contains an entry mapping the identifier `var` to a list `[5]`; this list is
+then frozen.
+
+It is possible for multiple other files to load symbols from `foo.bzl` at the
+same time. For this reason, the following code is not legal:
+
+```python
+load(":foo.bzl", "var", "fct")
+
+var.append(6) # runtime error, the list stored in var is frozen
+
+fct() # runtime error, fct() attempts to modify a frozen list
+```
+
+Evaluation contexts are also created for the analysis of each custom rule. This
+means that any values that are returned from the rule's analysis are frozen.
+Note that by the time a custom rule's analysis begins, the .bzl file in which
+it is defined has already been loaded, and so the global variables are already
+frozen.
+
+## Differences with Python
+
+In addition to the mutability restrictions, there are also differences with
+Python:
+
+* Global variables cannot be reassigned.
+
+* `for` statements are not allowed at the top-level; factor them into functions
+ instead.
+
+* Dictionaries have a deterministic order of iteration.
+
+* Recursion is not allowed.
+
+* Int type is limited to 32-bit signed integers.
+
+* Lists and other mutable types may be stored in dictionary
+ keys once they are frozen.
+
+* Modifying a collection during iteration is an error. You can avoid the error
+ by iterating over a copy of the collection, e.g.
+ `for x in list(my_list): ...`. You can still modify its deep contents
+ regardless.
+
+* Global (non-function) variables must be declared before they can be used in
+ a function, even if the function is not called until after the global variable
+ declaration. However, it is fine to define `f()` before `g()`, even if `f()`
+ calls `g()`.
+
+* The order comparison operators (<, <=, >=, >) are not defined across different
+ types of values, e.g., you can't compare `5 < 'foo'` (however you still can
+ compare them using == or !=). This is a difference with Python 2, but
+ consistent with Python 3. Note that this means you are unable to sort lists
+ that contain mixed types of values.
+
+* Tuple syntax is more restrictive. You may use a trailing comma only when the
+ tuple is between parentheses, e.g. write `(1,)` instead of `1,`.
+
+* Strings are represented with double-quotes (e.g. when you
+ call [repr](lib/globals.html#repr)).
+
+The following Python features are not supported:
+
+* implicit string concatenation (use explicit `+` operator)
+* `class` (see [`struct`](lib/globals.html#struct) function)
+* `import` (see [`load`](concepts.md#loading-an-extension) statement)
+* `while`, `yield`
+* float and set types
+* generators and generator expressions
+* `lambda` and nested functions
+* `is` (use `==` instead)
+* `try`, `raise`, `except`, `finally` (see [`fail`](lib/globals.html#fail) for
+ fatal errors)
+* `global`, `nonlocal`
+* most builtin functions, most methods
diff --git a/site/docs/skylark/macros.md b/site/docs/skylark/macros.md
index b247e4b89f..7782198287 100644
--- a/site/docs/skylark/macros.md
+++ b/site/docs/skylark/macros.md
@@ -1,4 +1,156 @@
---
-layout: redirect
-redirect: docs/skylark/macros.html
+layout: documentation
+title: Macros
---
+# Macros
+
+## Macro creation
+
+A macro is a function called from the BUILD file that can instantiate rules.
+Macros don't give additional power, they are just used for encapsulation and
+code reuse. By the end of the [loading phase](concepts.md#evaluation-model),
+macros don't exist anymore, and Bazel sees only the set of rules they created.
+
+Native rules (i.e. rules that don't need a `load()` statement) can be
+instantiated from the [native](lib/native.html) module, e.g.
+
+```python
+def my_macro(name, visibility=None):
+ native.cc_library(
+ name = name,
+ srcs = ["main.cc"],
+ visibility = visibility,
+ )
+```
+
+If you need to know the package name (i.e. which BUILD file is calling the
+macro), use the constant [PACKAGE_NAME](lib/globals.html#PACKAGE_NAME).
+
+## Examples
+
+* [Macro creating rules](cookbook.md#macro).
+
+* [Macro creating native rules](cookbook.md#macro_native).
+
+* [Macro combining multiple rules](cookbook.md#macro_compound).
+
+## Debugging
+
+* `bazel query --output=build //my/path:all` will show you how the BUILD file
+ looks after evaluation. All macros, globs, loops are expanded. Known
+ limitation: `select` expressions are currently not shown in the output.
+
+* You may filter the output based on `generator_function` (which function
+ generated the rules) or `generator_name` (the name attribute of the macro),
+ e.g.
+ ```bash
+ $ bazel query --output=build 'attr(generator_function, my_macro, //my/path:all)'
+ ```
+
+* To find out where exactly the rule `foo` is generated in a BUILD file, you
+ can try the following trick. Insert this line near the top of the BUILD
+ file: `cc_library(name = "foo")`. Run Bazel. You will get an exception when
+ the rule `foo` is created (due to a name conflict), which will show you the
+ full stack trace.
+
+* You can also use [print](lib/globals.html#print) for debugging. It displays
+ the message as a warning during the loading phase. Except in rare cases,
+ either remove `print` calls, or make them conditional under a `debugging`
+ parameter that defaults to `False` before submitting the code to the depot.
+
+## Errors
+
+If you want to throw an error, use the [fail](lib/globals.html#fail) function.
+Explain clearly to the user what went wrong and how to fix their BUILD file. It
+is not possible to catch an error.
+
+```
+def my_macro(name, deps, visibility=None):
+ if len(deps) < 2:
+ fail("Expected at least two values in deps")
+ # ...
+```
+
+## Conventions
+
+* All public functions (functions that don't start with underscore) that
+ instantiate rules must have a `name` argument. This argument should not be
+ optional (don't give a default value).
+
+* Public functions should use a docstring following [Python
+ conventions](https://www.python.org/dev/peps/pep-0257/#one-line-docstrings).
+
+* In BUILD files, the `name` argument of the macros must be a keyword argument
+ (not a positional argument).
+
+* The `name` attribute of rules generated by a macro should include the name
+ argument as a prefix. For example, `macro(name = "foo")` can generate a
+ `cc_library` `foo` and a genrule `foo_gen`.
+
+* In most cases, optional parameters should have a default value of `None`.
+ `None` can be passed directly to native rules, which treat it the same as if
+ you had not passed in any argument. Thus, there is no need to replace it
+ with `0`, `False`, or `[]` for this purpose. Instead, the macro should defer
+ to the rules it creates, as their defaults may be complex or may change over
+ time. Additionally, a parameter that is explicitly set to its default value
+ looks different than one that is never set (or set to `None`) when accessed
+ through the query language or build-system internals.
+
+* Macros should have an optional `visibility` argument.
+
+## Full example
+
+The typical use-case for a macro is when you want to reuse a genrule, e.g.
+
+```
+genrule(
+ name = "file",
+ outs = ["file.txt"],
+ cmd = "$(location generator) some_arg > $@",
+ tools = [":generator"],
+)
+```
+
+If you want to generate another file with different arguments, you may want to
+extract this code to a function.
+
+The BUILD file will become simply:
+
+```
+load("//path:generator.bzl", "file_generator")
+
+file_generator(
+ name = "file",
+ arg = "some_arg",
+)
+```
+
+In order to keep BUILD files clean and declarative, you must put the function in
+a separate `.bzl` file. For example, write the definition of the macro in
+`path/generator.bzl`:
+
+```
+def file_generator(name, arg, visibility=None):
+ native.genrule(
+ name = name,
+ outs = [name + ".txt"],
+ cmd = "$(location generator) %s > $@" % arg,
+ tools = ["//test:generator"],
+ visibility = visibility,
+ )
+```
+
+When you want to investigate what a macro does, use the following command to
+see the expanded form:
+
+```
+$ bazel query --output=build :file
+# /absolute/path/test/ext.bzl:42:3
+genrule(
+ name = "file",
+ tools = ["//test:generator"],
+ outs = ["//test:file.txt"],
+ cmd = "$(location generator) some_arg > $@",
+)
+```
+
diff --git a/site/docs/skylark/repository_rules.md b/site/docs/skylark/repository_rules.md
index 6af0109578..c6890062ef 100644
--- a/site/docs/skylark/repository_rules.md
+++ b/site/docs/skylark/repository_rules.md
@@ -1,4 +1,113 @@
---
-layout: redirect
-redirect: docs/skylark/repository_rules.html
+layout: documentation
+title: Repository Rules
---
+# Repository Rules
+
+**Status: Experimental**. We may make breaking changes to the API, but we will
+ announce them and help you update your code.
+
+An [external repository](/docs/external.md) is a rule that can be used only
+in the `WORKSPACE` file and enable non-hermetic operation at the loading phase
+of Bazel. Each external repository rule creates its own workspace, with its
+own BUILD files and artifacts. They can be used to depend on third-party
+libraries (such as Maven packaged libraries) but also to generate BUILD files
+specific to the host Bazel is running on.
+
+## Repository Rule creation
+
+In a `.bzl` file, use the
+[repository_rule](lib/globals.html#repository_rule) function to create a new
+repository rule and store it in a global variable.
+
+A custom repository rule can be used just like a native repository rule. It
+has a mandatory `name` attribute and every target present in its build files
+can be referred as `@<name>//package:target` where `<name>` is the value of the
+`name` attribute.
+
+The rule is loaded when you explicitly build it, or if it is a dependency of
+the build. In this case, Bazel will execute its `implementation` function. This
+function describe how to creates the repository, its content and BUILD files.
+
+## Attributes
+
+An attribute is a rule argument, such as `url` or `sha256`. You must list
+the attributes and their types when you define a repository rule.
+
+```python
+local_repository = repository_rule(
+ implementation=_impl,
+ local=True,
+ attrs={"path": attr.string(mandatory=True)})
+```
+
+`name` attributes are implicitly defined for all `repository_rule`s.
+To access an attribute, use `repository_ctx.attr.<attribute_name>`.
+The name of a repository rule is accessible with `repository_ctx.name`.
+
+If an attribute name starts with `_` it is private and users cannot set it.
+
+## Implementation function
+
+Every repository rule requires an `implementation` function. It contains the
+actual logic of the rule and is executed strictly in the Loading Phase.
+The function has exactly one input parameter, `repository_ctx`, and should
+always returns `None`. The input parameter `repository_ctx` can be used to
+access attribute values, and non-hermetic functions (finding a binary,
+executing a binary, creating a file in the repository or downloading a file
+from the Internet). See [the library](lib/repository_ctx.html) for more
+context. Example:
+
+```python
+def _impl(repository_ctx):
+ repository_ctx.symlink(repository_ctx.attr.path, "")
+
+local_repository = repository_rule(
+ implementation=_impl,
+ ...)
+```
+
+## When is the implementation function executed?
+
+If the repository is declared as `local` then change in a dependency
+in the dependency graph (including the WORKSPACE file itself) will
+cause an execution of the implementation function.
+
+The implementation function can be _restarted_ if a dependency it
+request is _missing_. The beginning of the implementation function
+will be re-executed after the dependency has been resolved.
+
+File given as a label are declared as dependencies, so requesting it
+might interrupt the function and restart it later, re-executing the
+part up till there.
+
+Finally, for non-`local` repositories, only a change in the following
+dependencies might cause a restart:
+
+- Skylark files needed to define the repository rule.
+- Declaration of the repository rule in the `WORKSPACE` file.
+- Value of any environment variable declared with the `environ`
+attribute of the
+[`repository_rule`](https://bazel.build/versions/master/docs/skylark/lib/globals.html#repository_rule)
+function. The value of those environment variable can be enforced from
+the command line with the
+[`--action_env`](/docs/command-line-reference.html#flag--action_env)
+flag (but this flag will invalidate every action of the build).
+- Content of any file used and referred to by a label (e.g.,
+ `//mypkg:label.txt` not `mypkg/label.txt`).
+
+## Examples
+
+- [C++ auto-configured toolchain](https://github.com/bazelbuild/bazel/blob/ac29b78000afdb95afc7e97efd2b1299ebea4dac/tools/cpp/cc_configure.bzl#L288):
+it uses a repository rule to automatically create the
+C++ configuration files for Bazel by looking for the local C++ compiler, the
+environment and the flags the C++ compiler supports.
+-
+ [Go repositories](https://github.com/bazelbuild/rules_go/blob/67bc217b6210a0922d76d252472b87e9a6118fdf/go/private/go_repositories.bzl#L195)
+ uses several `repository_rule` to defines the list of dependencies
+ needed to use the Go rules.
+-
+ [maven_jar](https://github.com/bazelbuild/bazel/a110ac400190c90a45856f15482c8d0952c542f5/master/tools/build_defs/repo/maven_rules.bzl#L276)
+ is a reimplementation of the native `maven_jar` rule using the
+ `maven` tool.
+
diff --git a/site/docs/skylark/rules.md b/site/docs/skylark/rules.md
index 22b62057eb..47f27abb13 100644
--- a/site/docs/skylark/rules.md
+++ b/site/docs/skylark/rules.md
@@ -1,4 +1,596 @@
---
-layout: redirect
-redirect: docs/skylark/rules.html
+layout: documentation
+title: Rules
---
+# Rules
+
+**Status: Experimental**. We may make breaking changes to the API, but we will
+ help you update your code.
+
+A rule defines a series of [actions](#actions) that Bazel should perform on
+inputs to get a set of outputs. For example, a C++ binary rule might take a set
+of `.cpp` files (the inputs), run `g++` on them (the action), and return an
+executable file (the output).
+
+Note that, from Bazel's perspective, `g++` and the standard C++ libraries are
+also inputs to this rule. As a rule writer, you must consider not only the
+user-provided inputs to a rule, but also all of the tools and libraries required
+to execute the actions (called _implicit inputs_).
+
+Before creating or modifying any rule, make sure you are familiar with the
+[extensibility model](concepts.md) (understand the three phases and the
+differences between macros and rules).
+
+## Rule creation
+
+In a `.bzl` file, use the [rule](lib/globals.html#rule)
+function to create a new rule and store it in a global variable:
+
+```python
+my_rule = rule(...)
+```
+
+See [the cookbook](cookbook.md#empty) for examples. The rule can then be
+loaded by BUILD files:
+
+```python
+load('//some/pkg:whatever.bzl', 'my_rule')
+```
+
+A custom rule can be used just like a native rule. It has a mandatory `name`
+attribute, you can refer to it with a label, and you can see it in
+`bazel query`.
+
+The rule is analyzed when you explicitly build it, or if it is a dependency of
+the build. In this case, Bazel will execute its `implementation` function. This
+function decides what the outputs of the rule are and how to build them (using
+[actions](#actions)). During the [analysis phase](concepts.md#evaluation-model),
+no external command can be executed. Instead, actions are registered and
+will be run in the execution phase, if their output is needed for the build.
+
+## Attributes
+
+An attribute is a rule argument, such as `srcs` or `deps`. You must list
+the attributes and their types when you define a rule.
+
+```python
+sum = rule(
+ implementation = _impl,
+ attrs = {
+ "number": attr.int(default = 1),
+ "deps": attr.label_list(),
+ },
+)
+```
+
+The following attributes are implicitly added to every rule: `deprecation`,
+`features`, `name`, `tags`, `testonly`, `visibility`. Test rules also have the
+following attributes: `args`, `flaky`, `local`, `shard_count`, `size`,
+`timeout`.
+
+Labels listed in `attr` will be inputs to the rule.
+
+To access an attribute in a rule's implementation, use
+`ctx.attr.<attribute_name>`. The name and the package of a rule are available
+with `ctx.label.name` and `ctx.label.package`.
+
+See [an example](cookbook.md#attr) of using `attr` in a rule.
+
+### <a name="private-attributes"></a> Private Attributes
+
+In Python, we use one leading underscore(`_`) for non-public methods and
+instance variables (see [PEP-8][1]).
+
+Similarly, if an attribute name starts with `_` it is private and users cannot
+set it.
+It is useful in particular for label attributes (your rule will have an
+implicit dependency on this label).
+
+```python
+metal_compile = rule(
+ implementation = _impl,
+ attrs = {
+ "srcs": attr.label_list(),
+ "_compiler": attr.label(
+ default = Label("//tools:metalc"),
+ allow_single_file = True,
+ executable = True,
+ ),
+ },
+)
+```
+
+## Implementation function
+
+Every rule requires an `implementation` function. It contains the actual logic
+of the rule and is executed strictly in the
+[analysis phase](concepts.md#evaluation-model). The function has exactly one
+input parameter, `ctx`, and it may return the [runfiles](#runfiles)
+and [providers](#providers) of the rule. The input parameter `ctx` can be used
+to access attribute values, outputs and dependent targets, and files. It also
+has some helper functions. See [the library](lib/ctx.html) for more context.
+Example:
+
+```python
+def _impl(ctx):
+ ...
+ return [DefaultInfo(runfiles=...), MyInfo(...)]
+
+my_rule = rule(
+ implementation = _impl,
+ ...
+)
+```
+
+## Files
+
+There are two kinds of files: files stored in the file system and generated
+files. For each generated file, there must be one and only one generating
+action, and each action must generate one or more output files. Bazel will throw
+an error otherwise.
+
+## Targets
+
+Every build rule corresponds to exactly one target. A target can create
+[actions](#actions), can have dependencies (which can be files or
+other build rules), [output files](#output-files) (generated by
+its actions), and [providers](#providers).
+
+A target `y` depends on target `x` if `y` has a label or label list type
+attribute where `x` is declared:
+
+```python
+my_rule(
+ name = "x",
+)
+
+my_rule(
+ name = "y",
+ deps = [":x"],
+)
+```
+
+In the above case, it's possible to access targets declared in `my_rule.deps`:
+
+```python
+def _impl(ctx):
+ for dep in ctx.attr.deps:
+ # Do something with dep
+ ...
+
+my_rule = rule(
+ implementation = _impl,
+ attrs = {
+ "deps": attr.label_list(),
+ },
+ ...
+)
+```
+
+## <a name="output-files"></a> Output files
+
+A target can declare output files, which must be generated by the target's
+actions. There are three ways to create output files:
+
+* If the rule is marked `executable`, it creates an output file of the same name
+ as the rule's. [See example](cookbook.md#outputs-executable)
+
+* The rule can declare default `outputs`, which are always generated.
+ [See example](cookbook.md#outputs-default)
+
+* The rule can have output or output list type attributes. In that case the
+ output files come from the actual attribute values.
+ [See example](cookbook.md#outputs-custom)
+
+Each output file must have exactly one generating action. See the
+[library](lib/ctx.html#outputs) for more context.
+
+## Default outputs
+
+Every rule has a set of default outputs. This is used:
+
+* When the user runs `bazel build` on your target. Bazel will build the default
+ outputs of the rule.
+
+* When the target is used as a dependency of another rule. A rule can access
+ the default outputs by using [target.files](lib/Target.html#files).
+ This is the case, for example, if you use a rule in the `srcs` attribute of a
+ `genrule`.
+
+Use the `files` provider to specify the default outputs of a rule.
+If left unspecified, it will contain all the declared outputs.
+
+```python
+def _impl(ctx):
+ # ...
+ return DefaultInfo(files=depset([file1, file2]))
+```
+
+This can be useful for exposing files generated with
+[ctx.new_file](lib/ctx.html#new_file). You can also have "implicit
+outputs", i.e., files that are declared in the rule, but not in the default
+outputs (like `_deploy.jar` in `java_binary`).
+
+## Actions
+
+An action describes how to generate a set of outputs from a set of inputs, for
+example "run gcc on hello.c and get hello.o". When an action is created, Bazel
+doesn't run the command immediately. It registers it in a graph of dependencies,
+because an action can depend on the output of another action (e.g. in C,
+the linker must be called after compilation). In the execution phase, Bazel
+decides which actions must be run and in which order.
+
+There are three ways to create actions:
+
+* [ctx.action](lib/ctx.html#action), to run a command.
+* [ctx.file_action](lib/ctx.html#file_action), to write a string to a file.
+* [ctx.template_action](lib/ctx.html#template_action), to generate a file from a template.
+
+Actions take a set (which can be empty) of input files and generate a (non-empty)
+set of output files.
+The set of input and output files must be known during the
+[analysis phase](concepts.md#evaluation-model). It might depend on the value
+of attributes and information from dependencies, but it cannot depend on the
+result of the execution. For example, if your action runs the unzip command, you
+must specify which files you expect to be inflated (before running unzip).
+
+Actions are comparable to pure functions: They should depend only on the
+provided inputs, and avoid accessing computer information, username, clock,
+network, or I/O devices (except for reading inputs and writing outputs). This is
+important because the output will be cached and reused.
+
+**If an action generates a file that is not listed in its outputs**: This is
+fine, but the file will be ignored and cannot be used by other rules.
+
+**If an action does not generate a file that is listed in its outputs**: This is
+an execution error and the build will fail. This happens for instance when a
+compilation fails.
+
+**If an action generates an unknown number of outputs and you want to keep them
+all**, you must group them in a single file (e.g., a zip, tar, or other
+archive format). This way, you will be able to deterministically declare your
+outputs.
+
+**If an action does not list a file it uses as an input**, the action execution
+will most likely result in an error. The file is not guaranteed to be available
+to the action, so if it **is** there, it's due to coincidence or error.
+
+**If an action lists a file as an input, but does not use it**: This is fine.
+However, it can affect action execution order, resulting in sub-optimal
+performance.
+
+Dependencies are resolved by Bazel, which will decide which actions are
+executed. It is an error if there is a cycle in the dependency graph. Creating
+an action does not guarantee that it will be executed: It depends on whether
+its outputs are needed for the build.
+
+## Configurations
+
+Imagine that you want to build a C++ binary and target a different architecture.
+The build can be complex and involve multiple steps. Some of the intermediate
+binaries, like the compilers and code generators, have to run on your machine
+(the host); some of the binaries such the final output must be built for the
+target architecture.
+
+For this reason, Bazel has a concept of "configurations" and transitions. The
+topmost targets (the ones requested on the command line) are built in the
+"target" configuration, while tools that should run locally on the host are
+built in the "host" configuration. Rules may generate different actions based on
+the configuration, for instance to change the cpu architecture that is passed to
+the compiler. In some cases, the same library may be needed for different
+configurations. If this happens, it will be analyzed and potentially built
+multiple times.
+
+By default, Bazel builds the dependencies of a target in the same configuration
+as the target itself, i.e. without transitioning. When a target depends on a
+tool, the label attribute will specify a transition to the host configuration.
+This causes the tool and all of its dependencies to be built for the host
+machine, assuming those dependencies do not themselves have transitions.
+
+For each [label attribute](lib/attr.html#label), you can decide whether the
+dependency should be built in the same configuration, or transition to the host
+configuration (using `cfg`). If a label attribute has the flag
+`executable=True`, the configuration must be set explicitly.
+[See example](cookbook.html#execute-a-binary)
+
+In general, sources, dependent libraries, and executables that will be needed at
+runtime can use the same configuration.
+
+Tools that are executed as part of the build (e.g., compilers, code generators)
+should be built for the host configuration. In this case, specify `cfg="host"`
+in the attribute.
+
+Otherwise, executables that are used at runtime (e.g. as part of a test) should
+be built for the target configuration. In this case, specify `cfg="target"` in
+the attribute.
+
+The configuration `"data"` is present for legacy reasons and should be used for
+the `data` attributes.
+
+## <a name="fragments"></a> Configuration Fragments
+
+Rules may access [configuration fragments](lib/skylark-configuration-fragment.html)
+such as `cpp`, `java` and `jvm`. However, all required fragments must be
+declared in order to avoid access errors:
+
+```python
+def _impl(ctx):
+ # Using ctx.fragments.cpp would lead to an error since it was not declared.
+ x = ctx.fragments.java
+ ...
+
+my_rule = rule(
+ implementation = _impl,
+ fragments = ["java"], # Required fragments of the target configuration
+ host_fragments = ["java"], # Required fragments of the host configuration
+ ...
+)
+```
+
+`ctx.fragments` only provides configuration fragments for the target
+configuration. If you want to access fragments for the host configuration,
+use `ctx.host_fragments` instead.
+
+## Providers
+
+Providers are pieces of information that a rule exposes to other rules that
+depend on it. This data can include output files, libraries, parameters to pass
+on a tool's command line, or anything else the depending rule should know about.
+Providers are the only mechanism to exchange data between rules, and can be
+thought of as part of a rule's public interface (loosely analogous to a
+function's return value).
+
+A rule can only see the providers of its direct dependencies. If there is a rule
+`top` that depends on `middle`, and `middle` depends on `bottom`, then we say
+that `middle` is a direct dependency of `top`, while `bottom` is a transitive
+dependency of `top`. In this case, `top` can see the providers of `middle`. The
+only way for `top` to see any information from `bottom` is if `middle`
+re-exports this information in its own providers; this is how transitive
+information can be accumulated from all dependencies. In such cases, consider
+using [depsets](depsets.md) to hold the data more efficiently without excessive
+copying.
+
+Providers can be declared using the [provider()](lib/globals.html#provider) function:
+
+```python
+TransitiveDataInfo = provider()
+```
+
+Rule implementation function can then construct and return provider instances:
+
+```python
+def rule_implementation(ctx):
+ ...
+ return [TransitiveDataInfo(value = ["a", "b", "c"])]
+```
+
+`TransitiveDataInfo` acts both as a constructor for provider instances and as a key to access them.
+A [target](lib/Target.html) serves as a map from each provider that the target supports, to the
+target's corresponding instance of that provider.
+A rule can access the providers of its dependencies using the square bracket notation (`[]`):
+
+```python
+def dependent_rule_implementation(ctx):
+ ...
+ s = depset()
+ for dep_target in ctx.attr.deps:
+ s += dep_target[TransitiveDataInfo].value
+ ...
+```
+
+All targets have a [`DefaultInfo`](lib/globals.html#DefaultInfo) provider that can be used to access
+some information relevant to all targets.
+
+Providers are only available during the analysis phase. Examples of usage:
+
+* [mandatory providers](cookbook.md#mandatory-providers)
+* [optional providers](cookbook.md#optional-providers)
+
+> *Note:*
+> Historically, Bazel also supported provider instances that are identified by strings and
+> accessed as fields on the `target` object instead of as keys. This style is deprecated
+> but still supported. Return legacy providers as follows:
+>
+```python
+def rule_implementation(ctx):
+ ...
+ modern_provider = TransitiveDataInfo(value = ["a", "b", "c"])
+ # Legacy style.
+ return struct(legacy_provider = struct(...),
+ another_legacy_provider = struct(...),
+ # The `providers` field contains provider instances that can be accessed
+ # the "modern" way.
+ providers = [modern_provider])
+```
+> To access legacy providers, use the dot notation.
+> Note that the same target can define both modern and legacy providers:
+>
+```python
+def dependent_rule_implementation(ctx):
+ ...
+ s = depset()
+ for dep_target in ctx.attr.deps:
+ x = dep_target.legacy_provider # legacy style
+ s += dep_target[TransitiveDataInfo].value # modern style
+ ...
+```
+> **We recommend using modern providers for all future code.**
+
+## Runfiles
+
+Runfiles are a set of files used by the (often executable) output of a rule
+during runtime (as opposed to build time, i.e. when the binary itself is
+generated).
+During the [execution phase](concepts.md#evaluation-model), Bazel creates a
+directory tree containing symlinks pointing to the runfiles. This stages the
+environment for the binary so it can access the runfiles during runtime.
+
+Runfiles can be added manually during rule creation and/or collected
+transitively from the rule's dependencies:
+
+```python
+def _rule_implementation(ctx):
+ ...
+ transitive_runfiles = depset()
+ for dep in ctx.attr.special_dependencies:
+ transitive_runfiles += dep.transitive_runtime_files
+
+ runfiles = ctx.runfiles(
+ # Add some files manually.
+ files = [ctx.file.some_data_file],
+ # Add transitive files from dependencies manually.
+ transitive_files = transitive_runfiles,
+ # Collect runfiles from the common locations: transitively from srcs,
+ # deps and data attributes.
+ collect_default = True,
+ )
+ # Add a field named "runfiles" to the DefaultInfo provider in order to actually
+ # create the symlink tree.
+ return [DefaultInfo(runfiles=runfiles)]
+```
+
+Note that non-executable rule outputs can also have runfiles. For example, a
+library might need some external files during runtime, and every dependent
+binary should know about them.
+
+Also note that if an action uses an executable, the executable's runfiles can
+be used when the action executes.
+
+Normally, the relative path of a file in the runfiles tree is the same as the
+relative path of that file in the source tree or generated output tree. If these
+need to be different for some reason, you can specify the `root_symlinks` or
+`symlinks` arguments. The `root_symlinks` is a dictionary mapping paths to
+files, where the paths are relative to the root of the runfiles directory. The
+`symlinks` dictionary is the same, but paths are implicitly prefixed with the
+name of the workspace.
+
+```python
+ ...
+ runfiles = ctx.runfiles(
+ root_symlinks = {"some/path/here.foo": ctx.file.some_data_file2}
+ symlinks = {"some/path/here.bar": ctx.file.some_data_file3}
+ )
+ # Creates something like:
+ # sometarget.runfiles/
+ # some/
+ # path/
+ # here.foo -> some_data_file2
+ # <workspace_name>/
+ # some/
+ # path/
+ # here.bar -> some_data_file3
+```
+
+If `symlinks` or `root_symlinks` is used, be careful not to map two different
+files to the same path in the runfiles tree. This will cause the build to fail
+with an error describing the conflict. To fix, you will need to modify your
+`ctx.runfiles` arguments to remove the collision. This checking will be done for
+any targets using your rule, as well as targets of any kind that depend on those
+targets.
+
+## Output groups
+
+By default Bazel builds a target's
+[default outputs](#default-outputs). However, a rule can also create
+ other outputs that are not part of a typical build but might still be useful,
+ such as debug information files. The facility for this is _output groups_.
+
+A rule can declare that a certain file belongs to a certain output group by returning
+the [OutputGroupInfo](lib/globals.html#OutputGroupInfo) provider. Fields of
+that provider are output group names:
+
+```python
+def _impl(ctx):
+ name = ...
+ binary = ctx.new_file(name)
+ debug_file = ctx.new_file(name + ".pdb")
+ # ... add actions to generate these files
+ return [DefaultInfo(files = depset([binary])),
+ OutputGroupInfo(debug_files = depset([debug_file]),
+ all_files = depset([binary, debug_file]))]
+```
+
+By default, only the `binary` file will be built.
+The user can specify an [`--output_groups=debug_files`](../command-line-reference.html#build)
+flag on the command line. In that case, only `debug_file` will be built. If the user
+specifies `--output_groups=all_files`, both `binary` and `debug_file` will be build.
+
+> Note: [OutputGroupInfo](skylark/lib/globals.html#OutputGroupInfo) is a regular
+> [provider](#providers), and dependencies of a target can examine it using
+> the `target[OutputGroupInfo]` syntax.
+
+## Code coverage instrumentation
+
+A rule can use the `instrumented_files` provider to provide information about
+which files should be measured when code coverage data collection is enabled:
+
+```python
+def _rule_implementation(ctx):
+ ...
+ return struct(instrumented_files = struct(
+ # Optional: File extensions used to filter files from source_attributes.
+ # If not provided, then all files from source_attributes will be
+ # added to instrumented files, if an empty list is provided, then
+ # no files from source attributes will be added.
+ extensions = ["ext1", "ext2"],
+ # Optional: Attributes that contain source files for this rule.
+ source_attributes = ["srcs"],
+ # Optional: Attributes for dependencies that could include instrumented
+ # files.
+ dependency_attributes = ["data", "deps"]))
+```
+
+[ctx.config.coverage_enabled](lib/configuration.html#coverage_enabled) notes
+whether coverage data collection is enabled for the current run in general
+(but says nothing about which files specifically should be instrumented).
+If a rule implementation needs to add coverage instrumentation at
+compile-time, it can determine if its sources should be instrumented with
+[ctx.coverage_instrumented](lib/ctx.html#coverage_instrumented):
+
+```python
+# Are this rule's sources instrumented?
+if ctx.coverage_instrumented():
+ # Do something to turn on coverage for this compile action
+```
+
+Note that function will always return false if `ctx.config.coverage_enabled` is
+false, so you don't need to check both.
+
+If the rule directly includes sources from its dependencies before compilation
+(e.g. header files), it may also need to turn on compile-time instrumentation
+if the dependencies' sources should be instrumented. In this case, it may
+also be worth checking `ctx.config.coverage_enabled` so you can avoid looping
+over dependencies unnecessarily:
+
+```python
+# Are this rule's sources or any of the sources for its direct dependencies
+# in deps instrumented?
+if ctx.config.coverage_enabled:
+ if (ctx.coverage_instrumented() or
+ any(ctx.coverage_instrumented(dep) for dep in ctx.attr.deps):
+ # Do something to turn on coverage for this compile action
+```
+
+## Executable rules
+
+An executable rule is a rule that users can run using `bazel run`.
+
+To make a rule executable, set `executable=True` in the
+[rule function](lib/globals.html#rule). The `implementation` function of the
+rule must generate the output file `ctx.outputs.executable`.
+[See example](cookbook.md#outputs-executable)
+
+## Test rules
+
+Test rules are run using `bazel test`.
+
+To create a test rule, set `test=True` in the
+[rule function](lib/globals.html#rule). The name of the rule must
+also end with `_test`. Test rules are implicitly executable, which means that
+the `implementation` function of the rule must generate the output file
+`ctx.outputs.executable`.
+
+Test rules inherit the following attributes: `args`, `flaky`, `local`,
+`shard_count`, `size`, `timeout`.
+
+[1]: https://www.python.org/dev/peps/pep-0008/#id46