Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions docs/metadata/defs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ Provider for declaring metadata about a Bazel package.
| <a id="PackageAttributeInfo-files"></a>files | A [depset](https://bazel.build/rules/lib/builtins/depset) of [File](https://bazel.build/rules/lib/builtins/File)s containing information about this attribute. | `[]` |


<a id="PackageAttributeOverrideInfo"></a>

## PackageAttributeOverrideInfo

<pre>
load("@package_metadata//:defs.bzl", "PackageAttributeOverrideInfo")

PackageAttributeOverrideInfo(<a href="#PackageAttributeOverrideInfo-package">package</a>, <a href="#PackageAttributeOverrideInfo-overrides">overrides</a>)
</pre>

Provider for declaring overrides for attributes of `package_metadata` targets.

**FIELDS**

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="PackageAttributeOverrideInfo-package"></a>package | The [Label](https://bazel.build/rules/lib/builtins/Label) of the `package_metadata` target to override attributes of. | none |
| <a id="PackageAttributeOverrideInfo-overrides"></a>overrides | <p align="center"> - </p> | `[]` |


<a id="PackageMetadataInfo"></a>

## PackageMetadataInfo
Expand All @@ -43,6 +63,23 @@ Provider for declaring metadata about a Bazel package.
| <a id="PackageMetadataInfo-files"></a>files | A [depset](https://bazel.build/rules/lib/builtins/depset) of [File](https://bazel.build/rules/lib/builtins/File)s with metadata about the package, including transitive files from all attributes of the package. | `[]` |


<a id="PackageMetadataToolchainInfo"></a>

## PackageMetadataToolchainInfo

<pre>
load("@package_metadata//:defs.bzl", "PackageMetadataToolchainInfo")

PackageMetadataToolchainInfo(<a href="#PackageMetadataToolchainInfo-overrides">overrides</a>)
</pre>

**FIELDS**

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="PackageMetadataToolchainInfo-overrides"></a>overrides | <p align="center"> - </p> | `[]` |


<a id="package_metadata"></a>

## package_metadata
Expand All @@ -66,3 +103,62 @@ package_metadata(*, <a href="#package_metadata-name">name</a>, <a href="#package
| <a id="package_metadata-visibility"></a>visibility | <p align="center"> - </p> | `None` |


<a id="package_metadata_toolchain"></a>

## package_metadata_toolchain

<pre>
load("@package_metadata//:defs.bzl", "package_metadata_toolchain")

package_metadata_toolchain(*, <a href="#package_metadata_toolchain-name">name</a>, <a href="#package_metadata_toolchain-overrides">overrides</a>, <a href="#package_metadata_toolchain-visibility">visibility</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="package_metadata_toolchain-name"></a>name | <p align="center"> - </p> | none |
| <a id="package_metadata_toolchain-overrides"></a>overrides | <p align="center"> - </p> | `[]` |
| <a id="package_metadata_toolchain-visibility"></a>visibility | <p align="center"> - </p> | `None` |


<a id="package_attribute_override"></a>

## package_attribute_override

<pre>
load("@package_metadata//:defs.bzl", "package_attribute_override")

package_attribute_override(*, <a href="#package_attribute_override-name">name</a>, <a href="#package_attribute_override-compatible_with">compatible_with</a>, <a href="#package_attribute_override-deprecation">deprecation</a>, <a href="#package_attribute_override-exec_compatible_with">exec_compatible_with</a>,
<a href="#package_attribute_override-exec_properties">exec_properties</a>, <a href="#package_attribute_override-features">features</a>, <a href="#package_attribute_override-overrides">overrides</a>, <a href="#package_attribute_override-package">package</a>, <a href="#package_attribute_override-package_metadata">package_metadata</a>,
<a href="#package_attribute_override-restricted_to">restricted_to</a>, <a href="#package_attribute_override-tags">tags</a>, <a href="#package_attribute_override-target_compatible_with">target_compatible_with</a>, <a href="#package_attribute_override-testonly">testonly</a>, <a href="#package_attribute_override-toolchains">toolchains</a>,
<a href="#package_attribute_override-visibility">visibility</a>)
</pre>



**ATTRIBUTES**


| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="package_attribute_override-name"></a>name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="package_attribute_override-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
| <a id="package_attribute_override-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
| <a id="package_attribute_override-overrides"></a>overrides | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-package"></a>package | The label of the package these overrides are for. | <a href="https://bazel.build/concepts/labels">Label</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | required | |
| <a id="package_attribute_override-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-restricted_to"></a>restricted_to | <a href="https://bazel.build/reference/be/common-definitions#common.restricted_to">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-tags"></a>tags | <a href="https://bazel.build/reference/be/common-definitions#common.tags">Inherited rule attribute</a> | List of strings; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-target_compatible_with"></a>target_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.target_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-testonly"></a>testonly | <a href="https://bazel.build/reference/be/common-definitions#common.testonly">Inherited rule attribute</a> | Boolean; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-toolchains"></a>toolchains | <a href="https://bazel.build/reference/be/common-definitions#common.toolchains">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-visibility"></a>visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | |


30 changes: 30 additions & 0 deletions docs/metadata/providers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ diff_test(
file2 = "package_attribute_info.md",
)

stardoc(
name = "package_attribute_override_info",
out = "package_attribute_override_info.generated.md",
input = "@package_metadata//providers:package_attribute_override_info.bzl",
deps = [
"@package_metadata//providers:srcs",
],
)

diff_test(
name = "package_attribute_override_info_test",
file1 = ":package_attribute_override_info",
file2 = "package_attribute_override_info.md",
)

stardoc(
name = "package_metadata_info",
out = "package_metadata_info.generated.md",
Expand All @@ -30,3 +45,18 @@ diff_test(
file1 = ":package_metadata_info",
file2 = "package_metadata_info.md",
)

stardoc(
name = "package_metadata_toolchain_info",
out = "package_metadata_toolchain_info.generated.md",
input = "@package_metadata//providers:package_metadata_toolchain_info.bzl",
deps = [
"@package_metadata//providers:srcs",
],
)

diff_test(
name = "package_metadata_toolchain_info_test",
file1 = ":package_metadata_toolchain_info",
file2 = "package_metadata_toolchain_info.md",
)
24 changes: 24 additions & 0 deletions docs/metadata/providers/package_attribute_override_info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->

Declares provider `PackageAttributeOverrideInfo`.

<a id="PackageAttributeOverrideInfo"></a>

## PackageAttributeOverrideInfo

<pre>
load("@package_metadata//providers:package_attribute_override_info.bzl", "PackageAttributeOverrideInfo")

PackageAttributeOverrideInfo(<a href="#PackageAttributeOverrideInfo-package">package</a>, <a href="#PackageAttributeOverrideInfo-overrides">overrides</a>)
</pre>

Provider for declaring overrides for attributes of `package_metadata` targets.

**FIELDS**

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="PackageAttributeOverrideInfo-package"></a>package | The [Label](https://bazel.build/rules/lib/builtins/Label) of the `package_metadata` target to override attributes of. | none |
| <a id="PackageAttributeOverrideInfo-overrides"></a>overrides | <p align="center"> - </p> | `[]` |


21 changes: 21 additions & 0 deletions docs/metadata/providers/package_metadata_toolchain_info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->

Declares provider `PackageMetadataToolchainInfo`.

<a id="PackageMetadataToolchainInfo"></a>

## PackageMetadataToolchainInfo

<pre>
load("@package_metadata//providers:package_metadata_toolchain_info.bzl", "PackageMetadataToolchainInfo")

PackageMetadataToolchainInfo(<a href="#PackageMetadataToolchainInfo-overrides">overrides</a>)
</pre>

**FIELDS**

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="PackageMetadataToolchainInfo-overrides"></a>overrides | <p align="center"> - </p> | `[]` |


30 changes: 30 additions & 0 deletions docs/metadata/rules/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@stardoc//stardoc:stardoc.bzl", "stardoc")

stardoc(
name = "package_attribute_override",
out = "package_attribute_override.generated.md",
input = "@package_metadata//rules:package_attribute_override.bzl",
deps = [
"@package_metadata//rules:srcs",
],
)

diff_test(
name = "package_attribute_override_test",
file1 = ":package_attribute_override",
file2 = "package_attribute_override.md",
)

stardoc(
name = "package_metadata_toolchain",
out = "package_metadata_toolchain.generated.md",
input = "@package_metadata//rules:package_metadata_toolchain.bzl",
deps = [
"@package_metadata//rules:srcs",
],
)

diff_test(
name = "package_metadata_toolchain_test",
file1 = ":package_metadata_toolchain",
file2 = "package_metadata_toolchain.md",
)

stardoc(
name = "package_metadata",
out = "package_metadata.generated.md",
Expand Down
41 changes: 41 additions & 0 deletions docs/metadata/rules/package_attribute_override.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->

Declares rule `package_attribute_override`.

<a id="package_attribute_override"></a>

## package_attribute_override

<pre>
load("@package_metadata//rules:package_attribute_override.bzl", "package_attribute_override")

package_attribute_override(*, <a href="#package_attribute_override-name">name</a>, <a href="#package_attribute_override-compatible_with">compatible_with</a>, <a href="#package_attribute_override-deprecation">deprecation</a>, <a href="#package_attribute_override-exec_compatible_with">exec_compatible_with</a>,
<a href="#package_attribute_override-exec_properties">exec_properties</a>, <a href="#package_attribute_override-features">features</a>, <a href="#package_attribute_override-overrides">overrides</a>, <a href="#package_attribute_override-package">package</a>, <a href="#package_attribute_override-package_metadata">package_metadata</a>,
<a href="#package_attribute_override-restricted_to">restricted_to</a>, <a href="#package_attribute_override-tags">tags</a>, <a href="#package_attribute_override-target_compatible_with">target_compatible_with</a>, <a href="#package_attribute_override-testonly">testonly</a>, <a href="#package_attribute_override-toolchains">toolchains</a>,
<a href="#package_attribute_override-visibility">visibility</a>)
</pre>



**ATTRIBUTES**


| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="package_attribute_override-name"></a>name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="package_attribute_override-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
| <a id="package_attribute_override-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
| <a id="package_attribute_override-overrides"></a>overrides | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-package"></a>package | The label of the package these overrides are for. | <a href="https://bazel.build/concepts/labels">Label</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | required | |
| <a id="package_attribute_override-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-restricted_to"></a>restricted_to | <a href="https://bazel.build/reference/be/common-definitions#common.restricted_to">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-tags"></a>tags | <a href="https://bazel.build/reference/be/common-definitions#common.tags">Inherited rule attribute</a> | List of strings; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-target_compatible_with"></a>target_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.target_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-testonly"></a>testonly | <a href="https://bazel.build/reference/be/common-definitions#common.testonly">Inherited rule attribute</a> | Boolean; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="package_attribute_override-toolchains"></a>toolchains | <a href="https://bazel.build/reference/be/common-definitions#common.toolchains">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
| <a id="package_attribute_override-visibility"></a>visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | |


Loading
Loading