convert more mlog.deprecation into FeatureDeprecated

pull/9488/head
Eli Schwartz 3 years ago
parent 4a65f3dead
commit dbb109703e
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 5
      mesonbuild/build.py
  2. 3
      mesonbuild/modules/gnome.py

@ -40,7 +40,7 @@ from .compilers import (
is_known_suffix, detect_static_linker, detect_compiler_for
)
from .linkers import StaticLinker
from .interpreterbase import FeatureNew
from .interpreterbase import FeatureNew, FeatureDeprecated
if T.TYPE_CHECKING:
from ._typing import ImmutableListProtocol, ImmutableSetProtocol
@ -1421,7 +1421,8 @@ You probably should put it in link_with instead.''')
if os.path.dirname(pchlist[0]) != os.path.dirname(pchlist[1]):
raise InvalidArguments('PCH files must be stored in the same folder.')
mlog.warning('PCH source files are deprecated, only a single header file should be used.')
FeatureDeprecated.single_use('PCH source files', '0.50.0', self.subproject,
'Only a single header file should be used.')
elif len(pchlist) > 2:
raise InvalidArguments('PCH definition may have a maximum of 2 files.')
for f in pchlist:

@ -990,7 +990,8 @@ class GnomeModule(ExtensionModule):
scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), self.interpreter.subproject_dir, state.subproject)]
if '--warn-error' in scan_command:
mlog.deprecation('Passing --warn-error is deprecated in favor of "fatal_warnings" keyword argument since v0.55')
FeatureDeprecated.single_use('gnome.generate_gir argument --warn-error', '0.55.0',
state.subproject, 'Use "fatal_warnings" keyword argument')
if kwargs['fatal_warnings']:
scan_command.append('--warn-error')

Loading…
Cancel
Save