diff options
Diffstat (limited to 'docs/selects_doc.md')
-rwxr-xr-x | docs/selects_doc.md | 141 |
1 files changed, 46 insertions, 95 deletions
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> | |