Skip to content

Commit d9beda5

Browse files
fmeumcopybara-github
authored andcommitted
Explain the use of str(Label(...)) in the docs
Closes #19509. PiperOrigin-RevId: 565763282 Change-Id: I0a8ede20b6bda5140a83c03a44577c034a54dd5f
1 parent 184796d commit d9beda5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • src/main/java/com/google/devtools/build/lib/cmdline

src/main/java/com/google/devtools/build/lib/cmdline/Label.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@
5555
*
5656
* <p>Parsing is robust against bad input, for example, from the command line.
5757
*/
58-
@StarlarkBuiltin(name = "Label", category = DocCategory.BUILTIN, doc = "A BUILD target identifier.")
58+
@StarlarkBuiltin(
59+
name = "Label",
60+
category = DocCategory.BUILTIN,
61+
doc =
62+
"A BUILD target identifier."
63+
+ "<p>For every <code>Label<code> instance <code>l</code>, the string representation"
64+
+ " <code>str(l)</code> has the property that <code>Label(str(l)) == l</code>,"
65+
+ " regardless of where the <code>Label()</code> call occurs.")
5966
@AutoCodec
6067
@Immutable
6168
@ThreadSafe

0 commit comments

Comments
 (0)