aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Rodrigo Queiro <rodrigoq@google.com>2017-12-05 01:10:53 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-05 01:12:56 -0800
commit07b9c6fe2968726b5986f7f8711868dac87cb3a7 (patch)
tree748005531e1b7b02fdcefec179b7c7c0659b6433
parent9ac1f287eab0ce2fa0e3c685cd218832091f19e9 (diff)
Fix docs for repository_name
Fixes #3573 Closes #3574. PiperOrigin-RevId: 177925152
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Runtime.java21
2 files changed, 16 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
index c3e7a6c4a5..a400782c05 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
@@ -229,8 +229,9 @@ public class SkylarkNativeModule {
"The name of the repository the rule or build extension is called from. "
+ "For example, in packages that are called into existence by the WORKSPACE stanza "
+ "<code>local_repository(name='local', path=...)</code> it will be set to "
- + "<code>@local</code>. In packages in the main repository, it will be empty. This "
- + "function is equivalent to the deprecated variable <code>REPOSITORY_NAME</code>.",
+ + "<code>@local</code>. In packages in the main repository, it will be set to "
+ + "<code>@</code>. This function is equivalent to the deprecated variable "
+ + "<code>REPOSITORY_NAME</code>.",
parameters = {},
useAst = true,
useEnvironment = true
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java b/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
index d73194cbeb..72b93e2394 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
@@ -117,14 +117,19 @@ public final class Runtime {
+ "the rule comes from. ")
public static final String PKG_NAME = "PACKAGE_NAME";
- @SkylarkSignature(name = "REPOSITORY_NAME", returnType = String.class,
- doc = "<b>Deprecated. Use <a href=\"native.html#repository_name\">repository_name()</a> "
- + "instead.</b> The name of the repository the rule or build extension is called from. "
- + "For example, in packages that are called into existence by the WORKSPACE stanza "
- + "<code>local_repository(name='local', path=...)</code> it will be set to "
- + "<code>@local</code>. In packages in the main repository, it will be empty. "
- + "It can only be accessed in functions (transitively) called from BUILD files, i.e. "
- + "it follows the same restrictions as <a href=\"#PACKAGE_NAME\">PACKAGE_NAME</a>")
+ @SkylarkSignature(
+ name = "REPOSITORY_NAME",
+ returnType = String.class,
+ doc =
+ "<b>Deprecated. Use <a href=\"native.html#repository_name\">repository_name()</a> "
+ + "instead.</b> The name of the repository the rule or build extension is called from. "
+ + "For example, in packages that are called into existence by the WORKSPACE stanza "
+ + "<code>local_repository(name='local', path=...)</code> it will be set to "
+ + "<code>@local</code>. In packages in the main repository, it will be set to "
+ + "<code>@</code>. It can only be accessed in functions (transitively) called from "
+ + "BUILD files, i.e. it follows the same restrictions as "
+ + "<a href=\"#PACKAGE_NAME\">PACKAGE_NAME</a>"
+ )
public static final String REPOSITORY_NAME = "REPOSITORY_NAME";
/**