mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-30 10:41:18 +00:00
Get started on docs
This commit is contained in:
parent
63d9712b75
commit
e202c2b484
|
@ -43,6 +43,7 @@ s = shell.quote(p)
|
|||
## List of modules (in lib/)
|
||||
|
||||
* [collections](docs/collections_doc.md)
|
||||
* [compatibility](docs/compatibility_doc.md)
|
||||
* [dicts](docs/dicts_doc.md)
|
||||
* [partial](docs/partial_doc.md)
|
||||
* [paths](docs/paths_doc.md)
|
||||
|
|
|
@ -22,6 +22,11 @@ stardoc_with_diff_test(
|
|||
out_label = "//docs:common_settings_doc.md",
|
||||
)
|
||||
|
||||
stardoc_with_diff_test(
|
||||
bzl_library_target = "//lib:compatibility",
|
||||
out_label = "//docs:compatibility_doc.md",
|
||||
)
|
||||
|
||||
stardoc_with_diff_test(
|
||||
bzl_library_target = "//rules:copy_directory",
|
||||
out_label = "//docs:copy_directory_doc.md",
|
||||
|
|
84
docs/compatibility_doc.md
Normal file
84
docs/compatibility_doc.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
||||
|
||||
Skylib module of convenience functions for `target_compatible_with`.
|
||||
|
||||
<a id="#compatibility.all_of"></a>
|
||||
|
||||
## compatibility.all_of
|
||||
|
||||
<pre>
|
||||
compatibility.all_of(<a href="#compatibility.all_of-settings">settings</a>)
|
||||
</pre>
|
||||
|
||||
Create a `select()` which matches all of the given config_settings.
|
||||
|
||||
All of the settings must be true to get an empty list. Failure to match will result
|
||||
in an incompatible constraint_value for the purpose of target skipping.
|
||||
|
||||
See also: `selects.config_setting_group(match_all)`
|
||||
|
||||
|
||||
**PARAMETERS**
|
||||
|
||||
|
||||
| Name | Description | Default Value |
|
||||
| :------------- | :------------- | :------------- |
|
||||
| <a id="compatibility.all_of-settings"></a>settings | A list of <code>config_settings</code>. | none |
|
||||
|
||||
**RETURNS**
|
||||
|
||||
A native `select()` which is "incompatible" unless all `config_settings` are true.
|
||||
|
||||
|
||||
<a id="#compatibility.any_of"></a>
|
||||
|
||||
## compatibility.any_of
|
||||
|
||||
<pre>
|
||||
compatibility.any_of(<a href="#compatibility.any_of-settings">settings</a>)
|
||||
</pre>
|
||||
|
||||
Create a `select()` which matches any of the given config_settings.
|
||||
|
||||
Any of the settings will resolve to an empty list, while the default condition will map to
|
||||
an incompatible constraint_value for the purpose of target skipping.
|
||||
|
||||
|
||||
**PARAMETERS**
|
||||
|
||||
|
||||
| Name | Description | Default Value |
|
||||
| :------------- | :------------- | :------------- |
|
||||
| <a id="compatibility.any_of-settings"></a>settings | A list of <code>config_settings</code>. | none |
|
||||
|
||||
**RETURNS**
|
||||
|
||||
A native `select()` which maps any of the settings an empty list.
|
||||
|
||||
|
||||
<a id="#compatibility.none_of"></a>
|
||||
|
||||
## compatibility.none_of
|
||||
|
||||
<pre>
|
||||
compatibility.none_of(<a href="#compatibility.none_of-settings">settings</a>)
|
||||
</pre>
|
||||
|
||||
Create a `select()` which matches none of the given config_settings.
|
||||
|
||||
Any of the settings will resolve to an incompatible constraint_value for the
|
||||
purpose of target skipping.
|
||||
|
||||
|
||||
**PARAMETERS**
|
||||
|
||||
|
||||
| Name | Description | Default Value |
|
||||
| :------------- | :------------- | :------------- |
|
||||
| <a id="compatibility.none_of-settings"></a>settings | A list of <code>config_settings</code>. | none |
|
||||
|
||||
**RETURNS**
|
||||
|
||||
A native `select()` which maps any of the settings to the incompatible target.
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ def _maybe_make_unique_incompatible_value(name):
|
|||
)
|
||||
|
||||
def _none_of(settings):
|
||||
"""Create a `select()` which matches none of the given config_settings.
|
||||
"""Create a `select()` which matches none of the given settings.
|
||||
|
||||
Any of the settings will resolve to an incompatible constraint_value for the
|
||||
purpose of target skipping.
|
||||
|
|
Loading…
Reference in a new issue