diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Artifact.java | 15 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/SkylarkActionFactory.java | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java index de568b8465..e6148adaaf 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java @@ -96,14 +96,17 @@ import javax.annotation.Nullable; @Immutable @SkylarkModule(name = "File", category = SkylarkModuleCategory.BUILTIN, - doc = "<p>This type represents a file used by the build system. It can be " + doc = "<p>This type represents a file or directory used by the build system. It can be " + "either a source file or a derived file produced by a rule.</p>" + "<p>The File constructor is private, so you cannot call it directly to create new " - + "Files. If you have a Skylark rule that needs to create a new File, you might need to " - + "add the label to the attrs (if it's an input) or the outputs (if it's an output). Then " - + "you can access the File through the rule's <a href='ctx.html'>context</a>. You can " - + "also use <a href='actions.html#declare_file'>ctx.actions.declare_file</a> to " - + "declare a new file in the rule implementation.</p>") + + "Files. If you have a Skylark rule that needs to create a new File, you have two options:" + + "<ul>" + + "<li>use <a href='actions.html#declare_file'>ctx.actions.declare_file</a> " + + "or <a href='actions.html#declare_file'>ctx.actions.declare_director</a>to " + + "declare a new file in the rule implementation.</li>" + + "<li>add the label to the attrs (if it's an input) or the outputs (if it's an output)." + + " Then you can access the File through the rule's " + + "<a href='ctx.html#outputs'>ctx.outputs</a>.") public class Artifact implements FileType.HasFilename, ActionInput, SkylarkValue, Comparable<Object> { diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkActionFactory.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkActionFactory.java index 20f1fb18c4..cb78d39a50 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkActionFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkActionFactory.java @@ -118,9 +118,7 @@ public class SkylarkActionFactory implements SkylarkValue { name = "declare_directory", doc = "Declares that rule or aspect create a directory with the given name, in the " - + "current package. 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>.", + + "current package. You must create an action that generates the directory.", parameters = { @Param( name = "filename", |