aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/BUILD2
-rwxr-xr-xdocs/analysis_test_doc.md39
-rwxr-xr-xdocs/build_test_doc.md52
-rwxr-xr-xdocs/collections_doc.md117
-rwxr-xr-xdocs/common_settings_doc.md301
-rwxr-xr-xdocs/copy_file_doc.md95
-rwxr-xr-xdocs/dicts_doc.md45
-rwxr-xr-xdocs/diff_test_doc.md65
-rw-r--r--docs/maintainers_guide.md114
-rwxr-xr-xdocs/native_binary_doc.md138
-rwxr-xr-xdocs/new_sets_doc.md556
-rwxr-xr-xdocs/partial_doc.md156
-rwxr-xr-xdocs/paths_doc.md285
-rwxr-xr-xdocs/regenerate_docs.sh4
-rwxr-xr-xdocs/run_binary_doc.md84
-rwxr-xr-xdocs/selects_doc.md141
-rwxr-xr-xdocs/shell_doc.md68
-rwxr-xr-xdocs/structs_doc.md37
-rwxr-xr-xdocs/types_doc.md305
-rwxr-xr-xdocs/unittest_doc.md874
-rwxr-xr-xdocs/versions_doc.md164
-rwxr-xr-xdocs/write_file_doc.md92
22 files changed, 1375 insertions, 2359 deletions
diff --git a/docs/BUILD b/docs/BUILD
index 1d5d0d8..2ccd60e 100644
--- a/docs/BUILD
+++ b/docs/BUILD
@@ -1,4 +1,4 @@
-load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc")
+load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
licenses(["notice"])
diff --git a/docs/analysis_test_doc.md b/docs/analysis_test_doc.md
index 817be66..1a564ae 100755
--- a/docs/analysis_test_doc.md
+++ b/docs/analysis_test_doc.md
@@ -1,4 +1,9 @@
-<a name="#analysis_test"></a>
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+A test verifying other targets can be successfully analyzed as part of a `bazel test`
+
+<a id="#analysis_test"></a>
+
## analysis_test
<pre>
@@ -32,30 +37,12 @@ Test rule checking that other targets can be successfully analyzed.
name: The name of the test rule.
targets: A list of targets to ensure build.
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysis_test-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="analysis_test-targets">
- <td><code>targets</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a>; required
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="analysis_test-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| <a id="analysis_test-targets"></a>targets | - | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | required | |
diff --git a/docs/build_test_doc.md b/docs/build_test_doc.md
index 6f3c597..332dc58 100755
--- a/docs/build_test_doc.md
+++ b/docs/build_test_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+A test verifying other targets build as part of a `bazel test`
+
+<a id="#build_test"></a>
+
## build_test
<pre>
@@ -10,9 +16,6 @@ This works not by an instance of this test failing, but instead by
the targets it depends on failing to build, and hence failing
the attempt to run this test.
-NOTE: At the moment, this won't work on Windows; but someone adding
-support would be welcomed.
-
Typical usage:
```
@@ -26,42 +29,13 @@ Typical usage:
```
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="build_test-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the test rule.
- </p>
- </td>
- </tr>
- <tr id="build_test-targets">
- <td><code>targets</code></td>
- <td>
- required.
- <p>
- A list of targets to ensure build.
- </p>
- </td>
- </tr>
- <tr id="build_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="build_test-name"></a>name | The name of the test rule. | none |
+| <a id="build_test-targets"></a>targets | A list of targets to ensure build. | none |
+| <a id="build_test-kwargs"></a>kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/collections_doc.md b/docs/collections_doc.md
index 64ffb5e..1138850 100755
--- a/docs/collections_doc.md
+++ b/docs/collections_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing functions that operate on collections.
+
+<a id="#collections.after_each"></a>
+
## collections.after_each
<pre>
@@ -6,35 +12,20 @@ collections.after_each(<a href="#collections.after_each-separator">separator</a>
Inserts `separator` after each item in `iterable`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.after_each-separator">
- <td><code>separator</code></td>
- <td>
- required.
- <p>
- The value to insert after each item in `iterable`.
- </p>
- </td>
- </tr>
- <tr id="collections.after_each-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- The list into which to intersperse the separator.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="collections.after_each-separator"></a>separator | The value to insert after each item in <code>iterable</code>. | none |
+| <a id="collections.after_each-iterable"></a>iterable | The list into which to intersperse the separator. | none |
+**RETURNS**
+
+A new list with `separator` after each item in `iterable`.
+
+
+<a id="#collections.before_each"></a>
## collections.before_each
@@ -44,35 +35,20 @@ collections.before_each(<a href="#collections.before_each-separator">separator</
Inserts `separator` before each item in `iterable`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.before_each-separator">
- <td><code>separator</code></td>
- <td>
- required.
- <p>
- The value to insert before each item in `iterable`.
- </p>
- </td>
- </tr>
- <tr id="collections.before_each-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- The list into which to intersperse the separator.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="collections.before_each-separator"></a>separator | The value to insert before each item in <code>iterable</code>. | none |
+| <a id="collections.before_each-iterable"></a>iterable | The list into which to intersperse the separator. | none |
+
+**RETURNS**
+
+A new list with `separator` before each item in `iterable`.
+
+
+<a id="#collections.uniq"></a>
## collections.uniq
@@ -85,24 +61,15 @@ Returns a list of unique elements in `iterable`.
Requires all the elements to be hashable.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.uniq-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- An iterable to filter.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="collections.uniq-iterable"></a>iterable | An iterable to filter. | none |
+
+**RETURNS**
+
+A new list with all unique elements from `iterable`.
diff --git a/docs/common_settings_doc.md b/docs/common_settings_doc.md
index 676f070..736e48c 100755
--- a/docs/common_settings_doc.md
+++ b/docs/common_settings_doc.md
@@ -1,6 +1,15 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#bool_flag"></a>
+Common build setting rules
+
+These rules return a BuildSettingInfo with the value of the build setting.
+For label-typed settings, use the native label_flag and label_setting rules.
+
+More documentation on how to use build settings at
+https://docs.bazel.build/versions/main/skylark/config.html#user-defined-build-settings
+
+
+<a id="#bool_flag"></a>
## bool_flag
@@ -10,28 +19,15 @@ bool_flag(<a href="#bool_flag-name">name</a>)
A bool-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="bool_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#bool_setting"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="bool_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#bool_setting"></a>
## bool_setting
@@ -41,28 +37,15 @@ bool_setting(<a href="#bool_setting-name">name</a>)
A bool-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="bool_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#int_flag"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="bool_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#int_flag"></a>
## int_flag
@@ -72,28 +55,15 @@ int_flag(<a href="#int_flag-name">name</a>)
An int-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="int_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#int_setting"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="int_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#int_setting"></a>
## int_setting
@@ -103,28 +73,15 @@ int_setting(<a href="#int_setting-name">name</a>)
An int-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="int_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#string_flag"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="int_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#string_flag"></a>
## string_flag
@@ -134,37 +91,16 @@ string_flag(<a href="#string_flag-name">name</a>, <a href="#string_flag-values">
A string-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="string_flag-values">
- <td><code>values</code></td>
- <td>
- List of strings; optional
- <p>
- The list of allowed values for this setting. An error is raised if any other value is given.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#string_list_flag"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="string_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| <a id="string_flag-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] |
+
+
+<a id="#string_list_flag"></a>
## string_list_flag
@@ -174,28 +110,15 @@ string_list_flag(<a href="#string_list_flag-name">name</a>)
A string list-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_list_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#string_list_setting"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="string_list_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#string_list_setting"></a>
## string_list_setting
@@ -205,28 +128,15 @@ string_list_setting(<a href="#string_list_setting-name">name</a>)
A string list-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_list_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#string_setting"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="string_list_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+
+
+<a id="#string_setting"></a>
## string_setting
@@ -236,37 +146,16 @@ string_setting(<a href="#string_setting-name">name</a>, <a href="#string_setting
A string-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="string_setting-values">
- <td><code>values</code></td>
- <td>
- List of strings; optional
- <p>
- The list of allowed values for this setting. An error is raised if any other value is given.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#BuildSettingInfo"></a>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="string_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| <a id="string_setting-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] |
+
+
+<a id="#BuildSettingInfo"></a>
## BuildSettingInfo
@@ -276,21 +165,11 @@ BuildSettingInfo(<a href="#BuildSettingInfo-value">value</a>)
A singleton provider that contains the raw value of a build setting
-### Fields
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="BuildSettingInfo-value">
- <td><code>value</code></td>
- <td>
- <p>The value of the build setting in the current configuration. This value may come from the command line or an upstream transition, or else it will be the build setting's default.</p>
- </td>
- </tr>
- </tbody>
-</table>
+**FIELDS**
+
+
+| Name | Description |
+| :------------- | :------------- |
+| <a id="BuildSettingInfo-value"></a>value | The value of the build setting in the current configuration. This value may come from the command line or an upstream transition, or else it will be the build setting's default. |
diff --git a/docs/copy_file_doc.md b/docs/copy_file_doc.md
index 67148bc..47a1244 100755
--- a/docs/copy_file_doc.md
+++ b/docs/copy_file_doc.md
@@ -1,6 +1,15 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#copy_file"></a>
+A rule that copies a file to another place.
+
+native.genrule() is sometimes used to copy files (often wishing to rename them).
+The 'copy_file' rule does this with a simpler interface than genrule.
+
+The rule uses a Bash command on Linux/macOS/non-Windows, and a cmd.exe command
+on Windows (no Bash is required).
+
+
+<a id="#copy_file"></a>
## copy_file
@@ -15,78 +24,16 @@ Copies a file to another location.
This rule uses a Bash command on Linux/macOS/non-Windows, and a cmd.exe command on Windows (no Bash is required).
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="copy_file-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- Name of the rule.
- </p>
- </td>
- </tr>
- <tr id="copy_file-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- A Label. The file to make a copy of. (Can also be the label of a rule
- that generates a file.)
- </p>
- </td>
- </tr>
- <tr id="copy_file-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- Path of the output file, relative to this package.
- </p>
- </td>
- </tr>
- <tr id="copy_file-is_executable">
- <td><code>is_executable</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to make the output file executable. When
- True, the rule's output can be executed using `bazel run` and can be
- in the srcs of binary and test rules that require executable sources.
- WARNING: If `allow_symlink` is True, `src` must also be executable.
- </p>
- </td>
- </tr>
- <tr id="copy_file-allow_symlink">
- <td><code>allow_symlink</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to allow symlinking instead of copying.
- When False, the output is always a hard copy. When True, the output
- *can* be a symlink, but there is no guarantee that a symlink is
- created (i.e., at the time of writing, we don't create symlinks on
- Windows). Set this to True if you need fast copying and your tools can
- handle symlinks (which most UNIX tools can).
- </p>
- </td>
- </tr>
- <tr id="copy_file-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- further keyword arguments, e.g. `visibility`
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="copy_file-name"></a>name | Name of the rule. | none |
+| <a id="copy_file-src"></a>src | A Label. The file to make a copy of. (Can also be the label of a rule that generates a file.) | none |
+| <a id="copy_file-out"></a>out | Path of the output file, relative to this package. | none |
+| <a id="copy_file-is_executable"></a>is_executable | A boolean. Whether to make the output file executable. When True, the rule's output can be executed using <code>bazel run</code> and can be in the srcs of binary and test rules that require executable sources. WARNING: If <code>allow_symlink</code> is True, <code>src</code> must also be executable. | <code>False</code> |
+| <a id="copy_file-allow_symlink"></a>allow_symlink | A boolean. Whether to allow symlinking instead of copying. When False, the output is always a hard copy. When True, the output *can* be a symlink, but there is no guarantee that a symlink is created (i.e., at the time of writing, we don't create symlinks on Windows). Set this to True if you need fast copying and your tools can handle symlinks (which most UNIX tools can). | <code>False</code> |
+| <a id="copy_file-kwargs"></a>kwargs | further keyword arguments, e.g. <code>visibility</code> | none |
diff --git a/docs/dicts_doc.md b/docs/dicts_doc.md
index 2e95cf8..5e8bce6 100755
--- a/docs/dicts_doc.md
+++ b/docs/dicts_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing functions that operate on dictionaries.
+
+<a id="#dicts.add"></a>
+
## dicts.add
<pre>
@@ -15,33 +21,16 @@ special cases for their inputs: the sum of zero dictionaries is the empty
dictionary, and the sum of a single dictionary is a copy of itself.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="dicts.add-dictionaries">
- <td><code>dictionaries</code></td>
- <td>
- optional.
- <p>
- Zero or more dictionaries to be added.
- </p>
- </td>
- </tr>
- <tr id="dicts.add-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- Additional dictionary passed as keyword args.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="dicts.add-dictionaries"></a>dictionaries | Zero or more dictionaries to be added. | none |
+| <a id="dicts.add-kwargs"></a>kwargs | Additional dictionary passed as keyword args. | none |
+
+**RETURNS**
+
+A new `dict` that has all the entries of the given dictionaries.
diff --git a/docs/diff_test_doc.md b/docs/diff_test_doc.md
index 07ce8b9..fd62a38 100755
--- a/docs/diff_test_doc.md
+++ b/docs/diff_test_doc.md
@@ -1,3 +1,13 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+A test rule that compares two binary files.
+
+The rule uses a Bash command (diff) on Linux/macOS/non-Windows, and a cmd.exe
+command (fc.exe) on Windows (no Bash is required).
+
+
+<a id="#diff_test"></a>
+
## diff_test
<pre>
@@ -9,51 +19,14 @@ A test that compares two files.
The test succeeds if the files' contents match.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="diff_test-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the test rule.
- </p>
- </td>
- </tr>
- <tr id="diff_test-file1">
- <td><code>file1</code></td>
- <td>
- required.
- <p>
- Label of the file to compare to <code>file2</code>.
- </p>
- </td>
- </tr>
- <tr id="diff_test-file2">
- <td><code>file2</code></td>
- <td>
- required.
- <p>
- Label of the file to compare to <code>file1</code>.
- </p>
- </td>
- </tr>
- <tr id="diff_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="diff_test-name"></a>name | The name of the test rule. | none |
+| <a id="diff_test-file1"></a>file1 | Label of the file to compare to &lt;code&gt;file2&lt;/code&gt;. | none |
+| <a id="diff_test-file2"></a>file2 | Label of the file to compare to &lt;code&gt;file1&lt;/code&gt;. | none |
+| <a id="diff_test-kwargs"></a>kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/maintainers_guide.md b/docs/maintainers_guide.md
new file mode 100644
index 0000000..8a009c2
--- /dev/null
+++ b/docs/maintainers_guide.md
@@ -0,0 +1,114 @@
+# Skylib Maintainer's Guide
+
+## The Parts of Skylib
+
+* `bzl_library.bzl` - used by almost all rule sets, and thus requiring
+ especial attention to maintaining backwards compatibility. Ideally, it ought
+ to be moved out of Skylib and and into Bazel's bundled `@bazel_tools` repo
+ (see https://github.com/bazelbuild/bazel-skylib/issues/127).
+* Test libraries - `rules/analysis_test.bzl`, `rules/build_test.bzl`,
+ `lib/unittest.bzl`; these are under more active development than the rest of
+ Skylib, because we want to provide rule authors with a good testing story.
+ Ideally, these ought to be moved out of Skylib and evolved at a faster pace.
+* A kitchen sink of utility modules (everything else). Formerly, these
+ features were piled on in a rather haphazard manner. For any new additions,
+ we want to be more conservative: add a feature only if it is widely needed
+ (or was already independently implemented in multiple rule sets), if the
+ interface is unimpeachable, if level of abstraction is not shallow, and the
+ implementation is efficient.
+
+## PR Review Standards
+
+Because Skylib is so widely used, breaking backwards compatibility can cause
+widespread pain, and shouldn't be done lightly. Therefore:
+
+1. In the first place, avoid adding insufficiently thought out, insufficiently
+ tested features which will later need to be replaced in a
+ backwards-incompatible manner. See the criteria in README.md.
+2. Given a choice between breaking backwards compatibilty and keeping it, try
+ to keep backwards compatibility. For example, if adding a new argument to a
+ function, add it to the end of the argument list, so that existing callers'
+ positional arguments continue to work.
+3. Keep Skylib out-of-the-box compatible with the current stable Bazel release
+ (ideally - with two most recent stable releases).
+ * For example, when adding a new function which calls the new
+ `native.foobar()` method which was introduced in the latest Bazel
+ pre-release or is gated behind an `--incompatible` flag, use an `if
+ hasattr(native, "foobar")` check to keep the rest of your module (which
+ doesn't need `native.foobar()`) working even when `native.foobar()` is
+ not available.
+
+In addition, make sure that new code is documented and tested.
+
+If a PR adds or changes any docstrings, check that Markdown docs in `docs`
+directory are updated; if not, ask the PR author to run
+`./docs/regenerate_docs.sh`. (See
+https://github.com/bazelbuild/bazel-skylib/pull/321 for the proposal to automate
+this.)
+
+## Making a New Release
+
+1. Update CHANGELOG.md at the top. You may want to use the following template:
+
+--------------------------------------------------------------------------------
+
+Release $VERSION
+
+**New Features**
+
+- Feature
+- Feature
+
+**Incompatible Changes**
+
+- Change
+- Change
+
+**Contributors**
+
+Name 1, Name 2, Name 3 (alphabetically from `git log`)
+
+--------------------------------------------------------------------------------
+
+2. Bump `version` in version.bzl to the new version.
+3. Ensure that the commits for steps 1 and 2 have been merged. All further
+ steps must be performed on a single, known-good git commit.
+4. `bazel build //distribution:bazel-skylib-$VERSION.tar.gz`
+5. Copy the `bazel-skylib-$VERSION.tar.gz` tarball to the mirror (you'll need
+ Bazel developer gcloud credentials; assuming you are a Bazel developer, you
+ can obtain them via `gcloud init`):
+
+```
+gsutil cp bazel-bin/distro/bazel-skylib-$VERSION.tar.gz gs://bazel-mirror/github.com/bazelbuild/bazel-skylib/releases/download/$VERSION/bazel-skylib-$VERSION.tar.gz
+gsutil setmeta -h "Cache-Control: public, max-age=31536000" "gs://bazel-mirror/github.com/bazelbuild/bazel-skylib/releases/download/$VERSION/bazel-skylib-$VERSION.tar.gz"
+```
+
+6. Run `sha256sum bazel-bin/distro/bazel-skylib-$VERSION.tar.gz`; you'll need
+ the checksum for the release notes.
+7. Draft a new release with a new tag named $VERSION in github. Attach
+ `bazel-skylib-$VERSION.tar.gz` to the release. For the release notes, use
+ the CHANGELOG.md entry plus the following template:
+
+--------------------------------------------------------------------------------
+
+**WORKSPACE setup**
+
+```
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+http_archive(
+ name = "bazel_skylib",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/$VERSION/bazel-skylib-$VERSION.tar.gz",
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/$VERSION/bazel-skylib-$VERSION.tar.gz",
+ ],
+ sha256 = "$SHA256SUM",
+)
+load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
+bazel_skylib_workspace()
+```
+
+**Using the rules**
+
+See [the source](https://github.com/bazelbuild/bazel-skylib/tree/$VERSION).
+
+-------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/docs/native_binary_doc.md b/docs/native_binary_doc.md
index 9cf90f4..1a330ca 100755
--- a/docs/native_binary_doc.md
+++ b/docs/native_binary_doc.md
@@ -1,3 +1,15 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+native_binary() and native_test() rule implementations.
+
+These rules let you wrap a pre-built binary or script in a conventional binary
+and test rule respectively. They fulfill the same goal as sh_binary and sh_test
+do, but they run the wrapped binary directly, instead of through Bash, so they
+don't depend on Bash and work with --shell_exectuable="".
+
+
+<a id="#native_binary"></a>
+
## native_binary
<pre>
@@ -9,60 +21,20 @@ Wraps a pre-built binary or script with a binary rule.
You can "bazel run" this rule like any other binary rule, and use it as a tool in genrule.tools for example. You can also augment the binary with runfiles.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="native_binary-name">
- <td><code>name</code></td>
- <td>
- required.
- </td>
- </tr>
- <tr id="native_binary-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- label; path of the pre-built executable
- </p>
- </td>
- </tr>
- <tr id="native_binary-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.)
- </p>
- </td>
- </tr>
- <tr id="native_binary-data">
- <td><code>data</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- list of labels; data dependencies
- </p>
- </td>
- </tr>
- <tr id="native_binary-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-binaries">common attributes for binaries</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="native_binary-name"></a>name | The name of the rule. | none |
+| <a id="native_binary-src"></a>src | label; path of the pre-built executable | none |
+| <a id="native_binary-out"></a>out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none |
+| <a id="native_binary-data"></a>data | list of labels; data dependencies | <code>None</code> |
+| <a id="native_binary-kwargs"></a>kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-binaries"&gt;common attributes for binaries&lt;/a&gt;. | none |
+
+
+<a id="#native_test"></a>
+
## native_test
<pre>
@@ -75,57 +47,15 @@ You can "bazel test" this rule like any other test rule. You can also augment th
runfiles.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="native_test-name">
- <td><code>name</code></td>
- <td>
- required.
- </td>
- </tr>
- <tr id="native_test-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- label; path of the pre-built executable
- </p>
- </td>
- </tr>
- <tr id="native_test-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.)
- </p>
- </td>
- </tr>
- <tr id="native_test-data">
- <td><code>data</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- list of labels; data dependencies
- </p>
- </td>
- </tr>
- <tr id="native_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="native_test-name"></a>name | The name of the test rule. | none |
+| <a id="native_test-src"></a>src | label; path of the pre-built executable | none |
+| <a id="native_test-out"></a>out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none |
+| <a id="native_test-data"></a>data | list of labels; data dependencies | <code>None</code> |
+| <a id="native_test-kwargs"></a>kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/new_sets_doc.md b/docs/new_sets_doc.md
index feec3b8..e34107f 100755
--- a/docs/new_sets_doc.md
+++ b/docs/new_sets_doc.md
@@ -1,3 +1,18 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing common hash-set algorithms.
+
+ An empty set can be created using: `sets.make()`, or it can be created with some starting values
+ if you pass it an sequence: `sets.make([1, 2, 3])`. This returns a struct containing all of the
+ values as keys in a dictionary - this means that all passed in values must be hashable. The
+ values in the set can be retrieved using `sets.to_list(my_set)`.
+
+ An arbitrary object can be tested whether it is a set generated by `sets.make()` or not with the
+ `types.is_set()` method in types.bzl.
+
+
+<a id="#sets.make"></a>
+
## sets.make
<pre>
@@ -9,26 +24,19 @@ Creates a new set.
All elements must be hashable.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.make-elements"></a>elements | Optional sequence to construct the set out of. | <code>None</code> |
+
+**RETURNS**
+
+A set containing the passed in values.
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.make-elements">
- <td><code>elements</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- Optional sequence to construct the set out of.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+<a id="#sets.copy"></a>
## sets.copy
@@ -38,27 +46,20 @@ sets.copy(<a href="#sets.copy-s">s</a>)
Creates a new set from another set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.copy-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.copy-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A new set containing the same elements as `s`.
+
+
+<a id="#sets.to_list"></a>
+
## sets.to_list
<pre>
@@ -67,26 +68,19 @@ sets.to_list(<a href="#sets.to_list-s">s</a>)
Creates a list from the values in the set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.to_list-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.to_list-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A list of values inserted into the set.
+
+<a id="#sets.insert"></a>
## sets.insert
@@ -99,36 +93,21 @@ Inserts an element into the set.
Element must be hashable. This mutates the original set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.insert-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.insert-e">
- <td><code>e</code></td>
- <td>
- required.
- <p>
- The element to be inserted.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.insert-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.insert-e"></a>e | The element to be inserted. | none |
+
+**RETURNS**
+
+The set `s` with `e` included.
+
+
+<a id="#sets.contains"></a>
+
## sets.contains
<pre>
@@ -137,35 +116,20 @@ sets.contains(<a href="#sets.contains-a">a</a>, <a href="#sets.contains-e">e</a>
Checks for the existence of an element in a set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.contains-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.contains-e">
- <td><code>e</code></td>
- <td>
- required.
- <p>
- The element to look for.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.contains-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.contains-e"></a>e | The element to look for. | none |
+
+**RETURNS**
+
+True if the element exists in the set, False if the element does not.
+
+<a id="#sets.is_equal"></a>
## sets.is_equal
@@ -175,36 +139,21 @@ sets.is_equal(<a href="#sets.is_equal-a">a</a>, <a href="#sets.is_equal-b">b</a>
Returns whether two sets are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.is_equal-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.is_equal-b">
- <td><code>b</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.is_equal-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.is_equal-b"></a>b | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+True if `a` is equal to `b`, False otherwise.
+
+
+<a id="#sets.is_subset"></a>
+
## sets.is_subset
<pre>
@@ -213,35 +162,20 @@ sets.is_subset(<a href="#sets.is_subset-a">a</a>, <a href="#sets.is_subset-b">b<
Returns whether `a` is a subset of `b`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.is_subset-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.is_subset-b">
- <td><code>b</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.is_subset-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.is_subset-b"></a>b | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+True if `a` is a subset of `b`, False otherwise.
+
+<a id="#sets.disjoint"></a>
## sets.disjoint
@@ -254,36 +188,21 @@ Returns whether two sets are disjoint.
Two sets are disjoint if they have no elements in common.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.disjoint-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.disjoint-b">
- <td><code>b</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.disjoint-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.disjoint-b"></a>b | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+True if `a` and `b` are disjoint, False otherwise.
+
+
+<a id="#sets.intersection"></a>
+
## sets.intersection
<pre>
@@ -292,35 +211,20 @@ sets.intersection(<a href="#sets.intersection-a">a</a>, <a href="#sets.intersect
Returns the intersection of two sets.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.intersection-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.intersection-b">
- <td><code>b</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.intersection-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.intersection-b"></a>b | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A set containing the elements that are in both `a` and `b`.
+
+<a id="#sets.union"></a>
## sets.union
@@ -330,27 +234,20 @@ sets.union(<a href="#sets.union-args">args</a>)
Returns the union of several sets.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.union-args">
- <td><code>args</code></td>
- <td>
- optional.
- <p>
- An arbitrary number of sets or lists.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.union-args"></a>args | An arbitrary number of sets. | none |
+
+**RETURNS**
+
+The set union of all sets in `*args`.
+
+
+<a id="#sets.difference"></a>
+
## sets.difference
<pre>
@@ -359,35 +256,20 @@ sets.difference(<a href="#sets.difference-a">a</a>, <a href="#sets.difference-b"
Returns the elements in `a` that are not in `b`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.difference-a">
- <td><code>a</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.difference-b">
- <td><code>b</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.difference-a"></a>a | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.difference-b"></a>b | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A set containing the elements that are in `a` but not in `b`.
+
+<a id="#sets.length"></a>
## sets.length
@@ -397,27 +279,20 @@ sets.length(<a href="#sets.length-s">s</a>)
Returns the number of elements in a set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.length-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.length-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+An integer representing the number of elements in the set.
+
+
+<a id="#sets.remove"></a>
+
## sets.remove
<pre>
@@ -429,35 +304,20 @@ Removes an element from the set.
Element must be hashable. This mutates the original set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.remove-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- <tr id="sets.remove-e">
- <td><code>e</code></td>
- <td>
- required.
- <p>
- The element to be removed.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.remove-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+| <a id="sets.remove-e"></a>e | The element to be removed. | none |
+
+**RETURNS**
+
+The set `s` with `e` removed.
+
+<a id="#sets.repr"></a>
## sets.repr
@@ -467,27 +327,20 @@ sets.repr(<a href="#sets.repr-s">s</a>)
Returns a string value representing the set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.repr-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.repr-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A string representing the set.
+
+
+<a id="#sets.str"></a>
+
## sets.str
<pre>
@@ -496,24 +349,15 @@ sets.str(<a href="#sets.str-s">s</a>)
Returns a string value representing the set.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="sets.str-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A set, as returned by `sets.make()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="sets.str-s"></a>s | A set, as returned by <code>sets.make()</code>. | none |
+
+**RETURNS**
+
+A string representing the set.
diff --git a/docs/partial_doc.md b/docs/partial_doc.md
index 4559ba3..d772ec8 100755
--- a/docs/partial_doc.md
+++ b/docs/partial_doc.md
@@ -1,3 +1,14 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Starlark module for working with partial function objects.
+
+Partial function objects allow some parameters are bound before the call.
+
+Similar to https://docs.python.org/3/library/functools.html#functools.partial.
+
+
+<a id="#partial.make"></a>
+
## partial.make
<pre>
@@ -12,16 +23,22 @@ passed to it at the call sites.
A partial 'function' can be defined with positional args and kwargs:
# function with no args
+ ```
def function1():
...
+ ```
# function with 2 args
+ ```
def function2(arg1, arg2):
...
+ ```
# function with 2 args and keyword args
+ ```
def function3(arg1, arg2, x, y):
...
+ ```
The positional args passed to the function are the args passed into make
followed by any additional positional args given to call. The below example
@@ -29,24 +46,30 @@ illustrates a function with two positional arguments where one is supplied by
make and the other by call:
# function demonstrating 1 arg at make site, and 1 arg at call site
+ ```
def _foo(make_arg1, func_arg1):
- print(make_arg1 + " " + func_arg1 + "!")
+ print(make_arg1 + " " + func_arg1 + "!")
+ ```
For example:
+ ```
hi_func = partial.make(_foo, "Hello")
bye_func = partial.make(_foo, "Goodbye")
partial.call(hi_func, "Jennifer")
partial.call(hi_func, "Dave")
partial.call(bye_func, "Jennifer")
partial.call(bye_func, "Dave")
+ ```
prints:
+ ```
"Hello, Jennifer!"
"Hello, Dave!"
"Goodbye, Jennifer!"
"Goodbye, Dave!"
+ ```
The keyword args given to the function are the kwargs passed into make
unioned with the keyword args given to call. In case of a conflict, the
@@ -56,16 +79,20 @@ value for keyword arguments and override it at the call site.
Example with a make site arg, a call site arg, a make site kwarg and a
call site kwarg:
+ ```
def _foo(make_arg1, call_arg1, make_location, call_location):
print(make_arg1 + " is from " + make_location + " and " +
call_arg1 + " is from " + call_location + "!")
func = partial.make(_foo, "Ben", make_location="Hollywood")
partial.call(func, "Jennifer", call_location="Denver")
+ ```
Prints "Ben is from Hollywood and Jennifer is from Denver!".
+ ```
partial.call(func, "Jennifer", make_location="LA", call_location="Denver")
+ ```
Prints "Ben is from LA and Jennifer is from Denver!".
@@ -73,52 +100,30 @@ Note that keyword args may not overlap with positional args, regardless of
whether they are given during the make or call step. For instance, you can't
do:
+```
def foo(x):
pass
func = partial.make(foo, 1)
partial.call(func, x=2)
+```
+
+**PARAMETERS**
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="partial.make-func">
- <td><code>func</code></td>
- <td>
- required.
- <p>
- The function to be called.
- </p>
- </td>
- </tr>
- <tr id="partial.make-args">
- <td><code>args</code></td>
- <td>
- optional.
- <p>
- Positional arguments to be passed to function.
- </p>
- </td>
- </tr>
- <tr id="partial.make-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- Keyword arguments to be passed to function. Note that these can
- be overridden at the call sites.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="partial.make-func"></a>func | The function to be called. | none |
+| <a id="partial.make-args"></a>args | Positional arguments to be passed to function. | none |
+| <a id="partial.make-kwargs"></a>kwargs | Keyword arguments to be passed to function. Note that these can be overridden at the call sites. | none |
+
+**RETURNS**
+
+A new `partial` that can be called using `call`
+
+
+<a id="#partial.call"></a>
## partial.call
@@ -128,44 +133,39 @@ partial.call(<a href="#partial.call-partial">partial</a>, <a href="#partial.call
Calls a partial created using `make`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="partial.call-partial">
- <td><code>partial</code></td>
- <td>
- required.
- <p>
- The partial to be called.
- </p>
- </td>
- </tr>
- <tr id="partial.call-args">
- <td><code>args</code></td>
- <td>
- optional.
- <p>
- Additional positional arguments to be appended to the ones given to
- make.
- </p>
- </td>
- </tr>
- <tr id="partial.call-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- Additional keyword arguments to augment and override the ones
- given to make.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="partial.call-partial"></a>partial | The partial to be called. | none |
+| <a id="partial.call-args"></a>args | Additional positional arguments to be appended to the ones given to make. | none |
+| <a id="partial.call-kwargs"></a>kwargs | Additional keyword arguments to augment and override the ones given to make. | none |
+
+**RETURNS**
+
+Whatever the function in the partial returns.
+
+
+<a id="#partial.is_instance"></a>
+
+## partial.is_instance
+
+<pre>
+partial.is_instance(<a href="#partial.is_instance-v">v</a>)
+</pre>
+
+Returns True if v is a partial created using `make`.
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="partial.is_instance-v"></a>v | The value to check. | none |
+
+**RETURNS**
+
+True if v was created by `make`, False otherwise.
diff --git a/docs/paths_doc.md b/docs/paths_doc.md
index 8797c01..e0d8116 100755
--- a/docs/paths_doc.md
+++ b/docs/paths_doc.md
@@ -1,3 +1,14 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing file path manipulation functions.
+
+NOTE: The functions in this module currently only support paths with Unix-style
+path separators (forward slash, "/"); they do not handle Windows-style paths
+with backslash separators or drive letters.
+
+
+<a id="#paths.basename"></a>
+
## paths.basename
<pre>
@@ -12,26 +23,19 @@ the Unix `basename` command (which would return the path segment preceding
the final slash).
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.basename-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose basename should be returned.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.basename-p"></a>p | The path whose basename should be returned. | none |
+**RETURNS**
+
+The basename of the path, which includes the extension.
+
+
+<a id="#paths.dirname"></a>
## paths.dirname
@@ -46,26 +50,19 @@ The dirname is the portion of `p` up to but not including the file portion
included, unless omitting them would make the dirname empty.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.dirname-p"></a>p | The path whose dirname should be returned. | none |
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.dirname-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose dirname should be returned.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**RETURNS**
+The dirname of the path.
+
+
+<a id="#paths.is_absolute"></a>
## paths.is_absolute
@@ -75,26 +72,19 @@ paths.is_absolute(<a href="#paths.is_absolute-path">path</a>)
Returns `True` if `path` is an absolute path.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.is_absolute-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path (which is a string).
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.is_absolute-path"></a>path | A path (which is a string). | none |
+
+**RETURNS**
+`True` if `path` is an absolute path.
+
+
+<a id="#paths.join"></a>
## paths.join
@@ -113,35 +103,20 @@ already ends in a separator.
If any component is an absolute path, all previous components are discarded.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.join-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path segment.
- </p>
- </td>
- </tr>
- <tr id="paths.join-others">
- <td><code>others</code></td>
- <td>
- optional.
- <p>
- Additional path segments.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.join-path"></a>path | A path segment. | none |
+| <a id="paths.join-others"></a>others | Additional path segments. | none |
+
+**RETURNS**
+A string containing the joined paths.
+
+
+<a id="#paths.normalize"></a>
## paths.normalize
@@ -166,27 +141,20 @@ POSIX platforms; specifically:
- Multiple adjacent internal slashes are collapsed into a single slash.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.normalize-path"></a>path | A path. | none |
+
+**RETURNS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.normalize-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+The normalized path.
+<a id="#paths.relativize"></a>
+
## paths.relativize
<pre>
@@ -204,36 +172,21 @@ Relativizing paths that start with parent directory references only works if
the path both start with the same initial parent references.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.relativize-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- The path to relativize.
- </p>
- </td>
- </tr>
- <tr id="paths.relativize-start">
- <td><code>start</code></td>
- <td>
- required.
- <p>
- The ancestor path against which to relativize.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.relativize-path"></a>path | The path to relativize. | none |
+| <a id="paths.relativize-start"></a>start | The ancestor path against which to relativize. | none |
+
+**RETURNS**
+
+The portion of `path` that is relative to `start`.
+<a id="#paths.replace_extension"></a>
+
## paths.replace_extension
<pre>
@@ -245,37 +198,21 @@ Replaces the extension of the file at the end of a path.
If the path has no extension, the new extension is added to it.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.replace_extension-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose extension should be replaced.
- </p>
- </td>
- </tr>
- <tr id="paths.replace_extension-new_extension">
- <td><code>new_extension</code></td>
- <td>
- required.
- <p>
- The new extension for the file. The new extension should
- begin with a dot if you want the new filename to have one.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.replace_extension-p"></a>p | The path whose extension should be replaced. | none |
+| <a id="paths.replace_extension-new_extension"></a>new_extension | The new extension for the file. The new extension should begin with a dot if you want the new filename to have one. | none |
+
+**RETURNS**
+
+The path with the extension replaced (or added, if it did not have one).
+<a id="#paths.split_extension"></a>
+
## paths.split_extension
<pre>
@@ -288,24 +225,18 @@ Leading periods on the basename are ignored, so
`path.split_extension(".bashrc")` returns `(".bashrc", "")`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.split_extension-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose root and extension should be split.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="paths.split_extension-p"></a>p | The path whose root and extension should be split. | none |
+
+**RETURNS**
+
+A tuple `(root, ext)` such that the root is the path without the file
+extension, and `ext` is the file extension (which, if non-empty, contains
+the leading dot). The returned tuple always satisfies the relationship
+`root + ext == p`.
diff --git a/docs/regenerate_docs.sh b/docs/regenerate_docs.sh
index 2ab9a08..d16ea63 100755
--- a/docs/regenerate_docs.sh
+++ b/docs/regenerate_docs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2019 The Bazel Authors. All rights reserved.
#
@@ -19,7 +19,7 @@
set -euo pipefail
-bazel build docs:all --experimental_remap_main_repo
+bazel build docs:all
for filename in bazel-bin/docs/*_gen.md; do
target_filename="$(echo $filename | sed -En "s/bazel-bin\/(.*)_gen.md/\1/p").md"
diff --git a/docs/run_binary_doc.md b/docs/run_binary_doc.md
index 188e277..96bada5 100755
--- a/docs/run_binary_doc.md
+++ b/docs/run_binary_doc.md
@@ -1,4 +1,13 @@
-<a name="#run_binary"></a>
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+
+run_binary() build rule implementation.
+
+Runs a binary as a build action. This rule does not require Bash (unlike native.genrule()).
+
+
+<a id="#run_binary"></a>
+
## run_binary
<pre>
@@ -7,69 +16,16 @@ run_binary(<a href="#run_binary-name">name</a>, <a href="#run_binary-args">args<
Runs a binary as a build action.<br/><br/>This rule does not require Bash (unlike <code>native.genrule</code>).
-### Attributes
+**ATTRIBUTES**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="run_binary-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="run_binary-args">
- <td><code>args</code></td>
- <td>
- List of strings; optional
- <p>
- Command line arguments of the binary.<br/><br/>Subject to<code><a href="https://docs.bazel.build/versions/master/be/make-variables.html#location">$(location)</a></code> expansion.
- </p>
- </td>
- </tr>
- <tr id="run_binary-env">
- <td><code>env</code></td>
- <td>
- <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a>; optional
- <p>
- Environment variables of the action.<br/><br/>Subject to <code><a href="https://docs.bazel.build/versions/master/be/make-variables.html#location">$(location)</a></code> expansion.
- </p>
- </td>
- </tr>
- <tr id="run_binary-outs">
- <td><code>outs</code></td>
- <td>
- List of labels; required
- <p>
- Output files generated by the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- <tr id="run_binary-srcs">
- <td><code>srcs</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a>; optional
- <p>
- Additional inputs of the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- <tr id="run_binary-tool">
- <td><code>tool</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; required
- <p>
- The tool to run in the action.<br/><br/>Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="run_binary-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| <a id="run_binary-args"></a>args | Command line arguments of the binary.&lt;br/&gt;&lt;br/&gt;Subject to&lt;code&gt;&lt;a href="https://docs.bazel.build/versions/main/be/make-variables.html#location"&gt;$(location)&lt;/a&gt;&lt;/code&gt; expansion. | List of strings | optional | [] |
+| <a id="run_binary-env"></a>env | Environment variables of the action.&lt;br/&gt;&lt;br/&gt;Subject to &lt;code&gt;&lt;a href="https://docs.bazel.build/versions/main/be/make-variables.html#location"&gt;$(location)&lt;/a&gt;&lt;/code&gt; expansion. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
+| <a id="run_binary-outs"></a>outs | Output files generated by the action.&lt;br/&gt;&lt;br/&gt;These labels are available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | List of labels | required | |
+| <a id="run_binary-srcs"></a>srcs | Additional inputs of the action.&lt;br/&gt;&lt;br/&gt;These labels are available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
+| <a id="run_binary-tool"></a>tool | The tool to run in the action.&lt;br/&gt;&lt;br/&gt;Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
diff --git a/docs/selects_doc.md b/docs/selects_doc.md
index 55711c9..8bfd964 100755
--- a/docs/selects_doc.md
+++ b/docs/selects_doc.md
@@ -1,6 +1,8 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-<a name="#selects.with_or"></a>
+Skylib module containing convenience interfaces for select().
+
+<a id="#selects.with_or"></a>
## selects.with_or
@@ -24,40 +26,29 @@ Example:
Key labels may appear at most once anywhere in the input.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.with_or-input_dict">
- <td><code>input_dict</code></td>
- <td>
- required.
- <p>
- The same dictionary `select()` takes, except keys may take
- either the usual form `"//foo:config1"` or
- `("//foo:config1", "//foo:config2", ...)` to signify
- `//foo:config1` OR `//foo:config2` OR `...`.
- </p>
- </td>
- </tr>
- <tr id="selects.with_or-no_match_error">
- <td><code>no_match_error</code></td>
- <td>
- optional. default is <code>""</code>
- <p>
- Optional custom error to report if no condition matches.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<a name="#selects.with_or_dict"></a>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="selects.with_or-input_dict"></a>input_dict | The same dictionary <code>select()</code> takes, except keys may take either the usual form <code>"//foo:config1"</code> or <code>("//foo:config1", "//foo:config2", ...)</code> to signify <code>//foo:config1</code> OR <code>//foo:config2</code> OR <code>...</code>. | none |
+| <a id="selects.with_or-no_match_error"></a>no_match_error | Optional custom error to report if no condition matches. | <code>""</code> |
+
+**RETURNS**
+
+A native `select()` that expands
+
+`("//configs:two", "//configs:three"): [":dep2or3"]`
+
+to
+
+```build
+"//configs:two": [":dep2or3"],
+"//configs:three": [":dep2or3"],
+```
+
+
+<a id="#selects.with_or_dict"></a>
## selects.with_or_dict
@@ -71,33 +62,24 @@ Unlike `select()`, the contents of the dict can be inspected by Starlark
macros.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="selects.with_or_dict-input_dict"></a>input_dict | Same as <code>with_or</code>. | none |
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.with_or_dict-input_dict">
- <td><code>input_dict</code></td>
- <td>
- required.
- <p>
- Same as `with_or`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**RETURNS**
+A dictionary usable by a native `select()`.
-<a name="#selects.config_setting_group"></a>
+
+<a id="#selects.config_setting_group"></a>
## selects.config_setting_group
<pre>
-selects.config_setting_group(<a href="#selects.config_setting_group-name">name</a>, <a href="#selects.config_setting_group-match_any">match_any</a>, <a href="#selects.config_setting_group-match_all">match_all</a>)
+selects.config_setting_group(<a href="#selects.config_setting_group-name">name</a>, <a href="#selects.config_setting_group-match_any">match_any</a>, <a href="#selects.config_setting_group-match_all">match_all</a>, <a href="#selects.config_setting_group-visibility">visibility</a>)
</pre>
Matches if all or any of its member `config_setting`s match.
@@ -124,45 +106,14 @@ Example:
```
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.config_setting_group-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The group's name. This is how `select()`s reference it.
- </p>
- </td>
- </tr>
- <tr id="selects.config_setting_group-match_any">
- <td><code>match_any</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of `config_settings`. This group matches if *any* member
- in the list matches. If this is set, `match_all` must not be set.
- </p>
- </td>
- </tr>
- <tr id="selects.config_setting_group-match_all">
- <td><code>match_all</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of `config_settings`. This group matches if *every*
- member in the list matches. If this is set, `match_any` must be not
- set.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="selects.config_setting_group-name"></a>name | The group's name. This is how <code>select()</code>s reference it. | none |
+| <a id="selects.config_setting_group-match_any"></a>match_any | A list of <code>config_settings</code>. This group matches if *any* member in the list matches. If this is set, <code>match_all</code> must not be set. | <code>[]</code> |
+| <a id="selects.config_setting_group-match_all"></a>match_all | A list of <code>config_settings</code>. This group matches if *every* member in the list matches. If this is set, <code>match_any</code> must be not set. | <code>[]</code> |
+| <a id="selects.config_setting_group-visibility"></a>visibility | Visibility of the config_setting_group. | <code>None</code> |
diff --git a/docs/shell_doc.md b/docs/shell_doc.md
index 6c655be..0759434 100755
--- a/docs/shell_doc.md
+++ b/docs/shell_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing shell utility functions.
+
+<a id="#shell.array_literal"></a>
+
## shell.array_literal
<pre>
@@ -14,27 +20,20 @@ Note that all elements in the array are quoted (using `shell.quote`) for
safety, even if they do not need to be.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="shell.array_literal-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- A sequence of elements. Elements that are not strings will be
- converted to strings first, by calling `str()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="shell.array_literal-iterable"></a>iterable | A sequence of elements. Elements that are not strings will be converted to strings first, by calling <code>str()</code>. | none |
+
+**RETURNS**
+A string that represents the sequence as a shell array; that is,
+parentheses containing the quoted elements.
+
+
+<a id="#shell.quote"></a>
## shell.quote
@@ -48,24 +47,15 @@ This function quotes the given string (in case it contains spaces or other
shell metacharacters.)
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="shell.quote-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- The string to quote.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="shell.quote-s"></a>s | The string to quote. | none |
+
+**RETURNS**
+
+A quoted version of the string that can be passed to a shell command.
diff --git a/docs/structs_doc.md b/docs/structs_doc.md
index 3b742cb..a409d86 100755
--- a/docs/structs_doc.md
+++ b/docs/structs_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing functions that operate on structs.
+
+<a id="#structs.to_dict"></a>
+
## structs.to_dict
<pre>
@@ -6,24 +12,17 @@ structs.to_dict(<a href="#structs.to_dict-s">s</a>)
Converts a `struct` to a `dict`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="structs.to_dict-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A `struct`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="structs.to_dict-s"></a>s | A <code>struct</code>. | none |
+
+**RETURNS**
+
+A `dict` whose keys and values are the same as the fields in `s`. The
+transformation is only applied to the struct's fields and not to any
+nested values.
diff --git a/docs/types_doc.md b/docs/types_doc.md
index 038ae0a..7ab0a6c 100755
--- a/docs/types_doc.md
+++ b/docs/types_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing functions checking types.
+
+<a id="#types.is_list"></a>
+
## types.is_list
<pre>
@@ -6,26 +12,19 @@ types.is_list(<a href="#types.is_list-v">v</a>)
Returns True if v is an instance of a list.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_list-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_list-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a list, False otherwise.
+
+<a id="#types.is_string"></a>
## types.is_string
@@ -35,27 +34,20 @@ types.is_string(<a href="#types.is_string-v">v</a>)
Returns True if v is an instance of a string.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_string-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_string-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a string, False otherwise.
+
+
+<a id="#types.is_bool"></a>
+
## types.is_bool
<pre>
@@ -64,26 +56,19 @@ types.is_bool(<a href="#types.is_bool-v">v</a>)
Returns True if v is an instance of a bool.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_bool-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_bool-v"></a>v | The value whose type should be checked. | none |
+**RETURNS**
+
+True if v is an instance of a bool, False otherwise.
+
+
+<a id="#types.is_none"></a>
## types.is_none
@@ -93,26 +78,19 @@ types.is_none(<a href="#types.is_none-v">v</a>)
Returns True if v has the type of None.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_none-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_none-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is None, False otherwise.
+
+<a id="#types.is_int"></a>
## types.is_int
@@ -122,27 +100,20 @@ types.is_int(<a href="#types.is_int-v">v</a>)
Returns True if v is an instance of a signed integer.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_int-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_int-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a signed integer, False otherwise.
+
+
+<a id="#types.is_tuple"></a>
+
## types.is_tuple
<pre>
@@ -151,26 +122,19 @@ types.is_tuple(<a href="#types.is_tuple-v">v</a>)
Returns True if v is an instance of a tuple.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_tuple-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_tuple-v"></a>v | The value whose type should be checked. | none |
+**RETURNS**
+
+True if v is an instance of a tuple, False otherwise.
+
+
+<a id="#types.is_dict"></a>
## types.is_dict
@@ -180,26 +144,19 @@ types.is_dict(<a href="#types.is_dict-v">v</a>)
Returns True if v is an instance of a dict.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_dict-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_dict-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a dict, False otherwise.
+
+<a id="#types.is_function"></a>
## types.is_function
@@ -209,27 +166,20 @@ types.is_function(<a href="#types.is_function-v">v</a>)
Returns True if v is an instance of a function.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_function-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_function-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a function, False otherwise.
+
+
+<a id="#types.is_depset"></a>
+
## types.is_depset
<pre>
@@ -238,24 +188,37 @@ types.is_depset(<a href="#types.is_depset-v">v</a>)
Returns True if v is an instance of a `depset`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_depset-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_depset-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v is an instance of a `depset`, False otherwise.
+
+
+<a id="#types.is_set"></a>
+
+## types.is_set
+
+<pre>
+types.is_set(<a href="#types.is_set-v">v</a>)
+</pre>
+
+Returns True if v is a set created by sets.make().
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="types.is_set-v"></a>v | The value whose type should be checked. | none |
+
+**RETURNS**
+
+True if v was created by sets.make(), False otherwise.
diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md
index 4fbd96f..5472d74 100755
--- a/docs/unittest_doc.md
+++ b/docs/unittest_doc.md
@@ -1,61 +1,44 @@
-<a name="#unittest_toolchain"></a>
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Unit testing support.
+
+Unlike most Skylib files, this exports two modules: `unittest` which contains
+functions to declare and define unit tests, and `asserts` which contains the
+assertions used to within tests.
+
+
+<a id="#unittest_toolchain"></a>
+
## unittest_toolchain
<pre>
-unittest_toolchain(<a href="#unittest_toolchain-name">name</a>, <a href="#unittest_toolchain-failure_templ">failure_templ</a>, <a href="#unittest_toolchain-file_ext">file_ext</a>, <a href="#unittest_toolchain-join_on">join_on</a>, <a href="#unittest_toolchain-success_templ">success_templ</a>)
+unittest_toolchain(<a href="#unittest_toolchain-name">name</a>, <a href="#unittest_toolchain-escape_chars_with">escape_chars_with</a>, <a href="#unittest_toolchain-escape_other_chars_with">escape_other_chars_with</a>, <a href="#unittest_toolchain-failure_templ">failure_templ</a>, <a href="#unittest_toolchain-file_ext">file_ext</a>,
+ <a href="#unittest_toolchain-join_on">join_on</a>, <a href="#unittest_toolchain-success_templ">success_templ</a>)
</pre>
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest_toolchain-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="unittest_toolchain-failure_templ">
- <td><code>failure_templ</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-file_ext">
- <td><code>file_ext</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-join_on">
- <td><code>join_on</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-success_templ">
- <td><code>success_templ</code></td>
- <td>
- String; required
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="unittest_toolchain-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| <a id="unittest_toolchain-escape_chars_with"></a>escape_chars_with | Dictionary of characters that need escaping in test failure message to prefix appended to escape those characters. For example, <code>{"%": "%", "&gt;": "^"}</code> would replace <code>%</code> with <code>%%</code> and <code>&gt;</code> with <code>^&gt;</code> in the failure message before that is included in <code>success_templ</code>. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
+| <a id="unittest_toolchain-escape_other_chars_with"></a>escape_other_chars_with | String to prefix every character in test failure message which is not a key in <code>escape_chars_with</code> before including that in <code>success_templ</code>. For example, <code>""</code> would prefix every character in the failure message (except those in the keys of <code>escape_chars_with</code>) with <code>\</code>. | String | optional | "" |
+| <a id="unittest_toolchain-failure_templ"></a>failure_templ | Test script template with a single <code>%s</code>. That placeholder is replaced with the lines in the failure message joined with the string specified in <code>join_with</code>. The resulting script should print the failure message and exit with non-zero status. | String | required | |
+| <a id="unittest_toolchain-file_ext"></a>file_ext | File extension for test script, including leading dot. | String | required | |
+| <a id="unittest_toolchain-join_on"></a>join_on | String used to join the lines in the failure message before including the resulting string in the script specified in <code>failure_templ</code>. | String | required | |
+| <a id="unittest_toolchain-success_templ"></a>success_templ | Test script generated when the test passes. Should exit with status 0. | String | required | |
+<a id="#analysistest.make"></a>
+
## analysistest.make
<pre>
-analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-attrs">attrs</a>, <a href="#analysistest.make-config_settings">config_settings</a>)
+analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-attrs">attrs</a>, <a href="#analysistest.make-fragments">fragments</a>, <a href="#analysistest.make-config_settings">config_settings</a>,
+ <a href="#analysistest.make-extra_target_under_test_aspects">extra_target_under_test_aspects</a>, <a href="#analysistest.make-doc">doc</a>)
</pre>
Creates an analysis test rule from its implementation function.
@@ -84,58 +67,26 @@ your_test = analysistest.make(_your_test)
Recall that names of test rules must end in `_test`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.make-impl">
- <td><code>impl</code></td>
- <td>
- required.
- <p>
- The implementation function of the unit test.
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-expect_failure">
- <td><code>expect_failure</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- If true, the analysis test will expect the target_under_test
- to fail. Assertions can be made on the underlying failure using asserts.expect_failure
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-attrs">
- <td><code>attrs</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- An optional dictionary to supplement the attrs passed to the
- unit test's `rule()` constructor.
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-config_settings">
- <td><code>config_settings</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- A dictionary of configuration settings to change for the target under
- test and its dependencies. This may be used to essentially change 'build flags' for
- the target under test, and may thus be utilized to test multiple targets with different
- flags in a single build
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.make-impl"></a>impl | The implementation function of the unit test. | none |
+| <a id="analysistest.make-expect_failure"></a>expect_failure | If true, the analysis test will expect the target_under_test to fail. Assertions can be made on the underlying failure using asserts.expect_failure | <code>False</code> |
+| <a id="analysistest.make-attrs"></a>attrs | An optional dictionary to supplement the attrs passed to the unit test's <code>rule()</code> constructor. | <code>{}</code> |
+| <a id="analysistest.make-fragments"></a>fragments | An optional list of fragment names that can be used to give rules access to language-specific parts of configuration. | <code>[]</code> |
+| <a id="analysistest.make-config_settings"></a>config_settings | A dictionary of configuration settings to change for the target under test and its dependencies. This may be used to essentially change 'build flags' for the target under test, and may thus be utilized to test multiple targets with different flags in a single build | <code>{}</code> |
+| <a id="analysistest.make-extra_target_under_test_aspects"></a>extra_target_under_test_aspects | An optional list of aspects to apply to the target_under_test in addition to those set up by default for the test harness itself. | <code>[]</code> |
+| <a id="analysistest.make-doc"></a>doc | A description of the rule that can be extracted by documentation generating tools. | <code>""</code> |
+
+**RETURNS**
+A rule definition that should be stored in a global whose name ends in
+`_test`.
+
+
+<a id="#analysistest.begin"></a>
## analysistest.begin
@@ -151,27 +102,21 @@ assertion failures so that they can be reported and logged at the end of the
test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.begin-ctx">
- <td><code>ctx</code></td>
- <td>
- required.
- <p>
- The Skylark context. Pass the implementation function's `ctx` argument
- in verbatim.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.begin-ctx"></a>ctx | The Starlark context. Pass the implementation function's <code>ctx</code> argument in verbatim. | none |
+
+**RETURNS**
+
+A test environment struct that must be passed to assertions and finally to
+`unittest.end`. Do not rely on internal details about the fields in this
+struct as it may change.
+
+
+<a id="#analysistest.end"></a>
## analysistest.end
@@ -185,27 +130,20 @@ This must be called and returned at the end of an analysis test implementation f
that the results are reported.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.end-env"></a>env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+**RETURNS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.end-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+A list of providers needed to automatically register the analysis test result.
+<a id="#analysistest.fail"></a>
+
## analysistest.fail
<pre>
@@ -214,35 +152,16 @@ analysistest.fail(<a href="#analysistest.fail-env">env</a>, <a href="#analysiste
Unconditionally causes the current test to fail.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.fail-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="analysistest.fail-msg">
- <td><code>msg</code></td>
- <td>
- required.
- <p>
- The message to log describing the failure.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.fail-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="analysistest.fail-msg"></a>msg | The message to log describing the failure. | none |
+
+<a id="#analysistest.target_actions"></a>
## analysistest.target_actions
@@ -252,26 +171,41 @@ analysistest.target_actions(<a href="#analysistest.target_actions-env">env</a>)
Returns a list of actions registered by the target under test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.target_actions-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.target_actions-env"></a>env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+**RETURNS**
+A list of actions registered by the target under test
+
+
+<a id="#analysistest.target_bin_dir_path"></a>
+
+## analysistest.target_bin_dir_path
+
+<pre>
+analysistest.target_bin_dir_path(<a href="#analysistest.target_bin_dir_path-env">env</a>)
+</pre>
+
+Returns ctx.bin_dir.path for the target under test.
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.target_bin_dir_path-env"></a>env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+**RETURNS**
+
+Output bin dir path string.
+
+
+<a id="#analysistest.target_under_test"></a>
## analysistest.target_under_test
@@ -281,27 +215,20 @@ analysistest.target_under_test(<a href="#analysistest.target_under_test-env">env
Returns the target under test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.target_under_test-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="analysistest.target_under_test-env"></a>env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+**RETURNS**
+
+The target under test.
+
+
+<a id="#asserts.expect_failure"></a>
+
## asserts.expect_failure
<pre>
@@ -314,36 +241,17 @@ This requires that the analysis test is created with `analysistest.make()` and
`expect_failures = True` is specified.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.expect_failure-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.expect_failure-expected_failure_msg">
- <td><code>expected_failure_msg</code></td>
- <td>
- optional. default is <code>""</code>
- <p>
- The error message to expect as a result of analysis failures.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.expect_failure-env"></a>env | The test environment returned by <code>analysistest.begin</code>. | none |
+| <a id="asserts.expect_failure-expected_failure_msg"></a>expected_failure_msg | The error message to expect as a result of analysis failures. | <code>""</code> |
+<a id="#asserts.equals"></a>
+
## asserts.equals
<pre>
@@ -352,55 +260,19 @@ asserts.equals(<a href="#asserts.equals-env">env</a>, <a href="#asserts.equals-e
Asserts that the given `expected` and `actual` values are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected value of some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual value returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.equals-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="asserts.equals-expected"></a>expected | The expected value of some computation. | none |
+| <a id="asserts.equals-actual"></a>actual | The actual value returned by some computation. | none |
+| <a id="asserts.equals-msg"></a>msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+<a id="#asserts.false"></a>
+
## asserts.false
<pre>
@@ -409,46 +281,18 @@ asserts.false(<a href="#asserts.false-env">env</a>, <a href="#asserts.false-cond
Asserts that the given `condition` is false.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.false-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.false-condition">
- <td><code>condition</code></td>
- <td>
- required.
- <p>
- A value that will be evaluated in a Boolean context.
- </p>
- </td>
- </tr>
- <tr id="asserts.false-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>"Expected condition to be false, but was true."</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.false-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="asserts.false-condition"></a>condition | A value that will be evaluated in a Boolean context. | none |
+| <a id="asserts.false-msg"></a>msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>"Expected condition to be false, but was true."</code> |
+<a id="#asserts.set_equals"></a>
+
## asserts.set_equals
<pre>
@@ -457,54 +301,18 @@ asserts.set_equals(<a href="#asserts.set_equals-env">env</a>, <a href="#asserts.
Asserts that the given `expected` and `actual` sets are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.set_equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected set resulting from some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual set returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.set_equals-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="asserts.set_equals-expected"></a>expected | The expected set resulting from some computation. | none |
+| <a id="asserts.set_equals-actual"></a>actual | The actual set returned by some computation. | none |
+| <a id="asserts.set_equals-msg"></a>msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+
+<a id="#asserts.new_set_equals"></a>
## asserts.new_set_equals
@@ -514,54 +322,18 @@ asserts.new_set_equals(<a href="#asserts.new_set_equals-env">env</a>, <a href="#
Asserts that the given `expected` and `actual` sets are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.new_set_equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected set resulting from some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual set returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.new_set_equals-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="asserts.new_set_equals-expected"></a>expected | The expected set resulting from some computation. | none |
+| <a id="asserts.new_set_equals-actual"></a>actual | The actual set returned by some computation. | none |
+| <a id="asserts.new_set_equals-msg"></a>msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+
+<a id="#asserts.true"></a>
## asserts.true
@@ -571,45 +343,64 @@ asserts.true(<a href="#asserts.true-env">env</a>, <a href="#asserts.true-conditi
Asserts that the given `condition` is true.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.true-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.true-condition">
- <td><code>condition</code></td>
- <td>
- required.
- <p>
- A value that will be evaluated in a Boolean context.
- </p>
- </td>
- </tr>
- <tr id="asserts.true-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>"Expected condition to be true, but was false."</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="asserts.true-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="asserts.true-condition"></a>condition | A value that will be evaluated in a Boolean context. | none |
+| <a id="asserts.true-msg"></a>msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>"Expected condition to be true, but was false."</code> |
+
+
+<a id="#loadingtest.make"></a>
+
+## loadingtest.make
+
+<pre>
+loadingtest.make(<a href="#loadingtest.make-name">name</a>)
+</pre>
+
+Creates a loading phase test environment and test_suite.
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="loadingtest.make-name"></a>name | name of the suite of tests to create | none |
+
+**RETURNS**
+
+loading phase environment passed to other loadingtest functions
+
+
+<a id="#loadingtest.equals"></a>
+
+## loadingtest.equals
+
+<pre>
+loadingtest.equals(<a href="#loadingtest.equals-env">env</a>, <a href="#loadingtest.equals-test_case">test_case</a>, <a href="#loadingtest.equals-expected">expected</a>, <a href="#loadingtest.equals-actual">actual</a>)
+</pre>
+
+Creates a test case for asserting state at LOADING phase.
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="loadingtest.equals-env"></a>env | Loading test env created from loadingtest.make | none |
+| <a id="loadingtest.equals-test_case"></a>test_case | Name of the test case | none |
+| <a id="loadingtest.equals-expected"></a>expected | Expected value to test | none |
+| <a id="loadingtest.equals-actual"></a>actual | Actual value received. | none |
+
+**RETURNS**
+
+None, creates test case
+
+<a id="#register_unittest_toolchains"></a>
## register_unittest_toolchains
@@ -621,6 +412,8 @@ Registers the toolchains for unittest users.
+<a id="#unittest.make"></a>
+
## unittest.make
<pre>
@@ -653,36 +446,21 @@ your_test = unittest.make(_your_test)
Recall that names of test rules must end in `_test`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.make-impl">
- <td><code>impl</code></td>
- <td>
- required.
- <p>
- The implementation function of the unit test.
- </p>
- </td>
- </tr>
- <tr id="unittest.make-attrs">
- <td><code>attrs</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- An optional dictionary to supplement the attrs passed to the
- unit test's `rule()` constructor.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="unittest.make-impl"></a>impl | The implementation function of the unit test. | none |
+| <a id="unittest.make-attrs"></a>attrs | An optional dictionary to supplement the attrs passed to the unit test's <code>rule()</code> constructor. | <code>{}</code> |
+
+**RETURNS**
+A rule definition that should be stored in a global whose name ends in
+`_test`.
+
+
+<a id="#unittest.suite"></a>
## unittest.suite
@@ -699,10 +477,10 @@ and then creating each target one by one. To reduce duplication, we recommend
writing a macro in your `.bzl` file to instantiate all targets, and calling
that macro from your BUILD file so you only have to load one symbol.
-For the case where your unit tests do not take any (non-default) attributes --
-i.e., if your unit tests do not test rules -- you can use this function to
-create the targets and wrap them in a single test_suite target. In your
-`.bzl` file, write:
+You can use this function to create the targets and wrap them in a single
+test_suite target. If a test rule requires no arguments, you can simply list
+it as an argument. If you wish to supply attributes explicitly, you can do so
+using `partial.make()`. For instance, in your `.bzl` file, you could write:
```
def your_test_suite():
@@ -710,7 +488,7 @@ def your_test_suite():
"your_test_suite",
your_test,
your_other_test,
- yet_another_test,
+ partial.make(yet_another_test, timeout = "short"),
)
```
@@ -729,36 +507,16 @@ is the index of the test in the `test_rules` list, which is used to uniquely
name each target.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.suite-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the `test_suite` target, and the prefix of all the test
- target names.
- </p>
- </td>
- </tr>
- <tr id="unittest.suite-test_rules">
- <td><code>test_rules</code></td>
- <td>
- optional.
- <p>
- A list of test rules defines by `unittest.test`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="unittest.suite-name"></a>name | The name of the <code>test_suite</code> target, and the prefix of all the test target names. | none |
+| <a id="unittest.suite-test_rules"></a>test_rules | A list of test rules defines by <code>unittest.test</code>. | none |
+
+
+<a id="#unittest.begin"></a>
## unittest.begin
@@ -774,27 +532,21 @@ assertion failures so that they can be reported and logged at the end of the
test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.begin-ctx">
- <td><code>ctx</code></td>
- <td>
- required.
- <p>
- The Skylark context. Pass the implementation function's `ctx` argument
- in verbatim.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="unittest.begin-ctx"></a>ctx | The Starlark context. Pass the implementation function's <code>ctx</code> argument in verbatim. | none |
+
+**RETURNS**
+
+A test environment struct that must be passed to assertions and finally to
+`unittest.end`. Do not rely on internal details about the fields in this
+struct as it may change.
+
+<a id="#unittest.end"></a>
## unittest.end
@@ -808,26 +560,19 @@ This must be called and returned at the end of a unit test implementation functi
that the results are reported.
-### Parameters
+**PARAMETERS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.end-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="unittest.end-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+
+**RETURNS**
+
+A list of providers needed to automatically register the test result.
+
+
+<a id="#unittest.fail"></a>
## unittest.fail
@@ -837,33 +582,12 @@ unittest.fail(<a href="#unittest.fail-env">env</a>, <a href="#unittest.fail-msg"
Unconditionally causes the current test to fail.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.fail-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="unittest.fail-msg">
- <td><code>msg</code></td>
- <td>
- required.
- <p>
- The message to log describing the failure.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="unittest.fail-env"></a>env | The test environment returned by <code>unittest.begin</code>. | none |
+| <a id="unittest.fail-msg"></a>msg | The message to log describing the failure. | none |
diff --git a/docs/versions_doc.md b/docs/versions_doc.md
index d94076c..83ee7a7 100755
--- a/docs/versions_doc.md
+++ b/docs/versions_doc.md
@@ -1,3 +1,9 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Skylib module containing functions for checking Bazel versions.
+
+<a id="#versions.get"></a>
+
## versions.get
<pre>
@@ -8,6 +14,8 @@ Returns the current Bazel version
+<a id="#versions.parse"></a>
+
## versions.parse
<pre>
@@ -19,26 +27,19 @@ Parses a version string into a 3-tuple of ints
int tuples can be compared directly using binary operators (<, >).
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.parse-bazel_version">
- <td><code>bazel_version</code></td>
- <td>
- required.
- <p>
- the Bazel version string
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="versions.parse-bazel_version"></a>bazel_version | the Bazel version string | none |
+**RETURNS**
+
+An int 3-tuple of a (major, minor, patch) version.
+
+
+<a id="#versions.check"></a>
## versions.check
@@ -48,45 +49,18 @@ versions.check(<a href="#versions.check-minimum_bazel_version">minimum_bazel_ver
Check that the version of Bazel is valid within the specified range.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.check-minimum_bazel_version">
- <td><code>minimum_bazel_version</code></td>
- <td>
- required.
- <p>
- minimum version of Bazel expected
- </p>
- </td>
- </tr>
- <tr id="versions.check-maximum_bazel_version">
- <td><code>maximum_bazel_version</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- maximum version of Bazel expected
- </p>
- </td>
- </tr>
- <tr id="versions.check-bazel_version">
- <td><code>bazel_version</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- the version of Bazel to check. Used for testing, defaults to native.bazel_version
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="versions.check-minimum_bazel_version"></a>minimum_bazel_version | minimum version of Bazel expected | none |
+| <a id="versions.check-maximum_bazel_version"></a>maximum_bazel_version | maximum version of Bazel expected | <code>None</code> |
+| <a id="versions.check-bazel_version"></a>bazel_version | the version of Bazel to check. Used for testing, defaults to native.bazel_version | <code>None</code> |
+<a id="#versions.is_at_most"></a>
+
## versions.is_at_most
<pre>
@@ -95,36 +69,21 @@ versions.is_at_most(<a href="#versions.is_at_most-threshold">threshold</a>, <a h
Check that a version is lower or equals to a threshold.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.is_at_most-threshold">
- <td><code>threshold</code></td>
- <td>
- required.
- <p>
- the maximum version string
- </p>
- </td>
- </tr>
- <tr id="versions.is_at_most-version">
- <td><code>version</code></td>
- <td>
- required.
- <p>
- the version string to be compared to the threshold
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="versions.is_at_most-threshold"></a>threshold | the maximum version string | none |
+| <a id="versions.is_at_most-version"></a>version | the version string to be compared to the threshold | none |
+
+**RETURNS**
+
+True if version <= threshold.
+<a id="#versions.is_at_least"></a>
+
## versions.is_at_least
<pre>
@@ -133,33 +92,16 @@ versions.is_at_least(<a href="#versions.is_at_least-threshold">threshold</a>, <a
Check that a version is higher or equals to a threshold.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.is_at_least-threshold">
- <td><code>threshold</code></td>
- <td>
- required.
- <p>
- the minimum version string
- </p>
- </td>
- </tr>
- <tr id="versions.is_at_least-version">
- <td><code>version</code></td>
- <td>
- required.
- <p>
- the version string to be compared to the threshold
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="versions.is_at_least-threshold"></a>threshold | the minimum version string | none |
+| <a id="versions.is_at_least-version"></a>version | the version string to be compared to the threshold | none |
+
+**RETURNS**
+
+True if version >= threshold.
diff --git a/docs/write_file_doc.md b/docs/write_file_doc.md
index d8f098e..8f39376 100755
--- a/docs/write_file_doc.md
+++ b/docs/write_file_doc.md
@@ -1,3 +1,17 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+A rule that writes a UTF-8 encoded text file from user-specified contents.
+
+native.genrule() is sometimes used to create a text file. The 'write_file' and
+macro does this with a simpler interface than genrule.
+
+The rules generated by the macro do not use Bash or any other shell to write the
+file. Instead they use Starlark's built-in file writing action
+(ctx.actions.write).
+
+
+<a id="#write_file"></a>
+
## write_file
<pre>
@@ -6,74 +20,16 @@ write_file(<a href="#write_file-name">name</a>, <a href="#write_file-out">out</a
Creates a UTF-8 encoded text file.
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="write_file-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- Name of the rule.
- </p>
- </td>
- </tr>
- <tr id="write_file-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- Path of the output file, relative to this package.
- </p>
- </td>
- </tr>
- <tr id="write_file-content">
- <td><code>content</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of strings. Lines of text, the contents of the file.
- Newlines are added automatically after every line except the last one.
- </p>
- </td>
- </tr>
- <tr id="write_file-is_executable">
- <td><code>is_executable</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to make the output file executable.
- When True, the rule's output can be executed using `bazel run` and can
- be in the srcs of binary and test rules that require executable
- sources.
- </p>
- </td>
- </tr>
- <tr id="write_file-newline">
- <td><code>newline</code></td>
- <td>
- optional. default is <code>"auto"</code>
- <p>
- one of ["auto", "unix", "windows"]: line endings to use. "auto"
- for platform-determined, "unix" for LF, and "windows" for CRLF.
- </p>
- </td>
- </tr>
- <tr id="write_file-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- further keyword arguments, e.g. <code>visibility</code>
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="write_file-name"></a>name | Name of the rule. | none |
+| <a id="write_file-out"></a>out | Path of the output file, relative to this package. | none |
+| <a id="write_file-content"></a>content | A list of strings. Lines of text, the contents of the file. Newlines are added automatically after every line except the last one. | <code>[]</code> |
+| <a id="write_file-is_executable"></a>is_executable | A boolean. Whether to make the output file executable. When True, the rule's output can be executed using <code>bazel run</code> and can be in the srcs of binary and test rules that require executable sources. | <code>False</code> |
+| <a id="write_file-newline"></a>newline | one of ["auto", "unix", "windows"]: line endings to use. "auto" for platform-determined, "unix" for LF, and "windows" for CRLF. | <code>"auto"</code> |
+| <a id="write_file-kwargs"></a>kwargs | further keyword arguments, e.g. &lt;code&gt;visibility&lt;/code&gt; | none |