Automated rollback of commit 81cd5ac6ec877f0c243bc6f6aa1ccf2e2440d9ea.
*** Reason for rollback ***
Breaks multiple TAPs
*** Original change description ***
bazel syntax: move depset function out of core Starlark
...and into the Bazel build language's common library, alongside select.
Also, relax the assertion that corresponding depsets have equal
elements, used by serialization tests. It doesn't belong in this
package and can't be expressed without an upward dependency.
Obligatory fakes hacked in to Skydoc.
Follow-up changes will move Depset and the serialization assertion.
See also: CL 308813500 (removes depset special case in Starlark.type)...
***
ROLLBACK_OF=309073173
PiperOrigin-RevId: 309133691
diff --git a/src/main/java/com/google/devtools/build/lib/packages/StarlarkLibrary.java b/src/main/java/com/google/devtools/build/lib/packages/StarlarkLibrary.java
index 595a604..f447f63 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StarlarkLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StarlarkLibrary.java
@@ -25,14 +25,12 @@
import com.google.devtools.build.lib.skylarkinterface.Param;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkGlobalLibrary;
-import com.google.devtools.build.lib.syntax.Depset;
import com.google.devtools.build.lib.syntax.Dict;
import com.google.devtools.build.lib.syntax.EvalException;
import com.google.devtools.build.lib.syntax.Location;
import com.google.devtools.build.lib.syntax.NoneType;
import com.google.devtools.build.lib.syntax.Sequence;
import com.google.devtools.build.lib.syntax.Starlark;
-import com.google.devtools.build.lib.syntax.StarlarkSemantics;
import com.google.devtools.build.lib.syntax.StarlarkThread;
import java.util.List;
import java.util.Set;
@@ -64,109 +62,6 @@
@SkylarkGlobalLibrary
private static class CommonLibrary {
-
- @SkylarkCallable(
- name = "depset",
- doc =
- "Creates a <a href=\"depset.html\">depset</a>. The <code>direct</code> parameter is a"
- + " list of direct elements of the depset, and <code>transitive</code> parameter"
- + " is a list of depsets whose elements become indirect elements of the created"
- + " depset. The order in which elements are returned when the depset is converted"
- + " to a list is specified by the <code>order</code> parameter. See the <a"
- + " href=\"../depsets.md\">Depsets overview</a> for more information.\n" //
- + "<p>All"
- + " elements (direct and indirect) of a depset must be of the same type, as"
- + " obtained by the expression <code>type(x)</code>.\n" //
- + "<p>Because a hash-based set is used to eliminate duplicates during iteration,"
- + " all elements of a depset should be hashable. However, this invariant is not"
- + " currently checked consistently in all constructors. Use the"
- + " --incompatible_always_check_depset_elements flag to enable consistent"
- + " checking; this will be the default behavior in future releases; see <a"
- + " href='https://github.com/bazelbuild/bazel/issues/10313'>Issue 10313</a>.\n" //
- + "<p>In addition, elements must currently be immutable, though this restriction"
- + " will be relaxed in future.\n" //
- + "<p> The order of the created depset should be <i>compatible</i> with the order"
- + " of its <code>transitive</code> depsets. <code>\"default\"</code> order is"
- + " compatible with any other order, all other orders are only compatible with"
- + " themselves.\n" //
- + "<p> Note on backward/forward compatibility. This function currently accepts a"
- + " positional <code>items</code> parameter. It is deprecated and will be removed"
- + " in the future, and after its removal <code>direct</code> will become a sole"
- + " positional parameter of the <code>depset</code> function. Thus, both of the"
- + " following calls are equivalent and future-proof:<br>\n" //
- + "<pre class=language-python>depset(['a', 'b'], transitive = [...])\n" //
- + "depset(direct = ['a', 'b'], transitive = [...])\n" //
- + "</pre>",
- parameters = {
- @Param(
- name = "x",
- type = Object.class,
- defaultValue = "None",
- positional = true,
- named = false,
- noneable = true,
- doc =
- "A positional parameter distinct from other parameters for legacy support. "
- + "\n" //
- + "<p>If <code>--incompatible_disable_depset_inputs</code> is false, this "
- + "parameter serves as the value of <code>items</code>.</p> "
- + "\n" //
- + "<p>If <code>--incompatible_disable_depset_inputs</code> is true, this "
- + "parameter serves as the value of <code>direct</code>.</p> "
- + "\n" //
- + "<p>See the documentation for these parameters for more details."),
- // TODO(cparsons): Make 'order' keyword-only.
- @Param(
- name = "order",
- type = String.class,
- defaultValue = "\"default\"",
- doc =
- "The traversal strategy for the new depset. See "
- + "<a href=\"depset.html\">here</a> for the possible values.",
- named = true),
- @Param(
- name = "direct",
- type = Object.class,
- defaultValue = "None",
- positional = false,
- named = true,
- noneable = true,
- doc = "A list of <i>direct</i> elements of a depset. "),
- @Param(
- name = "transitive",
- named = true,
- positional = false,
- type = Sequence.class,
- generic1 = Depset.class,
- noneable = true,
- doc = "A list of depsets whose elements will become indirect elements of the depset.",
- defaultValue = "None"),
- @Param(
- name = "items",
- type = Object.class,
- defaultValue = "[]",
- positional = false,
- doc =
- "Deprecated: Either an iterable whose items become the direct elements of "
- + "the new depset, in left-to-right order, or else a depset that becomes "
- + "a transitive element of the new depset. In the latter case, "
- + "<code>transitive</code> cannot be specified.",
- disableWithFlag = StarlarkSemantics.FlagIdentifier.INCOMPATIBLE_DISABLE_DEPSET_INPUTS,
- valueWhenDisabled = "[]",
- named = true),
- },
- useStarlarkThread = true)
- public Depset depset(
- Object x,
- String orderString,
- Object direct,
- Object transitive,
- Object items,
- StarlarkThread thread)
- throws EvalException {
- return Depset.depset(x, orderString, direct, transitive, items, thread.getSemantics());
- }
-
@SkylarkCallable(
name = "select",
doc =
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Depset.java b/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
index 35f6710..9ccdd5e 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Depset.java
@@ -39,10 +39,10 @@
* <p>For depsets constructed by Starlark code, the element type of a non-empty {@code Depset} is
* determined by its first element. All elements must have the same type. An empty depset has type
* {@code ElementType.EMPTY}, and may be combined with any other depset.
- *
- * <p>Every call to {@code depset} returns a distinct instance equal to no other.
*/
-// TODO(adonovan): move to lib.packages, as this is a Bazelism.
+// TODO(adonovan): move to lib.packages, as this is a Bazelism. Requires:
+// - moving the function to StarlarkLibrary.COMMON.
+// - relaxing StarlarkThread.checkStateEquals (or defining Depset.equals)
@SkylarkModule(
name = "depset",
category = SkylarkModuleCategory.BUILTIN,
@@ -502,100 +502,4 @@
return that instanceof ElementType && this.cls == ((ElementType) that).cls;
}
}
-
- /**
- * Implementation of the build language's depset function, aka
- * StarlarkLibrary.CommonLibrary.depset.
- */
- public static Depset depset(
- Object x,
- String orderString,
- Object direct,
- Object transitive,
- Object items,
- StarlarkSemantics semantics)
- throws EvalException {
- Order order;
- Depset result;
- try {
- order = Order.parse(orderString);
- } catch (IllegalArgumentException ex) {
- throw new EvalException(null, ex);
- }
-
- if (semantics.incompatibleDisableDepsetItems()) {
- if (x != Starlark.NONE) {
- if (direct != Starlark.NONE) {
- throw new EvalException(
- null, "parameter 'direct' cannot be specified both positionally and by keyword");
- }
- direct = x;
- }
- if (direct instanceof Depset) {
- throw new EvalException(
- null,
- "parameter 'direct' must contain a list of elements, and may no longer accept a"
- + " depset. The deprecated behavior may be temporarily re-enabled by setting"
- + " --incompatible_disable_depset_inputs=false");
- }
- result =
- fromDirectAndTransitive(
- order,
- Sequence.noneableCast(direct, Object.class, "direct"),
- Sequence.noneableCast(transitive, Depset.class, "transitive"),
- semantics.incompatibleAlwaysCheckDepsetElements());
- } else {
- if (x != Starlark.NONE) {
- if (!isEmptySkylarkList(items)) {
- throw new EvalException(
- null, "parameter 'items' cannot be specified both positionally and by keyword");
- }
- items = x;
- }
- result = legacyDepsetConstructor(items, order, direct, transitive, semantics);
- }
-
- if (semantics.debugDepsetDepth()) {
- // Flatten the underlying nested set. If the set exceeds the depth limit, then this will
- // throw a NestedSetDepthException.
- // This is an extremely inefficient check and should be only done in the
- // "--debug_depset_depth" mode.
- try {
- result.toCollection(); // may throw exception
- } catch (NestedSetDepthException ex) {
- throw Starlark.errorf("depset exceeded maximum depth %d", ex.getDepthLimit());
- }
- }
- return result;
- }
-
- private static Depset legacyDepsetConstructor(
- Object items, Order order, Object direct, Object transitive, StarlarkSemantics semantics)
- throws EvalException {
-
- if (transitive == Starlark.NONE && direct == Starlark.NONE) {
- // Legacy behavior.
- return legacyOf(order, items);
- }
-
- if (direct != Starlark.NONE && !isEmptySkylarkList(items)) {
- throw new EvalException(
- null, "Do not pass both 'direct' and 'items' argument to depset constructor.");
- }
-
- // Non-legacy behavior: either 'transitive' or 'direct' were specified.
- List<Object> directElements =
- direct != Starlark.NONE
- ? Sequence.cast(direct, Object.class, "direct")
- : Sequence.cast(items, Object.class, "items");
-
- List<Depset> transitiveList = Sequence.noneableCast(transitive, Depset.class, "transitive");
-
- return fromDirectAndTransitive(
- order, directElements, transitiveList, semantics.incompatibleAlwaysCheckDepsetElements());
- }
-
- private static boolean isEmptySkylarkList(Object o) {
- return o instanceof Sequence && ((Sequence) o).isEmpty();
- }
}
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java b/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
index a2c6be4..e5cec40 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
@@ -88,6 +88,9 @@
if (o1 instanceof ClassObject) {
throw new ComparisonException("Cannot compare structs");
}
+ if (o1 instanceof Depset) {
+ throw new ComparisonException("Cannot compare depsets");
+ }
try {
return ((Comparable<Object>) o1).compareTo(o2);
} catch (ClassCastException e) {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
index fa24412..5212b91 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
@@ -19,12 +19,14 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import com.google.devtools.build.lib.collect.nestedset.NestedSet.NestedSetDepthException;
+import com.google.devtools.build.lib.collect.nestedset.Order;
import com.google.devtools.build.lib.skylarkinterface.Param;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkGlobalLibrary;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
import com.google.devtools.build.lib.syntax.EvalUtils.ComparisonException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -798,6 +800,190 @@
}
@SkylarkCallable(
+ name = "depset",
+ doc =
+ "Creates a <a href=\"depset.html\">depset</a>. The <code>direct</code> parameter is a "
+ + "list of direct elements of the depset, and <code>transitive</code> parameter is "
+ + "a list of depsets whose elements become indirect elements of the created depset. "
+ + "The order in which elements are returned when the depset is converted to a list "
+ + "is specified by the <code>order</code> parameter. "
+ + "See the <a href=\"../depsets.md\">Depsets overview</a> for more information. "
+ + ""
+ + "<p>All elements (direct and indirect) of a depset must be of the same type, "
+ + "as obtained by the expression <code>type(x)</code>."
+ + ""
+ + "<p>Because a hash-based set is used to eliminate duplicates during iteration, "
+ + "all elements of a depset should be hashable. However, this invariant is not "
+ + "currently checked consistently in all constructors. Use the "
+ + "--incompatible_always_check_depset_elements flag to enable "
+ + "consistent checking; this will be the default behavior in future releases; "
+ + " see <a href='https://github.com/bazelbuild/bazel/issues/10313'>Issue 10313</a>."
+ + ""
+ + "<p>In addition, elements must currently be immutable, though this restriction "
+ + "will be relaxed in future."
+ + ""
+ + "<p> The order of the created depset should be <i>compatible</i> with the order of "
+ + "its <code>transitive</code> depsets. <code>\"default\"</code> order is compatible "
+ + "with any other order, all other orders are only compatible with themselves."
+ + "<p> Note on backward/forward compatibility. This function currently accepts a "
+ + "positional <code>items</code> parameter. It is deprecated and will be removed "
+ + "in the future, and after its removal <code>direct</code> will become a sole "
+ + "positional parameter of the <code>depset</code> function. Thus, both of the "
+ + "following calls are equivalent and future-proof:<br>"
+ + "<pre class=language-python>"
+ + "depset(['a', 'b'], transitive = [...])\n"
+ + "depset(direct = ['a', 'b'], transitive = [...])\n"
+ + "</pre>",
+ parameters = {
+ @Param(
+ name = "x",
+ type = Object.class,
+ defaultValue = "None",
+ positional = true,
+ named = false,
+ noneable = true,
+ doc =
+ "A positional parameter distinct from other parameters for legacy support. "
+ + "<p>If <code>--incompatible_disable_depset_inputs</code> is false, this "
+ + "parameter serves as the value of <code>items</code>.</p> "
+ + "<p>If <code>--incompatible_disable_depset_inputs</code> is true, this "
+ + "parameter serves as the value of <code>direct</code>.</p> "
+ + "<p>See the documentation for these parameters for more details."),
+ // TODO(cparsons): Make 'order' keyword-only.
+ @Param(
+ name = "order",
+ type = String.class,
+ defaultValue = "\"default\"",
+ doc =
+ "The traversal strategy for the new depset. See "
+ + "<a href=\"depset.html\">here</a> for the possible values.",
+ named = true),
+ @Param(
+ name = "direct",
+ type = Object.class,
+ defaultValue = "None",
+ positional = false,
+ named = true,
+ noneable = true,
+ doc = "A list of <i>direct</i> elements of a depset. "),
+ @Param(
+ name = "transitive",
+ named = true,
+ positional = false,
+ type = Sequence.class,
+ generic1 = Depset.class,
+ noneable = true,
+ doc = "A list of depsets whose elements will become indirect elements of the depset.",
+ defaultValue = "None"),
+ @Param(
+ name = "items",
+ type = Object.class,
+ defaultValue = "[]",
+ positional = false,
+ doc =
+ "Deprecated: Either an iterable whose items become the direct elements of "
+ + "the new depset, in left-to-right order, or else a depset that becomes "
+ + "a transitive element of the new depset. In the latter case, "
+ + "<code>transitive</code> cannot be specified.",
+ disableWithFlag = FlagIdentifier.INCOMPATIBLE_DISABLE_DEPSET_INPUTS,
+ valueWhenDisabled = "[]",
+ named = true),
+ },
+ useStarlarkThread = true)
+ public Depset depset(
+ Object x,
+ String orderString,
+ Object direct,
+ Object transitive,
+ Object items,
+ StarlarkThread thread)
+ throws EvalException {
+ Order order;
+ Depset result;
+ try {
+ order = Order.parse(orderString);
+ } catch (IllegalArgumentException ex) {
+ throw new EvalException(null, ex);
+ }
+
+ StarlarkSemantics semantics = thread.getSemantics();
+ if (semantics.incompatibleDisableDepsetItems()) {
+ if (x != Starlark.NONE) {
+ if (direct != Starlark.NONE) {
+ throw new EvalException(
+ null, "parameter 'direct' cannot be specified both positionally and by keyword");
+ }
+ direct = x;
+ }
+ if (direct instanceof Depset) {
+ throw new EvalException(
+ null,
+ "parameter 'direct' must contain a list of elements, and may no longer accept a"
+ + " depset. The deprecated behavior may be temporarily re-enabled by setting"
+ + " --incompatible_disable_depset_inputs=false");
+ }
+ result =
+ Depset.fromDirectAndTransitive(
+ order,
+ Sequence.noneableCast(direct, Object.class, "direct"),
+ Sequence.noneableCast(transitive, Depset.class, "transitive"),
+ semantics.incompatibleAlwaysCheckDepsetElements());
+ } else {
+ if (x != Starlark.NONE) {
+ if (!isEmptySkylarkList(items)) {
+ throw new EvalException(
+ null, "parameter 'items' cannot be specified both positionally and by keyword");
+ }
+ items = x;
+ }
+ result = legacyDepsetConstructor(items, order, direct, transitive, semantics);
+ }
+
+ if (semantics.debugDepsetDepth()) {
+ // Flatten the underlying nested set. If the set exceeds the depth limit, then this will
+ // throw a NestedSetDepthException.
+ // This is an extremely inefficient check and should be only done in the
+ // "--debug_depset_depth" mode.
+ try {
+ result.toCollection(); // may throw exception
+ } catch (NestedSetDepthException ex) {
+ throw Starlark.errorf("depset exceeded maximum depth %d", ex.getDepthLimit());
+ }
+ }
+ return result;
+ }
+
+ private static Depset legacyDepsetConstructor(
+ Object items, Order order, Object direct, Object transitive, StarlarkSemantics semantics)
+ throws EvalException {
+
+ if (transitive == Starlark.NONE && direct == Starlark.NONE) {
+ // Legacy behavior.
+ return Depset.legacyOf(order, items);
+ }
+
+ if (direct != Starlark.NONE && !isEmptySkylarkList(items)) {
+ throw new EvalException(
+ null, "Do not pass both 'direct' and 'items' argument to depset constructor.");
+ }
+
+ // Non-legacy behavior: either 'transitive' or 'direct' were specified.
+ List<Object> directElements =
+ direct != Starlark.NONE
+ ? Sequence.cast(direct, Object.class, "direct")
+ : Sequence.cast(items, Object.class, "items");
+
+ List<Depset> transitiveList = Sequence.noneableCast(transitive, Depset.class, "transitive");
+
+ return Depset.fromDirectAndTransitive(
+ order, directElements, transitiveList, semantics.incompatibleAlwaysCheckDepsetElements());
+ }
+
+ private static boolean isEmptySkylarkList(Object o) {
+ return o instanceof Sequence && ((Sequence) o).isEmpty();
+ }
+
+ @SkylarkCallable(
name = "zip",
doc =
"Returns a <code>list</code> of <code>tuple</code>s, where the i-th tuple contains "
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkThread.java b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkThread.java
index 022c062..bd7b82c 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkThread.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkThread.java
@@ -245,7 +245,6 @@
*
* <p>The exception explains the reason for the inequality, including all unequal bindings.
*/
- // TODO(adonovan): move this function into the relevant test.
public void checkStateEquals(Object obj) {
if (this == obj) {
return;
@@ -277,12 +276,18 @@
if (value.equals(otherValue)) {
continue;
}
- if (value.getClass() == otherValue.getClass()
- && value.getClass().getSimpleName().equals("Depset")) {
- // Unsoundly assume all depsets are equal.
- // We can't compare {x,y}.toCollection() without an
- // upwards dependency.
- continue;
+ if (value instanceof Depset) {
+ if (otherValue instanceof Depset) {
+ // Widen to Object to avoid static checker warning
+ // about Collection.equals(Collection). We may assume
+ // these collections have the same class, even if we
+ // can't assume its equality is List-like or Set-like.
+ Object x = ((Depset) value).toCollection();
+ Object y = ((Depset) otherValue).toCollection();
+ if (x.equals(y)) {
+ continue;
+ }
+ }
} else if (value instanceof Dict) {
if (otherValue instanceof Dict) {
@SuppressWarnings("unchecked")
diff --git a/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java b/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java
index bf1aa8f..be34246 100644
--- a/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java
+++ b/src/main/java/com/google/devtools/build/skydoc/SkydocMain.java
@@ -621,11 +621,6 @@
envBuilder.put(name, Starlark.NONE);
}
- // Add dummy declarations that would come from packages.StarlarkLibrary.COMMON
- // were Skydoc allowed to depend on it. See hack for select below.
- // The dict function accepts almost any arguments.
- envBuilder.put("depset", Starlark.UNIVERSE.get("dict"));
-
// Declare a fake implementation of select that just returns the first
// value in the dict. (This program is forbidden from depending on the real
// implementation of 'select' in lib.packages, and so the hacks multiply.)
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/DepsetTest.java b/src/test/java/com/google/devtools/build/lib/syntax/DepsetTest.java
index b2c8335..524a643 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/DepsetTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/DepsetTest.java
@@ -468,10 +468,4 @@
assertThrows(IllegalArgumentException.class, () -> ElementType.of(CharSequence.class));
assertThrows(IllegalArgumentException.class, () -> ElementType.of(Object.class));
}
-
- @Test
- public void testSetComparison() throws Exception {
- new Scenario()
- .testIfExactError("Cannot compare depset with depset", "depset([1, 2]) < depset([3, 4])");
- }
}
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
index 3ab3a39..692ef4c 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
@@ -221,6 +221,11 @@
}
@Test
+ public void testSetComparison() throws Exception {
+ new Scenario().testIfExactError("Cannot compare depsets", "depset([1, 2]) < depset([3, 4])");
+ }
+
+ @Test
public void testSumFunction() throws Exception {
StarlarkCallable sum =
new StarlarkCallable() {
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/ResolverTest.java b/src/test/java/com/google/devtools/build/lib/syntax/ResolverTest.java
index 6837b0d..93596e3 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/ResolverTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/ResolverTest.java
@@ -269,6 +269,11 @@
}
@Test
+ public void testModulesReadOnlyInFuncDefBody() throws Exception {
+ assertValid("def func():", " cmd_helper = depset()");
+ }
+
+ @Test
public void testBuiltinGlobalFunctionsReadOnlyInFuncDefBody() throws Exception {
assertValid("def func():", " rule = 'abc'");
}
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/StarlarkThreadTest.java b/src/test/java/com/google/devtools/build/lib/syntax/StarlarkThreadTest.java
index cc9a2ea..0488d31 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/StarlarkThreadTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/StarlarkThreadTest.java
@@ -108,6 +108,7 @@
"all",
"any",
"bool",
+ "depset",
"dict",
"dir",
"enumerate",