aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/skylark
diff options
context:
space:
mode:
authorGravatar laurentlb <laurentlb@google.com>2017-12-11 06:12:32 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-11 06:14:26 -0800
commit30f6d44ff99cc60446e6ae1f7d4c9818351b918d (patch)
tree7964e76bf3b70257024410d135a7245989798024 /src/main/java/com/google/devtools/build/lib/analysis/skylark
parent502d718b028a4133c6f95a3a5ce7b4ee9e446fec (diff)
Doc: mention that sibling must be in the same package.
RELNOTES: None. PiperOrigin-RevId: 178609245
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/skylark')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java59
1 files changed, 31 insertions, 28 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
index 3803e093e9..1bb4701ada 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
@@ -102,34 +102,37 @@ public class SkylarkActionFactory implements SkylarkValue {
}
@SkylarkCallable(
- name = "declare_file",
- doc =
- "Declares that rule or aspect creates a file with the given filename. "
- + "If <code>sibling</code> is not specified, file name is relative to "
- + "package directory, otherwise the file is in the same directory as "
- + "<code>sibling</code>. "
- + "You must create an action that generates the file. <br>"
- + "Files that are specified in rule's outputs do not need to be declared and are "
- + "available through <a href=\"ctx.html#outputs\">ctx.outputs</a>.",
- parameters = {
- @Param(
- name = "filename",
- type = String.class,
- doc =
- "If no 'sibling' provided, path of the new file, relative "
- + "to the current package. Otherwise a base name for a file "
- + "('sibling' determines a directory)."
- ),
- @Param(
- name = "sibling",
- doc = "A file that lives in the same directory as the newly created file.",
- type = Artifact.class,
- noneable = true,
- positional = false,
- named = true,
- defaultValue = "None"
- )
- }
+ name = "declare_file",
+ doc =
+ "Declares that rule or aspect creates a file with the given filename. "
+ + "If <code>sibling</code> is not specified, file name is relative to "
+ + "package directory, otherwise the file is in the same directory as "
+ + "<code>sibling</code>. "
+ + "You must create an action that generates the file. <br>"
+ + "Files cannot be created outside of the current package. "
+ + "Files that are specified in rule's outputs do not need to be declared and are "
+ + "available through <a href=\"ctx.html#outputs\">ctx.outputs</a>.",
+ parameters = {
+ @Param(
+ name = "filename",
+ type = String.class,
+ doc =
+ "If no 'sibling' provided, path of the new file, relative "
+ + "to the current package. Otherwise a base name for a file "
+ + "('sibling' determines a directory)."
+ ),
+ @Param(
+ name = "sibling",
+ doc =
+ "A file that lives in the same directory as the newly created file. "
+ + "The file must be in the current package.",
+ type = Artifact.class,
+ noneable = true,
+ positional = false,
+ named = true,
+ defaultValue = "None"
+ )
+ }
)
public Artifact declareFile(String filename, Object sibling) throws EvalException {
context.checkMutable("actions.declare_file");