-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update visibility section on macro page
This is a rewrite to present the most relevant information, while eliding some technical detail. In particular, it reduces mention of visibility delegation to an afterthought, and focuses instead on the key insight and a single demonstrative example. A subsequent CL will update visibility.md itself with appropriate details. Work toward #23857. PiperOrigin-RevId: 700736327 Change-Id: I543b57746e00bd9e62adb2b6d50ea25abc6e756f
- Loading branch information
Showing
3 changed files
with
127 additions
and
52 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
21 changes: 15 additions & 6 deletions
21
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/visibility.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,20 @@ | ||
<p>List of <a href="${link build-ref#labels}">labels</a>; | ||
<a href="#configurable-attributes">nonconfigurable</a>; | ||
default is <code><a href="${link package.default_visibility}">default_visibility</a></code> from | ||
<a href="${link package}">package</a> if specified, or <code>"//visibility:private"</code> | ||
otherwise</p> | ||
default varies | ||
</p> | ||
|
||
<p> | ||
The <code>visibility</code> attribute controls whether the target can be | ||
depended on by targets in other locations. See the documentation for | ||
<a href="${link visibility}">visibility</a>. | ||
</p> | ||
|
||
<p> | ||
The <code>visibility</code> attribute on a target controls whether the target | ||
can be used in other packages. See the documentation for | ||
<a href="${link visibility}">visibility</a>. | ||
For targets declared directly in a BUILD file or in legacy macros called from | ||
a BUILD file, the default value is the package's | ||
<code><a href="${link package.default_visibility}">default_visibility</a></code> | ||
if specified, or else <code>["//visibility:private"]</code>. For targets | ||
declared in one or more symbolic macros, the default value is always just | ||
<code>["//visibility:private"]</code> (which makes it useable only within the | ||
package containing the macro's code). | ||
</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