Skip to content

Commit

Permalink
Update documentation of expand_location
Browse files Browse the repository at this point in the history
Make explicit in which case the function is useful. Most rules
won't need it.

#6001

RELNOTES: None.
PiperOrigin-RevId: 210738068
  • Loading branch information
laurentlb authored and Copybara-Service committed Aug 29, 2018
1 parent 206c19b commit 22a4994
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,11 @@ public Runtime.NoneType action(
+ "<code>$(location ...)</code> will cause an error if the referenced target has "
+ "multiple outputs. In this case, please use <code>$(locations ...)</code> since it "
+ "produces a space-separated list of output paths. It can be safely used for a "
+ "single output file, too.",
+ "single output file, too."
+ "<br/><br/>"
+ "This function is useful to let the user specify a command in a BUILD file (like "
+ "for <code>genrule</code>). In other cases, it is often better to manipulate labels "
+ "directly.",
parameters = {
@Param(name = "input", type = String.class, doc = "String to be expanded."),
@Param(
Expand Down

0 comments on commit 22a4994

Please sign in to comment.