Skip to content

Commit

Permalink
Make it clearer that Args.add_all/add_joined process values lazily
Browse files Browse the repository at this point in the history
The current wording says:

"For depsets, the items are evaluated lazily during the execution phase"

Which is true, the flattening of the depset with (effectively) depset.to_list() happens along with all the other processing at the start of the execution phase. But this makes it insufficiently clear that all the rest of the processing happens lazily for _both_ depsets and lists.

RELNOTES: None.
PiperOrigin-RevId: 346105700
  • Loading branch information
Googler authored and copybara-github committed Dec 7, 2020
1 parent 5e6b3c6 commit 82ac8e9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ CommandLineArgsApi addArgument(
@StarlarkMethod(
name = "add_all",
doc =
"Appends multiple arguments to this command line. For depsets, the items are "
+ "evaluated lazily during the execution phase."
"Appends multiple arguments to this command line. The items are processed lazily during "
+ "the execution phase."
+ ""
+ "<p>Most of the processing occurs over a list of arguments to be appended, as per "
+ "the following steps:"
Expand Down Expand Up @@ -332,8 +332,7 @@ CommandLineArgsApi addAll(
name = "add_joined",
doc =
"Appends an argument to this command line by concatenating together multiple values "
+ "using a separator. For depsets, the items are evaluated lazily during the "
+ "execution phase."
+ "using a separator. The items are processed lazily during the execution phase."
+ ""
+ "<p>Processing is similar to <a href='#add_all'><code>add_all()</code></a>, but "
+ "the list of arguments derived from <code>values</code> is combined into a single "
Expand Down

0 comments on commit 82ac8e9

Please sign in to comment.