coredata: Invalidate deps cache when changing wrap_mode option

Fixes: #8858
pull/8607/merge
Xavier Claessens 3 years ago committed by Xavier Claessens
parent 636bf91586
commit d5917c1b87
  1. 9
      mesonbuild/coredata.py
  2. 3
      mesonbuild/mconf.py

@ -634,6 +634,15 @@ class CoreData:
if key.name == 'buildtype':
self._set_others_from_buildtype(value)
elif key.name in {'wrap_mode', 'force_fallback_for'}:
# We could have the system dependency cached for a dependency that
# is now forced to use subproject fallback. We probably could have
# more fine grained cache invalidation, but better be safe.
self.clear_deps_cache()
def clear_deps_cache(self):
self.deps.host.clear()
self.deps.build.clear()
def get_nondefault_buildtype_args(self):
result= []

@ -85,8 +85,7 @@ class Conf:
raise ConfException(f'Directory {build_dir} is neither a Meson build directory nor a project source directory.')
def clear_cache(self):
self.coredata.deps.host.clear()
self.coredata.deps.build.clear()
self.coredata.clear_deps_cache()
def set_options(self, options):
self.coredata.set_options(options)

Loading…
Cancel
Save