diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-13 21:34:41 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-14 20:16:48 +0200 |
commit | 268d900ed139ad9f5f8f03861417db4c15ebe400 (patch) | |
tree | 38835c94a36312d7c5b9107118923765e592f5e0 /mesonbuild/interpreter.py | |
parent | 81100f0695c595f4c0020034284846cea7e8e6aa (diff) | |
download | meson-removedepr.tar.gz |
Removed two deprecations from 2016.removedepr
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index c30c00f33..dfef87d28 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1,4 +1,4 @@ -# Copyright 2012-2017 The Meson development team +# Copyright 2012-2018 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -36,8 +36,6 @@ from collections import namedtuple import importlib -run_depr_printed = False - def stringifyUserArguments(args): if isinstance(args, list): return '[%s]' % ', '.join([stringifyUserArguments(x) for x in args]) @@ -2127,7 +2125,7 @@ to directly access options of other subprojects.''') return progobj def func_find_library(self, node, args, kwargs): - mlog.log(mlog.red('DEPRECATION:'), 'find_library() is removed, use the corresponding method in compiler object instead.') + raise InvalidCode('find_library() is removed, use the corresponding method in a compiler object instead.') def _find_cached_dep(self, name, kwargs): # Check if we want this as a cross-dep or a native-dep @@ -2436,15 +2434,8 @@ root and issuing %s. @permittedKwargs(permitted_kwargs['run_target']) def func_run_target(self, node, args, kwargs): - global run_depr_printed if len(args) > 1: - if not run_depr_printed: - mlog.log(mlog.red('DEPRECATION'), 'positional version of run_target is deprecated, use the keyword version instead.') - run_depr_printed = True - if 'command' in kwargs: - raise InterpreterException('Can not have command both in positional and keyword arguments.') - all_args = args[1:] - deps = [] + raise InvalidCode('Run_target takes only one positional argument: the target name.') elif len(args) == 1: if 'command' not in kwargs: raise InterpreterException('Missing "command" keyword argument') |