diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java index cff3298ce9..e7efcd301c 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java @@ -51,12 +51,12 @@ import javax.annotation.Nullable; + "tests, but on the contrary they support fast union. Depsets are designed to be used as " + "a collection of items (such as file names) generated by Bazel targets. " + "Depsets can be created using the <a href=\"globals.html#depset\">depset</a> function, " - + "and they support the <code>|</code> operator to extend the depset with more elements or " - + "to nest other depsets inside of it. Examples:<br>" + + "and they support the <code>+</code> operator to extend the depset with more elements or " + + "to nest other depsets inside of it (the <code>|</code> is equivalent). Examples:<br>" + "<pre class=language-python>s = depset([1, 2])\n" - + "s = s | [3] # s == {1, 2, 3}\n" - + "s = s | depset([4, 5]) # s == {1, 2, 3, {4, 5}}\n" + + "s = s + [3] # s == {1, 2, 3}\n" + + "s = s + depset([4, 5]) # s == {1, 2, 3, {4, 5}}\n" + "other = depset([\"a\", \"b\", \"c\"], order=\"postorder\")</pre>" + "Note that in these examples <code>{..}</code> is not a valid literal to create depsets. " @@ -97,7 +97,9 @@ import javax.annotation.Nullable; + "<code>union()</code> if either both depsets have the same <code>order</code> or one of " + "the depsets has <code>stable</code> order. In the latter case the iteration order will " + "be determined by the outer depset, thus ignoring the <code>order</code> parameter of " - + "nested depsets." + + "nested depsets.<br>" + + "The function <code>set</code> is a deprecated alias for <code>depset</code>. Please " + + "update legacy code and use only <code>depset</code>." ) @Immutable public final class SkylarkNestedSet implements SkylarkValue, SkylarkQueryable { |