fix regression that broke sanity checking of jar sources

In commit dd22546bdd the various
typed_pos_args for different BuildTarget functions was refactored into a
common tuple of types.

It overlooked the fact that jar specifically does NOT accept the same
types, and began to allow passing structured_sources in.
pull/12302/head
Eli Schwartz 1 year ago
parent 32be9bd6de
commit fc45b57cf9
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/interpreter/interpreter.py

@ -1859,10 +1859,10 @@ class Interpreter(InterpreterBase, HoldableObject):
return self.build_library(node, args, kwargs)
@permittedKwargs(build.known_jar_kwargs)
@typed_pos_args('jar', str, varargs=SOURCES_VARARGS)
@typed_pos_args('jar', str, varargs=(str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList, build.ExtractedObjects, build.BuildTarget))
@typed_kwargs('jar', *JAR_KWS, allow_unknown=True)
def func_jar(self, node: mparser.BaseNode,
args: T.Tuple[str, SourcesVarargsType],
args: T.Tuple[str, T.List[T.Union[str, mesonlib.File, build.GeneratedTypes]]],
kwargs: kwtypes.Jar) -> build.Jar:
return self.build_target(node, args, kwargs, build.Jar)

Loading…
Cancel
Save