Document parameter of repository_ctx.path
Closes
@@ -138,11 +138,23 @@ public class SkylarkRepositoryContext {
@SkylarkCallable(
name = "path",
doc =
- "Returns a path from a string or a label. If the path is relative, it will resolve "
+ "Returns a path from a string, label or path. If the path is relative, it will resolve "
+ "relative to the repository directory. If the path is a label, it will resolve to "
+ "the path of the corresponding file. Note that remote repositories are executed "
+ "during the analysis phase and thus cannot depends on a target result (the "
- + "label should point to a non-generated file)."
+ + "label should point to a non-generated file). If path is a path, it will return "
+ + "that path as is.",
+ parameters = {
+ @Param(
+ name = "path",
+ allowedTypes = {
+ @ParamType(type = String.class),
+ @ParamType(type = Label.class),
+ @ParamType(type = SkylarkPath.class)
+ },
+ doc = "string, label or path from which to create a path from"
+ )
+ }
)
public SkylarkPath path(Object path) throws EvalException, InterruptedException {
return getPath("path()", path);
