fchin
4e460f04f3
Fixed issue that the key's value type wasn't checked correctly.
...
Added two new failing tests.
2019-11-12 09:21:10 -05:00
franczc
adb4e071e6
Adding dictionary entry using string variable as key.
2019-11-12 09:21:10 -05:00
Wolfgang Stöggl
f037e7ef45
Fix typos found by codespell
...
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
James Hilliard
2b6c997e33
Return a disabler when an unknown method is called on a disabler object
2019-10-24 23:57:31 +03:00
Jussi Pakkanen
34ea71239d
Merge pull request #6011 from xclaesse/not-disabler
...
Fix `if not disabler()` case
2019-10-10 00:47:17 +03:00
Niklas Claesson
b8fbbf5964
Make parser errors print relative path to meson.build file
2019-10-10 00:40:30 +03:00
Xavier Claessens
9855b2d3c5
Test disabler in foreach loops
...
The is_disabler() check in evaluate_foreach() was useless because we
already checked that items is a list.
2019-10-08 12:11:56 -04:00
Xavier Claessens
1930fc82e2
Fix `if not disabler()` case
...
Closes : #6010
2019-10-08 11:12:29 -04:00
James Hilliard
b21fd95f73
Add is_disabler function
...
This is useful if one needs to check if a variable is a disabler.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-08-12 01:05:45 +03:00
Marc-André Lureau
3811101434
meson: handle nested disabler
...
Fixes #5659
2019-07-23 08:46:26 -07:00
Daniel Mensinger
5ec79185a0
Address code review
2019-04-29 12:23:13 +02:00
Daniel Mensinger
2b5831f94f
Fix flake8-bugbear warnings
2019-04-29 12:22:50 +02:00
Daniel Mensinger
75b7a856cd
ast: support elementary object methods
2019-04-23 09:10:47 +02:00
Paolo Bonzini
7a02b76e70
interpreterbase: protect string division with FeatureNew
...
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-03-18 10:51:44 -07:00
Michael Hirsch, Ph.D
4e31ca3abe
correct naming to CudaCompiler, pep8
2019-01-29 22:06:11 +02:00
Xavier Claessens
4b4f642e6a
InterpreterBase: Fix extracting the node in all method/function calls
...
Closes : #4813 .
2019-01-22 16:12:15 -05:00
Xavier Claessens
90d1f38d8e
Interpreter: Set self.current_node during method/function calls
...
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-22 12:33:12 -05:00
Xavier Claessens
83766b3687
Fix flake8 errors
2019-01-16 11:16:46 -05:00
Jussi Pakkanen
95c620db67
Error out if kwargs dict contains a kwargs entry.
...
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-07 21:35:26 +02:00
Jussi Pakkanen
58b838a80b
Can specify keyword arguments with a dict.
2018-12-04 23:44:17 +02:00
Jussi Pakkanen
23ed0e1857
Make string division do path joining.
2018-11-02 21:02:25 +02:00
Xavier Claessens
61348da069
Add 'disabler' argument to functions returning not-found objects
...
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-23 22:09:55 +03:00
Xavier Claessens
a816e1c1fa
Interpreter: Add 'continue' and 'break' keywords
...
Closes : #3601
2018-10-04 20:14:37 -04:00
Xavier Claessens
fa2e096aa0
Interpreter: Add "in" and "not in" operators
...
Closes : #3600
2018-10-04 20:14:37 -04:00
Xavier Claessens
4f088365e4
interpreter: Add support for dict addition
2018-08-14 23:46:42 +03:00
Nirbheek Chauhan
f80c11e7ee
Clarify the FeatureNew summary message
...
Fixes https://github.com/mesonbuild/meson/issues/3858
2018-08-11 09:15:05 -07:00
Nirbheek Chauhan
43ececb036
Skip FeatureNew checks when project() has not been parsed
...
Fixes https://github.com/mesonbuild/meson/issues/3944
2018-08-11 09:15:05 -07:00
Nirbheek Chauhan
2093d45a4e
Print a more usable message when a subproject fails to configure
...
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-07 04:33:24 -07:00
Nirbheek Chauhan
4fb00ee1d8
Add new method: mlog.deprecation()
...
Instead of constructing it manually, use a helper.
2018-07-07 04:33:24 -07:00
Nirbheek Chauhan
a1d9adba09
FeatureNew: Make all checks subproject-specific
...
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-02 19:52:53 +05:30
Nirbheek Chauhan
cd1d53ee75
FeatureNew: Declare functions as class methods explicitly
2018-07-02 07:05:08 +00:00
Nirbheek Chauhan
18cd3bd31a
FeatureNew: Minor code cleanup, no changes
...
Early return reduces indentation level and makes the code easier to
read.
2018-07-02 07:05:08 +00:00
Nirbheek Chauhan
817dcaa23b
Remove permittedSnippetKwargs, snippets are not special
...
All we needed to do was change _get_callee_args() to also support
snippets.
2018-07-02 07:05:08 +00:00
Salamandar
df1970d3ad
Various bug fixes for FeatureNew
...
* 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-07-02 07:05:08 +00:00
Xavier Claessens
2d3bfa0778
Interpreter: Fix subdir_done() to exit from inside if/foreach blocks
...
Closes : #3700 .
2018-06-07 12:56:27 +00:00
Nirbheek Chauhan
dff1d8eccf
FeatureNew: Print WARNING instead of ERROR
...
ERROR is reserved for non-zero exit codes. People will probably get
confused.
2018-06-05 15:57:57 +00:00
Salamandar
c5e85e59cc
Add 0.47.0 features
2018-06-01 14:23:24 +02:00
Salamandar
00c4cf7d45
Add Feature{New,Deprecated}Kwargs decorators
2018-06-01 14:23:24 +02:00
Salamandar
dd91f96867
Move target_version from coredata to mesonlib
2018-06-01 14:23:24 +02:00
Salamandar
b9c37e4fd2
Add set instead of list for used features lits
2018-06-01 14:23:24 +02:00
Salamandar
4978dc0124
Cleanup : have more common code between FeatureNew and FeatureDeprecated
2018-06-01 14:23:24 +02:00
Salamandar
806ab181f2
Split function wrapper from a use() method
2018-06-01 14:23:24 +02:00
Salamandar
ae19fec952
Add version_compare_condition_with_{min,max} for specific comparison utils.
...
Split FeatureNew and FeatureDeprecated
Implement features report to be printed in some 'dev mode'
2018-06-01 14:23:24 +02:00
Salamandar
ee2f8a0416
Add basic code for feature version detection:
...
* store target version
* Add empty method decorator
2018-06-01 14:23:24 +02:00
Mathieu Duponchelle
10e7566ed8
dict: fix CI issues
2018-05-21 00:19:31 +02:00
Mathieu Duponchelle
195c356f91
dict: address review comments
2018-05-20 22:36:18 +02:00
Kyrylo Shpytsya
09dc48d941
Add methods to the dict builtin
...
Adds "has_key" and "get".
Adapted and updated by Mathieu Duponchelle <mathieu@centricular.com>
2018-05-20 21:19:44 +02:00
Mathieu Duponchelle
ecb8838082
Add new built-in type, dict
...
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-20 21:19:44 +02:00
Mathieu Duponchelle
f1c92d7c9c
Interpreter: don't flatten the arguments of various methods
...
this fixes eg set_variable('foo', ['bar', 'baz']), which
was previously erroring out complaining about the number
of arguments.
Closes #1481
2018-05-04 15:24:21 +00:00
Xavier Claessens
10a9bdad96
interpreter: Verify permitted kwargs on all methods
2018-04-26 00:01:48 +03:00