aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase.py
AgeCommit message (Collapse)AuthorFilesLines
2019-08-12Add is_disabler functionJames Hilliard1-1/+1
This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-07-23meson: handle nested disablerMarc-André Lureau1-8/+13
Fixes #5659
2019-04-29Address code reviewDaniel Mensinger1-1/+1
2019-04-29Fix flake8-bugbear warningsDaniel Mensinger1-1/+1
2019-04-23ast: support elementary object methodsDaniel Mensinger1-0/+18
2019-03-18interpreterbase: protect string division with FeatureNewPaolo Bonzini1-7/+18
Meson is not warning if you join paths with / but you are requesting a version older than 0.49.0; fix this before adding more features to the division operator. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-01-29correct naming to CudaCompiler, pep8Michael Hirsch, Ph.D1-1/+1
2019-01-22InterpreterBase: Fix extracting the node in all method/function callsXavier Claessens1-21/+14
Closes: #4813.
2019-01-22Interpreter: Set self.current_node during method/function callsXavier Claessens1-0/+8
The current node is useful to pass as location kwarg to mlog.warning(). The node is not passed to InterpreterObject method arguments, and it's easier to have it on the object than passing it through argument everywhere.
2019-01-16Fix flake8 errorsXavier Claessens1-1/+0
2018-12-07Error out if kwargs dict contains a kwargs entry.Jussi Pakkanen1-1/+3
Yo dawg! We heard U don't like kwargs in kwargs, so we made it impossible to put kwargs in your kwargs so now you can't kwargs with your kwargs.
2018-12-04Can specify keyword arguments with a dict.Jussi Pakkanen1-1/+15
2018-11-02Make string division do path joining.Jussi Pakkanen1-3/+10
2018-10-23Add 'disabler' argument to functions returning not-found objectsXavier Claessens1-0/+11
When dependency(), find_library(), find_program(), or python.find_installation() return a not-found object and disabler is true, they return a Disabler object instead.
2018-10-04Interpreter: Add 'continue' and 'break' keywordsXavier Claessens1-2/+22
Closes: #3601
2018-10-04Interpreter: Add "in" and "not in" operatorsXavier Claessens1-0/+19
Closes: #3600
2018-08-14interpreter: Add support for dict additionXavier Claessens1-4/+10
2018-08-11Clarify the FeatureNew summary messageNirbheek Chauhan1-1/+1
Fixes https://github.com/mesonbuild/meson/issues/3858
2018-08-11Skip FeatureNew checks when project() has not been parsedNirbheek Chauhan1-0/+3
Fixes https://github.com/mesonbuild/meson/issues/3944
2018-07-07Print a more usable message when a subproject fails to configureNirbheek Chauhan1-1/+1
Instead of just printing the message in the exception, if it's a MesonException, also print the file and the line number. If it's an unknown exception, print the entire traceback so that we can pin-point what the Meson bug causing it is.
2018-07-07Add new method: mlog.deprecation()Nirbheek Chauhan1-2/+3
Instead of constructing it manually, use a helper.
2018-07-02FeatureNew: Make all checks subproject-specificNirbheek Chauhan1-98/+111
We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
2018-07-02FeatureNew: Declare functions as class methods explicitlyNirbheek Chauhan1-6/+10
2018-07-02FeatureNew: Minor code cleanup, no changesNirbheek Chauhan1-42/+41
Early return reduces indentation level and makes the code easier to read.
2018-07-02Remove permittedSnippetKwargs, snippets are not specialNirbheek Chauhan1-4/+12
All we needed to do was change _get_callee_args() to also support snippets.
2018-07-02Various bug fixes for FeatureNewSalamandar1-20/+42
* Use _get_callee_args to unwrap function call arguments, needed for module functions. * Move some FeatureNewKwargs from build.py to interpreter.py * Print a summary for featurenew only if conflicts were found. The summary now only prints conflicting features. * Report and store featurenew/featuredeprecated only once * Fix version comparison: use le/ge and resize arrays to not fail on '0.47.0>=0.47' Closes https://github.com/mesonbuild/meson/issues/3660
2018-06-07Interpreter: Fix subdir_done() to exit from inside if/foreach blocksXavier Claessens1-3/+4
Closes: #3700.
2018-06-05FeatureNew: Print WARNING instead of ERRORNirbheek Chauhan1-2/+2
ERROR is reserved for non-zero exit codes. People will probably get confused.
2018-06-01Add 0.47.0 featuresSalamandar1-0/+1
2018-06-01Add Feature{New,Deprecated}Kwargs decoratorsSalamandar1-0/+30
2018-06-01Move target_version from coredata to mesonlibSalamandar1-3/+2
2018-06-01Add set instead of list for used features litsSalamandar1-4/+4
2018-06-01Cleanup : have more common code between FeatureNew and FeatureDeprecatedSalamandar1-18/+22
2018-06-01Split function wrapper from a use() methodSalamandar1-17/+22
2018-06-01Add version_compare_condition_with_{min,max} for specific comparison utils.Salamandar1-4/+56
Split FeatureNew and FeatureDeprecated Implement features report to be printed in some 'dev mode'
2018-06-01Add basic code for feature version detection:Salamandar1-0/+17
* store target version * Add empty method decorator
2018-05-21dict: fix CI issuesMathieu Duponchelle1-1/+1
2018-05-20dict: address review commentsMathieu Duponchelle1-2/+1
2018-05-20Add methods to the dict builtinKyrylo Shpytsya1-0/+39
Adds "has_key" and "get". Adapted and updated by Mathieu Duponchelle <mathieu@centricular.com>
2018-05-20Add new built-in type, dictMathieu Duponchelle1-15/+45
For now dicts are immutable, and do not expose any methods, they however support "native" syntax such as [] lookup, and foreach iterating, and can be printed.
2018-05-04Interpreter: don't flatten the arguments of various methodsMathieu Duponchelle1-19/+30
this fixes eg set_variable('foo', ['bar', 'baz']), which was previously erroring out complaining about the number of arguments. Closes #1481
2018-04-26interpreter: Verify permitted kwargs on all methodsXavier Claessens1-26/+33
2018-03-29Allow meson build file to exit early. (#2808)behlec1-0/+5
2018-03-13Merge pull request #3127 from bluetech/method-permitted-kwargsJussi Pakkanen1-0/+16
2018-03-03Fix remaining flake8 reportJon Turney1-1/+1
$ flake8 ./mesonbuild/interpreterbase.py:411:13: F821 undefined name 'set_variable' This looks like an actual bug which would affect disabler use :)
2018-02-23Warn if non-permitted keyword arguments are given to compiler methodsRan Benita1-0/+16
This can help future generations avoid mistakes like this: https://github.com/xkbcommon/libxkbcommon/commit/edb1c662394578a54b7bbed231d918925e5d8150 To avoid breaking builds, this is currently just an error. After sufficient time has passed this can hopefully become a hard error, similarly to the already-existing `permittedKwargs` warnings.
2018-02-15Add source location to warning for comparing different typesJon Turney1-2/+2
2018-02-15Fix test cases/failing/52 inconsistent comparisonJon Turney1-4/+15
Since PR #2884, this is failing with an exception Keep the behaviour we have had since PR #1810 (0.41.0), that ordering comparisons of different types fail with an InterpreterException. Also warn about equality comparisons of different types, which will one day become an error, as per PR #2884.
2018-02-01Comparing objects of different type prints a warning. Closes #2870.Jussi Pakkanen1-5/+7
2018-01-30Report warning/error locations in a format IDEs may already know how to parseJon Turney1-1/+1
Examples: meson.build:2:0: ERROR: Dependency is both required and not-found meson.build:4: WARNING: Keyword argument "link_with" defined multiple times. These are already matched by the default compilation-error-regexp-alist in emacs. Also: Don't start 'red' markup until after the \n before an error Unabsorb full-stop at end of warning with location from mlog.warning() Update warning_location test