Skip to content

Commit

Permalink
interpreter: remove dependency_kwargs
Browse files Browse the repository at this point in the history
Since it's basically unusued, but the DEPENDENCY_KWS can be used instead
  • Loading branch information
dcbaker committed Dec 11, 2024
1 parent 256167c commit 7e0492b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
3 changes: 1 addition & 2 deletions mesonbuild/dependencies/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def get_dep_identifier(name: str, kwargs: T.Dict[str, T.Any]) -> 'TV_DepID':
nkwargs = {k.name: k.default for k in DEPENDENCY_KWS}
nkwargs.update(kwargs)

from ..interpreter import permitted_dependency_kwargs
assert len(permitted_dependency_kwargs) == 19, \
assert len(DEPENDENCY_KWS) == 20, \
'Extra kwargs have been added to dependency(), please review if it makes sense to handle it here'
for key, value in nkwargs.items():
# 'version' is irrelevant for caching; the caller must check version matches
Expand Down
5 changes: 2 additions & 3 deletions mesonbuild/interpreter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# SPDX-license-identifier: Apache-2.0
# Copyright 2012-2021 The Meson development team
# Copyright © 2021-2023 Intel Corporation
# Copyright © 2021-2024 Intel Corporation

"""Meson interpreter."""

__all__ = [
'Interpreter',
'permitted_dependency_kwargs',

'CompilerHolder',

Expand All @@ -30,7 +29,7 @@
'StringHolder',
]

from .interpreter import Interpreter, permitted_dependency_kwargs
from .interpreter import Interpreter
from .compiler import CompilerHolder
from .interpreterobjects import (ExecutableHolder, BuildTargetHolder, CustomTargetHolder,
CustomTargetIndexHolder, MachineHolder, Test,
Expand Down
22 changes: 0 additions & 22 deletions mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,6 @@ class InterpreterRuleRelaxation(Enum):

ALLOW_BUILD_DIR_FILE_REFERENCES = 1

permitted_dependency_kwargs = {
'allow_fallback',
'cmake_args',
'cmake_module_path',
'cmake_package_version',
'components',
'default_options',
'fallback',
'include_type',
'language',
'main',
'method',
'modules',
'native',
'not_found_message',
'optional_modules',
'private_headers',
'required',
'static',
'version',
}

implicit_check_false_warning = """You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in meson 2.0.
Expand Down

0 comments on commit 7e0492b

Please sign in to comment.