forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates a separate section for attributes which are added to most build rules, but not implicitly added to Starlark rules. deps, data, and licenses are moved to that section. srcs is also added to the new section, since I think that's as notable a naming convention to highlight as "deps" and "data". The section on "deps" is updated to note: * That "deps" generally should contain only specific rules and not files * How "deps" generally varies between language specific rules * The general relationship between "srcs" and "deps". Also, a bit that says "deps" are always included in runfiles is removed. That's not even usually true. Though it may be true in some cases that source code is needed at runtime and therefore should be included in runfiles (this could be the case for build rules for some interpreted languages, for example), often source code is not needed at runtime and shouldn't be included in runfiles. The section on "data" is updated to note: * That generally "data" permits arbitrary dependencies * That default outputs and runfiles from targets in data should be included in the runfiles of consumers * The general relationship between "data" and "srcs" * What Starlark rules need to do to handle data in their implementation functions The remainder of the section is updated to: * Consistently use "target" instead of "rule" to refer to rule targets. "Rule target" is unnecessary, file targets don't have attributes * Use a consistent format the type of the attribute * Consistently omit that optional list or dictionary attributes default to empty lists or dictionaries * Use False instead of 0 for the default values of attributes whose type is "boolean" And did a bit of copyediting. A line from the introduction to the "common attributes" section that mentions it's an error to list the same label twice in a label-list attribute is pruned. That's true, but it seems misplaced here, it's not very related to the rest of this section. "applicable_licenses" and "transitive_configs" are not yet documented. RELNOTES: None. PiperOrigin-RevId: 351577116
- Loading branch information
1 parent
082d987
commit dac0d40
Showing
32 changed files
with
179 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...in/java/com/google/devtools/build/docgen/templates/attributes/common/compatible_with.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional; <a href="#configurable-attributes">nonconfigurable</a></code></p> | ||
<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional; | ||
<a href="#configurable-attributes">nonconfigurable</a></code></p> | ||
|
||
<p> | ||
The list of environments this rule can be built for, in addition to | ||
The list of environments this target can be built for, in addition to | ||
default-supported environments. | ||
</p> | ||
|
||
<p> | ||
This is part of Bazel's soft-launched constraint system, which lets users | ||
declare which rules can and cannot depend on each other. For example, | ||
externally deployable binaries shouldn't depend on libraries with | ||
company-secret code. See | ||
This is part of Bazel's constraint system, which lets users declare which | ||
targets can and cannot depend on each other. For example, externally deployable | ||
binaries shouldn't depend on libraries with company-secret code. See | ||
<a href="https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/constraints/ConstraintSemantics.java#L46"> | ||
ConstraintSemantics</a> for details. | ||
</p> |
20 changes: 0 additions & 20 deletions
20
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/data.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/deps.html
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/distribs.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
...va/com/google/devtools/build/docgen/templates/attributes/common/exec_compatible_with.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional; <a href="#configurable-attributes">nonconfigurable</a></code></p> | ||
<p> | ||
<code>List of <a href="../build-ref.html#labels">labels</a>; optional; | ||
<a href="#configurable-attributes">nonconfigurable</a></code> | ||
</p> | ||
|
||
<p> | ||
A list of | ||
<code><a href="platform.html#constraint_value">constraint_values</a></code> | ||
that must be present in the execution platform for this target. This is in | ||
addition to any constraints already set by the rule type. Constraints are used | ||
to restrict the list of available execution platforms, see the description of | ||
<a href="../toolchains.html#toolchain-resolution">toolchain resolution</a> | ||
for details. | ||
</p> | ||
to restrict the list of available execution platforms. For more details, see | ||
the description of | ||
<a href="../toolchains.html#toolchain-resolution">toolchain resolution</a>. | ||
</p> |
2 changes: 1 addition & 1 deletion
2
...in/java/com/google/devtools/build/docgen/templates/attributes/common/exec_properties.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/features.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...main/java/com/google/devtools/build/docgen/templates/attributes/common/restricted_to.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional; <a href="#configurable-attributes">nonconfigurable</a></code></p> | ||
<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional; | ||
<a href="#configurable-attributes">nonconfigurable</a></code></p> | ||
|
||
<p> | ||
The list of environments this rule can be built for, <i>instead</i> of | ||
The list of environments this target can be built for, <i>instead</i> of | ||
default-supported environments. | ||
</p> | ||
|
||
<p> | ||
This is part of Bazel's soft-launched constraint system. See | ||
This is part of Bazel's constraint system. See | ||
<code><a href="#common.compatible_with">compatible_with</a></code> | ||
for details. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
.../com/google/devtools/build/docgen/templates/attributes/common/target_compatible_with.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/testonly.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.