Skip to content

Commit

Permalink
fix regression that broke sanity checking of jar sources
Browse files Browse the repository at this point in the history
In commit dd22546 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.
  • Loading branch information
eli-schwartz committed Sep 28, 2023
1 parent 32be9bd commit fc45b57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,10 +1859,10 @@ def func_library(self, node: mparser.BaseNode,
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)

Expand Down

0 comments on commit fc45b57

Please sign in to comment.