Bump stardoc dep to unbreak build with --experimental_enable_bzlmod (#398)
This commit is contained in:
parent
61d9c62833
commit
bc112d41fd
|
@ -28,6 +28,6 @@ go_deps.module(
|
||||||
use_repo(go_deps, "com_github_bazelbuild_buildtools")
|
use_repo(go_deps, "com_github_bazelbuild_buildtools")
|
||||||
|
|
||||||
# Build-only / test-only dependencies
|
# Build-only / test-only dependencies
|
||||||
bazel_dep(name = "stardoc", dev_dependency = True, repo_name = "io_bazel_stardoc", version = "0.5.1")
|
bazel_dep(name = "stardoc", dev_dependency = True, repo_name = "io_bazel_stardoc", version = "0.5.3")
|
||||||
bazel_dep(name = "rules_pkg", dev_dependency = True, version = "0.5.1")
|
bazel_dep(name = "rules_pkg", dev_dependency = True, version = "0.5.1")
|
||||||
bazel_dep(name = "rules_cc", dev_dependency = True, version = "0.0.1")
|
bazel_dep(name = "rules_cc", dev_dependency = True, version = "0.0.1")
|
||||||
|
|
|
@ -26,10 +26,10 @@ go_register_toolchains(version = "1.17.1")
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "io_bazel_stardoc",
|
name = "io_bazel_stardoc",
|
||||||
sha256 = "aa814dae0ac400bbab2e8881f9915c6f47c49664bf087c409a15f90438d2c23e",
|
sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
|
||||||
urls = [
|
urls = [
|
||||||
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz",
|
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
||||||
"https://github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz",
|
"https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ Test rule checking that other targets can be successfully analyzed.
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">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 | |
|
| <a id="analysis_test-targets"></a>targets | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,6 @@ Typical usage:
|
||||||
| :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- |
|
||||||
| <a id="build_test-name"></a>name | The name of the test rule. | none |
|
| <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-targets"></a>targets | A list of targets to ensure build. | none |
|
||||||
| <a id="build_test-kwargs"></a>kwargs | The <a href="https://bazel.build/reference/be/common-definitions#common-attributes-tests">common attributes for tests</a>. | none |
|
| <a id="build_test-kwargs"></a>kwargs | The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests). | none |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ A bool-typed build setting that can be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="bool_setting"></a>
|
<a id="bool_setting"></a>
|
||||||
|
@ -42,7 +42,7 @@ A bool-typed build setting that cannot be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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="bool_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="int_flag"></a>
|
<a id="int_flag"></a>
|
||||||
|
@ -60,7 +60,7 @@ An int-typed build setting that can be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="int_setting"></a>
|
<a id="int_setting"></a>
|
||||||
|
@ -78,7 +78,7 @@ An int-typed build setting that cannot be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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="int_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="string_flag"></a>
|
<a id="string_flag"></a>
|
||||||
|
@ -96,8 +96,8 @@ A string-typed build setting that can be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">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_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 | <code>[]</code> |
|
||||||
|
|
||||||
|
|
||||||
<a id="string_list_flag"></a>
|
<a id="string_list_flag"></a>
|
||||||
|
@ -115,7 +115,7 @@ A string list-typed build setting that can be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="string_list_setting"></a>
|
<a id="string_list_setting"></a>
|
||||||
|
@ -133,7 +133,7 @@ A string list-typed build setting that cannot be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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_list_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="string_setting"></a>
|
<a id="string_setting"></a>
|
||||||
|
@ -151,8 +151,8 @@ A string-typed build setting that cannot be set on the command line
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">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="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 | <code>[]</code> |
|
||||||
|
|
||||||
|
|
||||||
<a id="BuildSettingInfo"></a>
|
<a id="BuildSettingInfo"></a>
|
||||||
|
|
|
@ -25,9 +25,9 @@ The test succeeds if the files' contents match.
|
||||||
| Name | Description | Default Value |
|
| Name | Description | Default Value |
|
||||||
| :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- |
|
||||||
| <a id="diff_test-name"></a>name | The name of the test rule. | none |
|
| <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 <code>file2</code>. | none |
|
| <a id="diff_test-file1"></a>file1 | Label of the file to compare to <code>file2</code>. | none |
|
||||||
| <a id="diff_test-file2"></a>file2 | Label of the file to compare to <code>file1</code>. | none |
|
| <a id="diff_test-file2"></a>file2 | Label of the file to compare to <code>file1</code>. | none |
|
||||||
| <a id="diff_test-failure_message"></a>failure_message | Additional message to log if the files' contents do not match. | <code>None</code> |
|
| <a id="diff_test-failure_message"></a>failure_message | Additional message to log if the files' contents do not match. | <code>None</code> |
|
||||||
| <a id="diff_test-kwargs"></a>kwargs | The <a href="https://bazel.build/reference/be/common-definitions#common-attributes-tests">common attributes for tests</a>. | none |
|
| <a id="diff_test-kwargs"></a>kwargs | The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests). | none |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@ explicitly add delimiters to the key strings, for example "{KEY}" or "@KEY@".
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| Name | Description | Type | Mandatory | Default |
|
||||||
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
||||||
| <a id="expand_template-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
|
| <a id="expand_template-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
| <a id="expand_template-out"></a>out | The destination of the expanded file. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="expand_template-out"></a>out | The destination of the expanded file. | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
| <a id="expand_template-substitutions"></a>substitutions | A dictionary mapping strings to their substitutions. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | required | |
|
| <a id="expand_template-substitutions"></a>substitutions | A dictionary mapping strings to their substitutions. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
|
||||||
| <a id="expand_template-template"></a>template | The template file to expand. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="expand_template-template"></a>template | The template file to expand. | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@ in genrule.tools for example. You can also augment the binary with runfiles.
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| Name | Description | Type | Mandatory | Default |
|
||||||
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
||||||
| <a id="native_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="native_binary-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
| <a id="native_binary-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
| <a id="native_binary-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
|
||||||
| <a id="native_binary-out"></a>out | An output name for the copy of the binary | String | required | |
|
| <a id="native_binary-out"></a>out | An output name for the copy of the binary | String | required | |
|
||||||
| <a id="native_binary-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="native_binary-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
<a id="native_test"></a>
|
<a id="native_test"></a>
|
||||||
|
@ -54,9 +54,9 @@ the binary with runfiles.
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| Name | Description | Type | Mandatory | Default |
|
||||||
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
||||||
| <a id="native_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="native_test-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
| <a id="native_test-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
| <a id="native_test-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
|
||||||
| <a id="native_test-out"></a>out | An output name for the copy of the binary | String | required | |
|
| <a id="native_test-out"></a>out | An output name for the copy of the binary | String | required | |
|
||||||
| <a id="native_test-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="native_test-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,18 +14,20 @@ Runs a binary as a build action. This rule does not require Bash (unlike native.
|
||||||
run_binary(<a href="#run_binary-name">name</a>, <a href="#run_binary-args">args</a>, <a href="#run_binary-env">env</a>, <a href="#run_binary-outs">outs</a>, <a href="#run_binary-srcs">srcs</a>, <a href="#run_binary-tool">tool</a>)
|
run_binary(<a href="#run_binary-name">name</a>, <a href="#run_binary-args">args</a>, <a href="#run_binary-env">env</a>, <a href="#run_binary-outs">outs</a>, <a href="#run_binary-srcs">srcs</a>, <a href="#run_binary-tool">tool</a>)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Runs a binary as a build action.<br/><br/>This rule does not require Bash (unlike <code>native.genrule</code>).
|
Runs a binary as a build action.
|
||||||
|
|
||||||
|
This rule does not require Bash (unlike `native.genrule`).
|
||||||
|
|
||||||
**ATTRIBUTES**
|
**ATTRIBUTES**
|
||||||
|
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
| <a id="run_binary-args"></a>args | Command line arguments of the binary.<br/><br/>Subject to<code><a href="https://bazel.build/reference/be/make-variables#predefined_label_variables">$(location)</a></code> expansion. | List of strings | optional | [] |
|
| <a id="run_binary-args"></a>args | Command line arguments of the binary.<br><br>Subject to [<code>$(location)</code>](https://bazel.build/reference/be/make-variables#predefined_label_variables) expansion. | List of strings | optional | <code>[]</code> |
|
||||||
| <a id="run_binary-env"></a>env | Environment variables of the action.<br/><br/>Subject to <code><a href="https://bazel.build/reference/be/make-variables#predefined_label_variables">$(location)</a></code> expansion. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
|
| <a id="run_binary-env"></a>env | Environment variables of the action.<br><br>Subject to [<code>$(location)</code>](https://bazel.build/reference/be/make-variables#predefined_label_variables) expansion. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
|
||||||
| <a id="run_binary-outs"></a>outs | 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>. | List of labels | required | |
|
| <a id="run_binary-outs"></a>outs | 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>. | List of labels | required | |
|
||||||
| <a id="run_binary-srcs"></a>srcs | Additional inputs of the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
| <a id="run_binary-srcs"></a>srcs | Additional inputs of the action.<br><br>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
|
||||||
| <a id="run_binary-tool"></a>tool | 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>. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="run_binary-tool"></a>tool | 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>. | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ Selects a single file from the outputs of a target by given relative path
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| Name | Description | Type | Mandatory | Default |
|
||||||
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
||||||
| <a id="select_file-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
|
| <a id="select_file-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
|
||||||
| <a id="select_file-srcs"></a>srcs | The target producing the file among other outputs | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
| <a id="select_file-srcs"></a>srcs | The target producing the file among other outputs | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
|
||||||
| <a id="select_file-subpath"></a>subpath | Relative path to the file | String | required | |
|
| <a id="select_file-subpath"></a>subpath | Relative path to the file | String | required | |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ unittest_toolchain(<a href="#unittest_toolchain-name">name</a>, <a href="#unitte
|
||||||
|
|
||||||
| Name | Description | Type | Mandatory | Default |
|
| 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-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">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>{"%": "%", ">": "^"}</code> would replace <code>%</code> with <code>%%</code> and <code>></code> with <code>^></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_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>{"%": "%", ">": "^"}</code> would replace <code>%</code> with <code>%%</code> and <code>></code> with <code>^></code> in the failure message before that is included in <code>success_templ</code>. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
|
||||||
| <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-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 | <code>""</code> |
|
||||||
| <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-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-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-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 | |
|
||||||
|
|
|
@ -24,7 +24,7 @@ versions.parse(<a href="#versions.parse-bazel_version">bazel_version</a>)
|
||||||
|
|
||||||
Parses a version string into a 3-tuple of ints
|
Parses a version string into a 3-tuple of ints
|
||||||
|
|
||||||
int tuples can be compared directly using binary operators (<, >).
|
int tuples can be compared directly using binary operators (<, >).
|
||||||
|
|
||||||
|
|
||||||
**PARAMETERS**
|
**PARAMETERS**
|
||||||
|
@ -79,7 +79,7 @@ Check that a version is lower or equals to a threshold.
|
||||||
|
|
||||||
**RETURNS**
|
**RETURNS**
|
||||||
|
|
||||||
True if version <= threshold.
|
True if version <= threshold.
|
||||||
|
|
||||||
|
|
||||||
<a id="versions.is_at_least"></a>
|
<a id="versions.is_at_least"></a>
|
||||||
|
@ -102,6 +102,6 @@ Check that a version is higher or equals to a threshold.
|
||||||
|
|
||||||
**RETURNS**
|
**RETURNS**
|
||||||
|
|
||||||
True if version >= threshold.
|
True if version >= threshold.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,6 @@ Creates a UTF-8 encoded text file.
|
||||||
| <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-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-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-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. <code>visibility</code> | none |
|
| <a id="write_file-kwargs"></a>kwargs | further keyword arguments, e.g. <code>visibility</code> | none |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ def build_test(name, targets, **kwargs):
|
||||||
Args:
|
Args:
|
||||||
name: The name of the test rule.
|
name: The name of the test rule.
|
||||||
targets: A list of targets to ensure build.
|
targets: A list of targets to ensure build.
|
||||||
**kwargs: The <a href="https://bazel.build/reference/be/common-definitions#common-attributes-tests">common attributes for tests</a>.
|
**kwargs: The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests).
|
||||||
"""
|
"""
|
||||||
if len(targets) == 0:
|
if len(targets) == 0:
|
||||||
fail("targets must be non-empty", "targets")
|
fail("targets must be non-empty", "targets")
|
||||||
|
|
|
@ -161,10 +161,10 @@ def diff_test(name, file1, file2, failure_message = None, **kwargs):
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
name: The name of the test rule.
|
name: The name of the test rule.
|
||||||
file1: Label of the file to compare to <code>file2</code>.
|
file1: Label of the file to compare to `file2`.
|
||||||
file2: Label of the file to compare to <code>file1</code>.
|
file2: Label of the file to compare to `file1`.
|
||||||
failure_message: Additional message to log if the files' contents do not match.
|
failure_message: Additional message to log if the files' contents do not match.
|
||||||
**kwargs: The <a href="https://bazel.build/reference/be/common-definitions#common-attributes-tests">common attributes for tests</a>.
|
**kwargs: The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests).
|
||||||
"""
|
"""
|
||||||
_diff_test(
|
_diff_test(
|
||||||
name = name,
|
name = name,
|
||||||
|
|
|
@ -88,7 +88,7 @@ def write_file(
|
||||||
sources.
|
sources.
|
||||||
newline: one of ["auto", "unix", "windows"]: line endings to use. "auto"
|
newline: one of ["auto", "unix", "windows"]: line endings to use. "auto"
|
||||||
for platform-determined, "unix" for LF, and "windows" for CRLF.
|
for platform-determined, "unix" for LF, and "windows" for CRLF.
|
||||||
**kwargs: further keyword arguments, e.g. <code>visibility</code>
|
**kwargs: further keyword arguments, e.g. `visibility`
|
||||||
"""
|
"""
|
||||||
if is_executable:
|
if is_executable:
|
||||||
_write_xfile(
|
_write_xfile(
|
||||||
|
|
|
@ -60,38 +60,38 @@ def _impl(ctx):
|
||||||
|
|
||||||
run_binary = rule(
|
run_binary = rule(
|
||||||
implementation = _impl,
|
implementation = _impl,
|
||||||
doc = "Runs a binary as a build action.<br/><br/>This rule does not require Bash (unlike" +
|
doc = "Runs a binary as a build action.\n\nThis rule does not require Bash (unlike" +
|
||||||
" <code>native.genrule</code>).",
|
" `native.genrule`).",
|
||||||
attrs = {
|
attrs = {
|
||||||
"tool": attr.label(
|
"tool": attr.label(
|
||||||
doc = "The tool to run in the action.<br/><br/>Must be the label of a *_binary rule," +
|
doc = "The tool to run in the action.\n\nMust be the label of a *_binary rule," +
|
||||||
" of a rule that generates an executable file, or of a file that can be" +
|
" 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" +
|
" 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" +
|
" with executable permission on Linux). This label is available for" +
|
||||||
" <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.",
|
" `$(location)` expansion in `args` and `env`.",
|
||||||
executable = True,
|
executable = True,
|
||||||
allow_files = True,
|
allow_files = True,
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
cfg = "exec",
|
cfg = "exec",
|
||||||
),
|
),
|
||||||
"env": attr.string_dict(
|
"env": attr.string_dict(
|
||||||
doc = "Environment variables of the action.<br/><br/>Subject to " +
|
doc = "Environment variables of the action.\n\nSubject to " +
|
||||||
" <code><a href=\"https://bazel.build/reference/be/make-variables#predefined_label_variables\">$(location)</a></code>" +
|
" [`$(location)`](https://bazel.build/reference/be/make-variables#predefined_label_variables)" +
|
||||||
" expansion.",
|
" expansion.",
|
||||||
),
|
),
|
||||||
"srcs": attr.label_list(
|
"srcs": attr.label_list(
|
||||||
allow_files = True,
|
allow_files = True,
|
||||||
doc = "Additional inputs of the action.<br/><br/>These labels are available for" +
|
doc = "Additional inputs of the action.\n\nThese labels are available for" +
|
||||||
" <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.",
|
" `$(location)` expansion in `args` and `env`.",
|
||||||
),
|
),
|
||||||
"outs": attr.output_list(
|
"outs": attr.output_list(
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
doc = "Output files generated by the action.<br/><br/>These labels are available for" +
|
doc = "Output files generated by the action.\n\nThese labels are available for" +
|
||||||
" <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.",
|
" `$(location)` expansion in `args` and `env`.",
|
||||||
),
|
),
|
||||||
"args": attr.string_list(
|
"args": attr.string_list(
|
||||||
doc = "Command line arguments of the binary.<br/><br/>Subject to" +
|
doc = "Command line arguments of the binary.\n\nSubject to" +
|
||||||
"<code><a href=\"https://bazel.build/reference/be/make-variables#predefined_label_variables\">$(location)</a></code>" +
|
" [`$(location)`](https://bazel.build/reference/be/make-variables#predefined_label_variables)" +
|
||||||
" expansion.",
|
" expansion.",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue