interpreter: used typed_kwargs for rust_dependency_map

pull/12298/head
Dylan Baker 1 year ago
parent e27dbb42a0
commit 07597088a5
  1. 1
      mesonbuild/interpreter/interpreter.py
  2. 2
      mesonbuild/interpreter/kwargs.py
  3. 6
      mesonbuild/interpreter/type_checking.py

@ -3248,7 +3248,6 @@ class Interpreter(InterpreterBase, HoldableObject):
kwargs: T.Union[kwtypes.Executable, kwtypes.StaticLibrary, kwtypes.SharedLibrary, kwtypes.SharedModule, kwtypes.Jar],
targetclass: T.Type[T.Union[build.Executable, build.StaticLibrary, build.SharedModule, build.SharedLibrary, build.Jar]]
) -> T.Union[build.Executable, build.StaticLibrary, build.SharedModule, build.SharedLibrary, build.Jar]:
@FeatureNewKwargs('build target', '1.2.0', ['rust_dependency_map'])
@FeatureNewKwargs('build target', '0.42.0', ['rust_crate_type', 'build_rpath', 'implicit_include_directories'])
@FeatureNewKwargs('build target', '0.41.0', ['rust_args'])
@FeatureNewKwargs('build target', '0.38.0', ['build_by_default'])

@ -331,6 +331,8 @@ class _BuildTarget(_BaseBuildTarget):
"""Arguments shared by non-JAR functions"""
rust_dependency_map: T.Dict[str, str]
class _LibraryMixin(TypedDict):

@ -522,6 +522,12 @@ _ALL_TARGET_KWS: T.List[KwargInfo] = [
_BUILD_TARGET_KWS: T.List[KwargInfo] = [
*_ALL_TARGET_KWS,
RUST_CRATE_TYPE_KW,
KwargInfo(
'rust_dependency_map',
ContainerTypeInfo(dict, str),
default={},
since='1.2.0',
),
]
def _validate_win_subsystem(value: T.Optional[str]) -> T.Optional[str]:

Loading…
Cancel
Save