diff --git a/src/main/java/com/google/devtools/build/docgen/ApiExporter.java b/src/main/java/com/google/devtools/build/docgen/ApiExporter.java index b32886b634ff49..00c6bf252540fe 100644 --- a/src/main/java/com/google/devtools/build/docgen/ApiExporter.java +++ b/src/main/java/com/google/devtools/build/docgen/ApiExporter.java @@ -316,7 +316,7 @@ private static Pair> getSignature(SkylarkCallabl for (com.google.devtools.build.lib.skylarkinterface.Param param : annot.parameters()) { // Implicit * or *args parameter separates transition from positional to named. // f (..., *, ... ) or f(..., *args, ...) - if ((param.named() || param.legacyNamed()) && !param.positional() && !hasStar) { + if (param.named() && !param.positional() && !hasStar) { hasStar = true; if (!annot.extraPositionals().name().isEmpty()) { star = annot.extraPositionals().name(); diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java index 97287b71473726..8637359fea2980 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java @@ -120,8 +120,6 @@ Sequence glob( @Param( name = "name", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The name of the target.") }, useStarlarkThread = true) diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java index 8f1b8b6dbca3f5..651136fe39cecb 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java @@ -524,7 +524,6 @@ SkylarkAspectApi aspect( @Param( name = "label_string", type = String.class, - legacyNamed = true, doc = "the label string."), @Param( name = "relative_to_caller_repository", diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java index 52d5a992d7f007..525d7fd89493f6 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java @@ -101,18 +101,6 @@ */ boolean named() default false; - /** - * If this true, {@link #named} should be treated as true. - * - *

This indicates this parameter is part of a {@link SkylarkCallable} method which was migrated - * from {@code SkylarkSignature}. Due to a pre-migration bug, all parameters were treated as if - * {@link #named} was true, even if it was false. To prevent breakages during migration, the - * interpreter can continue to treat these parameters as named. This is distinct from {@link - * #named}, however, so that a bulk fix/cleanup will be easier later. - */ - // TODO(b/77902276): Remove this after a bulk cleanup/fix. - boolean legacyNamed() default false; - /** * If true, the parameter may be specified as a positional parameter. For example for an integer * positional parameter {@code foo} of a method {@code bar}, then the method call will look like diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java index eb8d771b9dc2fd..916fd522834e93 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java @@ -275,7 +275,7 @@ private void checkParameters(ExecutableElement method, SkylarkCallable annot) { "Positional parameter '%s' is specified after one or more non-positional parameters", paramAnnot.name()); } - if (!isParamNamed(paramAnnot) && !allowPositionalOnlyNext) { + if (!paramAnnot.named() && !allowPositionalOnlyNext) { errorf( param, "Positional-only parameter '%s' is specified after one or more named parameters", @@ -297,11 +297,11 @@ private void checkParameters(ExecutableElement method, SkylarkCallable annot) { // No positional parameters can come after this parameter. allowPositionalNext = false; - if (!isParamNamed(paramAnnot)) { + if (!paramAnnot.named()) { errorf(param, "Parameter '%s' must be either positional or named", paramAnnot.name()); } } - if (isParamNamed(paramAnnot)) { + if (paramAnnot.named()) { // No positional-only parameters can come after this parameter. allowPositionalOnlyNext = false; } @@ -310,10 +310,6 @@ private void checkParameters(ExecutableElement method, SkylarkCallable annot) { checkSpecialParams(method, annot); } - private static boolean isParamNamed(Param param) { - return param.named() || param.legacyNamed(); - } - // Checks consistency of a single parameter with its Param annotation. private void checkParameter(Element param, Param paramAnnot, TypeMirror objectType) { TypeMirror paramType = param.asType(); // type of the Java method parameter 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 82ec5054658bd6..7148503d760aa5 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 @@ -102,9 +102,7 @@ private static Object findExtreme(Sequence args, Ordering maxOrdering name = "elements", type = Object.class, noneable = true, - doc = "A string or a collection of elements.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) + doc = "A string or a collection of elements.") }) public Boolean all(Object collection) throws EvalException { return !hasElementWithBooleanValue(collection, false); @@ -122,9 +120,7 @@ public Boolean all(Object collection) throws EvalException { name = "elements", type = Object.class, noneable = true, - doc = "A string or a collection of elements.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) + doc = "A string or a collection of elements.") }) public Boolean any(Object collection) throws EvalException { return hasElementWithBooleanValue(collection, true); @@ -148,12 +144,7 @@ private static boolean hasElementWithBooleanValue(Object seq, boolean value) + "It is an error if elements are not comparable (for example int with string)." + "
sorted([3, 5, 4]) == [3, 4, 5]
", parameters = { - @Param( - name = "iterable", - type = Object.class, - doc = "The iterable sequence to sort.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + @Param(name = "iterable", type = Object.class, doc = "The iterable sequence to sort."), @Param( name = "key", doc = "An optional function applied to each element before comparison.", @@ -171,10 +162,7 @@ private static boolean hasElementWithBooleanValue(Object seq, boolean value) }, useStarlarkThread = true) public StarlarkList sorted( - Object iterable, - final Object key, - Boolean reverse, - final StarlarkThread thread) + Object iterable, final Object key, Boolean reverse, final StarlarkThread thread) throws EvalException, InterruptedException { Object[] array = Starlark.toArray(iterable); if (key == Starlark.NONE) { @@ -247,9 +235,7 @@ private static void reverse(Object[] array) { @Param( name = "sequence", type = Sequence.class, - doc = "The sequence (list or tuple) to be reversed.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + doc = "The sequence (list or tuple) to be reversed."), }, useStarlarkThread = true) public StarlarkList reversed(Sequence sequence, StarlarkThread thread) @@ -266,14 +252,7 @@ public StarlarkList reversed(Sequence sequence, StarlarkThread thread) + "
tuple([1, 2]) == (1, 2)\n"
               + "tuple((2, 3, 2)) == (2, 3, 2)\n"
               + "tuple({5: \"a\", 2: \"b\", 4: \"c\"}) == (5, 2, 4)
", - parameters = { - @Param( - name = "x", - defaultValue = "()", - doc = "The object to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) - }) + parameters = {@Param(name = "x", defaultValue = "()", doc = "The object to convert.")}) public Tuple tuple(Object x) throws EvalException { if (x instanceof Tuple) { return (Tuple) x; @@ -288,14 +267,7 @@ public Tuple tuple(Object x) throws EvalException { + "
list([1, 2]) == [1, 2]\n"
               + "list((2, 3, 2)) == [2, 3, 2]\n"
               + "list({5: \"a\", 2: \"b\", 4: \"c\"}) == [5, 2, 4]
", - parameters = { - @Param( - name = "x", - defaultValue = "[]", - doc = "The object to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) - }, + parameters = {@Param(name = "x", defaultValue = "[]", doc = "The object to convert.")}, useStarlarkThread = true) public StarlarkList list(Object x, StarlarkThread thread) throws EvalException { return StarlarkList.wrap(thread.mutability(), Starlark.toArray(x)); @@ -306,13 +278,7 @@ public StarlarkList list(Object x, StarlarkThread thread) throws EvalExceptio doc = "Returns the length of a string, sequence (such as a list or tuple), dict, or other" + " iterable.", - parameters = { - @Param( - name = "x", - doc = "The value whose length to report.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) - }, + parameters = {@Param(name = "x", doc = "The value whose length to report.")}, useStarlarkThread = true) public Integer len(Object x, StarlarkThread thread) throws EvalException { int len = Starlark.len(x); @@ -332,8 +298,6 @@ public Integer len(Object x, StarlarkThread thread) throws EvalException { @Param( name = "x", doc = "The object to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }) public String str(Object x) throws EvalException { @@ -360,8 +324,6 @@ public String str(Object x) throws EvalException { @Param( name = "x", doc = "The object to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }) public String repr(Object x) { @@ -381,8 +343,6 @@ public String repr(Object x) { name = "x", defaultValue = "False", doc = "The variable to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }) public Boolean bool(Object x) throws EvalException { @@ -432,12 +392,7 @@ public Boolean bool(Object x) throws EvalException { + "int(\"-0x10\", 0) == -16" + "", parameters = { - @Param( - name = "x", - type = Object.class, - doc = "The string to convert.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + @Param(name = "x", type = Object.class, doc = "The string to convert."), @Param( name = "base", type = Object.class, @@ -556,9 +511,7 @@ private String getIntegerPrefix(String value) { defaultValue = "[]", doc = "Either a dictionary or a list of entries. Entries must be tuples or lists with " - + "exactly two elements: key, value.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + + "exactly two elements: key, value."), }, extraKeywords = @Param(name = "kwargs", doc = "Dictionary of additional entries."), useStarlarkThread = true) @@ -608,14 +561,7 @@ public StarlarkList enumerate(Object input, Integer start, StarlarkThread thr // Deterministic hashing is important for the consistency of builds, hence why we // promise a specific algorithm. This is in contrast to Java (Object.hashCode()) and // Python, which promise stable hashing only within a given execution of the program. - parameters = { - @Param( - name = "value", - type = String.class, - doc = "String value to hash.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) - }) + parameters = {@Param(name = "value", type = String.class, doc = "String value to hash.")}) public Integer hash(String value) throws EvalException { return value.hashCode(); } @@ -635,9 +581,7 @@ public Integer hash(String value) throws EvalException { type = Integer.class, doc = "Value of the start element if stop is provided, " - + "otherwise value of stop and the actual start is 0", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + + "otherwise value of stop and the actual start is 0"), @Param( name = "stop_or_none", type = Integer.class, @@ -645,16 +589,12 @@ public Integer hash(String value) throws EvalException { defaultValue = "None", doc = "optional index of the first item not to be included in the resulting " - + "list; generation of the list stops before stop is reached.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + + "list; generation of the list stops before stop is reached."), @Param( name = "step", type = Integer.class, defaultValue = "1", - doc = "The increment (default is 1). It may be negative.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) + doc = "The increment (default is 1). It may be negative.") }, useStarlarkThread = true) public Sequence range( @@ -685,18 +625,8 @@ public Sequence range( + "name, otherwise False. Example:
" + "
hasattr(ctx.attr, \"myattr\")
", parameters = { - @Param( - name = "x", - doc = "The object to check.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, - noneable = true), - @Param( - name = "name", - type = String.class, - doc = "The name of the attribute.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true) + @Param(name = "x", doc = "The object to check.", noneable = true), + @Param(name = "name", type = String.class, doc = "The name of the attribute.") }, useStarlarkThread = true) public Boolean hasattr(Object obj, String name, StarlarkThread thread) throws EvalException { @@ -718,25 +648,14 @@ public Boolean hasattr(Object obj, String name, StarlarkThread thread) throws Ev + "
getattr(ctx.attr, \"myattr\")\n"
               + "getattr(ctx.attr, \"myattr\", \"mydefault\")
", parameters = { - @Param( - name = "x", - doc = "The struct whose attribute is accessed.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, - noneable = true), - @Param( - name = "name", - doc = "The name of the struct attribute.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true), + @Param(name = "x", doc = "The struct whose attribute is accessed.", noneable = true), + @Param(name = "name", doc = "The name of the struct attribute."), @Param( name = "default", defaultValue = "unbound", doc = "The default value to return in case the struct " + "doesn't have an attribute of the given name.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }, useStarlarkThread = true) @@ -761,8 +680,6 @@ public Object getattr(Object obj, String name, Object defaultValue, StarlarkThre @Param( name = "x", doc = "The object to check.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }, useStarlarkThread = true) @@ -878,8 +795,6 @@ public NoneType print(String sep, Sequence args, StarlarkThread thread) throw @Param( name = "x", doc = "The object to check type of.", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true) }) public String type(Object object) { diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java index 3aae105d941526..ad8a5973099336 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java @@ -118,8 +118,6 @@ private static String pythonSubstring(String str, int start, Object end, String @Param(name = "self", type = String.class), @Param( name = "elements", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, type = Object.class, doc = "The objects to join.") }) @@ -203,8 +201,6 @@ private static String stringStrip(String self, String chars) { @Param( name = "chars", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, doc = "The characters to remove, or all whitespace if None.", defaultValue = "None") @@ -228,8 +224,6 @@ public String lstrip(String self, Object charsOrNone) { @Param( name = "chars", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, doc = "The characters to remove, or all whitespace if None.", defaultValue = "None") @@ -254,8 +248,6 @@ public String rstrip(String self, Object charsOrNone) { @Param( name = "chars", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, doc = "The characters to remove, or all whitespace if None.", defaultValue = "None") @@ -275,14 +267,10 @@ public String strip(String self, Object charsOrNone) { @Param(name = "self", type = String.class, doc = "This string."), @Param( name = "old", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, type = String.class, doc = "The string to be replaced."), @Param( name = "new", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, type = String.class, doc = "The string to replace with."), @Param( @@ -290,8 +278,6 @@ public String strip(String self, Object charsOrNone) { type = Integer.class, noneable = true, defaultValue = "None", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The maximum number of replacements.") }) public String replace(String self, String oldString, String newString, Object maxSplitO) @@ -332,15 +318,11 @@ public String replace(String self, String oldString, String newString, Object ma @Param(name = "self", type = String.class, doc = "This string."), @Param( name = "sep", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, type = String.class, doc = "The string to split on."), @Param( name = "maxsplit", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "The maximum number of splits.") @@ -379,15 +361,11 @@ public StarlarkList split( @Param(name = "self", type = String.class, doc = "This string."), @Param( name = "sep", - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, type = String.class, doc = "The string to split on."), @Param( name = "maxsplit", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "The maximum number of splits.") @@ -428,8 +406,6 @@ public StarlarkList rsplit( @Param( name = "sep", type = Object.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "unbound", doc = "The string to split on.") }, @@ -459,8 +435,6 @@ public Tuple partition(String self, Object sep, StarlarkThread thread) @Param( name = "sep", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "unbound", doc = "The string to split on.") }, @@ -599,21 +573,15 @@ private static int stringFind( @Param( name = "sub", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to find."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Restrict to search from this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position before which to restrict to search.") @@ -633,21 +601,15 @@ public Integer rfind(String self, String sub, Integer start, Object end) throws @Param( name = "sub", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to find."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Restrict to search from this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position before which to restrict to search.") @@ -667,21 +629,15 @@ public Integer find(String self, String sub, Integer start, Object end) throws E @Param( name = "sub", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to find."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Restrict to search from this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position before which to restrict to search.") @@ -706,21 +662,15 @@ public Integer rindex(String self, String sub, Integer start, Object end) throws @Param( name = "sub", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to find."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Restrict to search from this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position before which to restrict to search.") @@ -744,8 +694,6 @@ public Integer index(String self, String sub, Integer start, Object end) throws @Param( name = "keepends", type = Boolean.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "False", doc = "Whether the line breaks should be included in the resulting list.") }) @@ -908,21 +856,15 @@ private static boolean matches( @Param( name = "sub", type = String.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to count."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Restrict to search from this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position before which to restrict to search.") @@ -970,21 +912,15 @@ public Sequence elems(String self) throws EvalException { @ParamType(type = String.class), @ParamType(type = Tuple.class, generic1 = String.class), }, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring to check."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Test beginning at this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "optional position at which to stop comparing.") @@ -1061,21 +997,15 @@ public String format(String self, Sequence args, Dict kwargs) throws Ev @ParamType(type = String.class), @ParamType(type = Tuple.class, generic1 = String.class), }, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, doc = "The substring(s) to check."), @Param( name = "start", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, defaultValue = "0", doc = "Test beginning at this position."), @Param( name = "end", type = Integer.class, - // TODO(cparsons): This parameter should be positional-only. - legacyNamed = true, noneable = true, defaultValue = "None", doc = "Stop comparing at this position.") diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java index c17c206d4b618d..8adc6cef4869db 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java @@ -195,25 +195,6 @@ public Map> stringListDict() { return ImmutableMap.of("a", ImmutableList.of("b", "c")); } - @SkylarkCallable( - name = "legacy_method", - documented = false, - parameters = { - @Param(name = "pos", positional = true, type = Boolean.class), - @Param(name = "legacyNamed", type = Boolean.class, positional = true, named = false, - legacyNamed = true), - @Param(name = "named", type = Boolean.class, positional = false, named = true), - }) - public String legacyMethod(Boolean pos, Boolean legacyNamed, Boolean named) { - return "legacy_method(" - + pos - + ", " - + legacyNamed - + ", " - + named - + ")"; - } - @SkylarkCallable( name = "with_params", documented = false, @@ -1885,7 +1866,6 @@ public void testDirFindsJavaObjectStructFieldsAndMethods() throws Exception { "function", "interrupted_struct_field", "is_empty", - "legacy_method", "nullfunc_failing", "nullfunc_working", "proxy_methods_object",