From a2ee2e051cfb9ef69eb62e967ac7bcab8c89b820 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 15 Sep 2023 13:26:11 -0700 Subject: [PATCH] Explain the use of `str(Label(...))` in the docs Closes #19509. PiperOrigin-RevId: 565763282 Change-Id: I0a8ede20b6bda5140a83c03a44577c034a54dd5f --- .../com/google/devtools/build/lib/cmdline/Label.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java index 7ff3ef9d36e0eb..e2b136c9676c23 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java +++ b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java @@ -53,7 +53,14 @@ * *

Parsing is robust against bad input, for example, from the command line. */ -@StarlarkBuiltin(name = "Label", category = DocCategory.BUILTIN, doc = "A BUILD target identifier.") +@StarlarkBuiltin( + name = "Label", + category = DocCategory.BUILTIN, + doc = + "A BUILD target identifier." + + "

For every Label instance l, the string representation" + + " str(l) has the property that Label(str(l)) == l," + + " regardless of where the Label() call occurs.") @AutoCodec @Immutable @ThreadSafe