diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-05-06 09:38:35 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-05-08 21:31:55 +0300 |
commit | aa700fe9821c1472f2e8707f5df6d8058547e43f (patch) | |
tree | 745e4d7009e132464bfd76cc2393f2154387219c | |
parent | ed57646475cfe766a84dcd256895ce8375a09a62 (diff) | |
download | meson-aa700fe9821c1472f2e8707f5df6d8058547e43f.zip meson-aa700fe9821c1472f2e8707f5df6d8058547e43f.tar.gz meson-aa700fe9821c1472f2e8707f5df6d8058547e43f.tar.bz2 |
interpreter: Skip not_found_message and include_type in cache id
-rw-r--r-- | mesonbuild/dependencies/base.py | 8 | ||||
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 14380d4..ce2a2c5 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -2061,6 +2061,9 @@ class DependencyFactory: def get_dep_identifier(name, kwargs) -> T.Tuple: identifier = (name, ) + from ..interpreter import permitted_dependency_kwargs + assert len(permitted_dependency_kwargs) == 19, \ + 'Extra kwargs have been added to dependency(), please review if it makes sense to handle it here' for key, value in kwargs.items(): # 'version' is irrelevant for caching; the caller must check version matches # 'native' is handled above with `for_machine` @@ -2069,7 +2072,10 @@ def get_dep_identifier(name, kwargs) -> T.Tuple: # once a dependency has been found through a fallback, it should # be used for the rest of the Meson run. # 'default_options' is only used in fallback case - if key in ('version', 'native', 'required', 'fallback', 'allow_fallback', 'default_options'): + # 'not_found_message' has no impact on the dependency lookup + # 'include_type' is handled after the dependency lookup + if key in ('version', 'native', 'required', 'fallback', 'allow_fallback', 'default_options', + 'not_found_message', 'include_type'): continue # All keyword arguments are strings, ints, or lists (or lists of lists) if isinstance(value, list): diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index eadb6b4..c67e840 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1538,6 +1538,7 @@ external dependencies (including libraries) must go to "dependencies".''') elif name == 'openmp': FeatureNew.single_use('OpenMP Dependency', '0.46.0', self.subproject) + # When adding kwargs, please check if they make sense in dependencies.get_dep_identifier() @FeatureNewKwargs('dependency', '0.57.0', ['cmake_package_version']) @FeatureNewKwargs('dependency', '0.54.0', ['components']) @FeatureNewKwargs('dependency', '0.52.0', ['include_type']) |