2021-11-09 23:13:30 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
|
|
|
Public API
|
|
|
|
|
2022-07-14 04:04:58 +00:00
|
|
|
<a id="file_exists"></a>
|
|
|
|
|
|
|
|
## file_exists
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
file_exists(<a href="#file_exists-path">path</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Check whether a file exists.
|
|
|
|
|
|
|
|
Useful in macros to set defaults for a configuration file if it is present.
|
|
|
|
This can only be called during the loading phase, not from a rule implementation.
|
|
|
|
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="file_exists-path"></a>path | a label, or a string which is a path relative to this package | none |
|
|
|
|
|
|
|
|
|
2022-06-10 20:05:19 +00:00
|
|
|
<a id="glob_directories"></a>
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
## glob_directories
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
glob_directories(<a href="#glob_directories-include">include</a>, <a href="#glob_directories-kwargs">kwargs</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="glob_directories-include"></a>include | <p align="center"> - </p> | none |
|
|
|
|
| <a id="glob_directories-kwargs"></a>kwargs | <p align="center"> - </p> | none |
|
|
|
|
|
|
|
|
|
2022-06-10 20:05:19 +00:00
|
|
|
<a id="is_external_label"></a>
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
## is_external_label
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
is_external_label(<a href="#is_external_label-param">param</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns True if the given Label (or stringy version of a label) represents a target outside of the workspace
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="is_external_label-param"></a>param | a string or label | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
a bool
|
|
|
|
|
|
|
|
|
2022-06-10 20:05:19 +00:00
|
|
|
<a id="path_to_workspace_root"></a>
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
## path_to_workspace_root
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
path_to_workspace_root()
|
|
|
|
</pre>
|
|
|
|
|
2022-07-14 04:04:58 +00:00
|
|
|
Returns the path to the workspace root under bazel
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
Path to the workspace root
|
|
|
|
|
|
|
|
|
2022-06-10 20:05:19 +00:00
|
|
|
<a id="propagate_well_known_tags"></a>
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
## propagate_well_known_tags
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
propagate_well_known_tags(<a href="#propagate_well_known_tags-tags">tags</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Returns a list of tags filtered from the input set that only contains the ones that are considered "well known"
|
|
|
|
|
|
|
|
These are listed in Bazel's documentation:
|
|
|
|
https://docs.bazel.build/versions/main/test-encyclopedia.html#tag-conventions
|
|
|
|
https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes
|
|
|
|
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="propagate_well_known_tags-tags"></a>tags | List of tags to filter | <code>[]</code> |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
List of tags that only contains the well known set
|
|
|
|
|
|
|
|
|
2022-06-10 20:05:19 +00:00
|
|
|
<a id="to_label"></a>
|
2021-11-09 23:13:30 +00:00
|
|
|
|
|
|
|
## to_label
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
to_label(<a href="#to_label-param">param</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Converts a string to a Label. If Label is supplied, the same label is returned.
|
|
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="to_label-param"></a>param | a string representing a label or a Label | none |
|
|
|
|
|
|
|
|
**RETURNS**
|
|
|
|
|
|
|
|
a Label
|
|
|
|
|
|
|
|
|