switch gui_app deprecation to FeatureDeprecatedKwargs

The deprecation message for "gui_app" is appearing for every target
rather than just once, and even if the required version is older
than 0.56.0.  Use @FeatureDeprecatedKwargs to fix both issues.
pull/7873/head
Paolo Bonzini 5 years ago committed by Dylan Baker
parent faabbb3bb2
commit df29f760dd
  1. 1
      mesonbuild/build.py
  2. 1
      mesonbuild/interpreter.py

@ -929,7 +929,6 @@ This will become a hard error in a future Meson release.''')
# was not specified and win_subsystem should be used instead.
self.gui_app = None
if 'gui_app' in kwargs:
mlog.deprecation('The gui_app kwarg is deprecated, use win_subsystem instead.')
if 'win_subsystem' in kwargs:
raise InvalidArguments('Can specify only gui_app or win_subsystem for a target, not both.')
self.gui_app = kwargs['gui_app']

@ -3874,6 +3874,7 @@ external dependencies (including libraries) must go to "dependencies".''')
@FeatureNewKwargs('executable', '0.42.0', ['implib'])
@permittedKwargs(permitted_kwargs['executable'])
@FeatureDeprecatedKwargs('executable', '0.56.0', ['gui_app'], extra_message="Use 'win_subsystem' instead.")
def func_executable(self, node, args, kwargs):
return self.build_target(node, args, kwargs, ExecutableHolder)

Loading…
Cancel
Save