aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-10-14 23:53:34 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-10-15 14:38:44 -0400
commitf52a5a7cd3f30645c1b746488ec921451545d9b6 (patch)
treef834e5af33c8968146d461a1bfa6cecdef634f01 /mesonbuild/interpreter/interpreter.py
parenta3f3ddf581b7dd07d8e48ac0ad32d0234ae9dd9e (diff)
downloadmeson-f52a5a7cd3f30645c1b746488ec921451545d9b6.zip
meson-f52a5a7cd3f30645c1b746488ec921451545d9b6.tar.gz
meson-f52a5a7cd3f30645c1b746488ec921451545d9b6.tar.bz2
wrap: move FeatureNew checks to a more natural place
Now, warnings are unconditionally raised when parsing the wrap file, whether they are used or not. That being said, these warnings literally just check for a couple of keys used in the .wrap ini file. Moving these checks from the time of use to the time of loading, means that we no longer report warnings only when originally downloading or extracting the file or VCS repo. It also means we no longer report warnings in one subproject, when a wrap file is picked up from a different subproject because the first subproject actually does a dependency lookup. This caused issues for the WrapDB tooling, which uses patch_directory everywhere and the superproject requires a suitable minimum version of meson for this... but individual wraps might use a much lower version, and would then raise a warning (in strict mode, converted to an error) when it resolved a dependency from another WrapDB project. Fixes #9118
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index ba6bf11..bbe89fa 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -799,7 +799,7 @@ external dependencies (including libraries) must go to "dependencies".''')
r = self.environment.wrap_resolver
try:
- subdir = r.resolve(subp_name, method, self.subproject)
+ subdir = r.resolve(subp_name, method)
except wrap.WrapException as e:
if not required:
mlog.log(e)
@@ -1107,7 +1107,7 @@ external dependencies (including libraries) must go to "dependencies".''')
wrap_mode = self.coredata.get_option(OptionKey('wrap_mode'))
if not self.is_subproject() or wrap_mode != WrapMode.nopromote:
subdir = os.path.join(self.subdir, spdirname)
- r = wrap.Resolver(self.environment.get_source_dir(), subdir, wrap_mode)
+ r = wrap.Resolver(self.environment.get_source_dir(), subdir, self.subproject, wrap_mode)
if self.is_subproject():
self.environment.wrap_resolver.merge_wraps(r)
else: