Dylan Baker
11fbaf29d8
interpreter: fix cases of `KwargInfo(..., T, default=None)`
...
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
3 years ago
Dylan Baker
3f5d80b8bb
interpreter: fix name of typed_kwargs for `test()`
...
There was a copy-n-paste error here, and it was benchmark instead.
3 years ago
Dylan Baker
aa895b383c
interpreter: Add a helper for checking constrained inputs
...
This is quite valuable for enum-like inputs, where only a certain set
of values is allowed.
3 years ago
Rihards Skuja
4523e9d288
interpreter: fix IndexError when specifying dependency 'include_type'
...
Exception is thrown when dependency name is empty and when its
'include_type' differs from the default one.
Regression from b6d754a40c
.
3 years ago
Tristan Partin
959e1bb2e3
Add typed_kwargs to add_languages()
3 years ago
Eli Schwartz
db04a3f5f2
Fix incomplete guidance on solving sandbox violations
...
We recommend people use declare_dependency and access it via
dependency() in a parent project. But this requires a wrap file (or to
use override_dependency and an explicit subproject call).
Let's actually mention that.
Fixes #9146
3 years ago
Dylan Baker
35dbf7e6d4
interpreter: fix overload for `source_strings_to_files`
3 years ago
Xavier Claessens
8c5aa031b5
Add install tags
...
Fixes : #7007 .
3 years ago
Dylan Baker
aca2192471
interpreter: fix `source_strings_to_files` annotations
...
It's missing a required overload declaration
3 years ago
Tristan Partin
1dc13e9951
Add unset_variable()
...
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
3 years ago
Xavier Claessens
a2f110ff77
interpreter: Fix holder_map not being updated when subproject fails
...
Fixes : #9038
3 years ago
Jussi Pakkanen
3340d373fb
Revert "interpreter: Fix holder_map not being updated when subproject fails"
...
This reverts commit 566383c727
.
3 years ago
Xavier Claessens
27b319526c
interpreter: Fix spurious warning in configure_data()
...
This is a regression when porting to typed_pos_args().
3 years ago
Xavier Claessens
5462ea921f
interpreter: Fix missing subsubproject summary when subproject fails
...
In the case main->subp->subsubp, if subsubp succeed to configure but
subp subsequentially fails, subsubp is still being built but its summary
was missing.
3 years ago
Xavier Claessens
566383c727
interpreter: Fix holder_map not being updated when subproject fails
...
Fixes : #9038
3 years ago
Felix Schwarz
53ce1610a6
fix spelling error in user output ("depencency" -> "dependency")
3 years ago
Dylan Baker
d1b52b913f
interpreter: split keyword definitions out of the interpreter
3 years ago
Xavier Claessens
0183954ea1
Fix meson.version().version_compare() regression in subproject
3 years ago
Dylan Baker
a881e849b5
modules/python: simplify a number of interfaces
...
Including not calling back into `Interpreter.func_*`, which is not a
good idea both from a type saftey and perforamance point of view.
Instead there's now a shared _impl method
3 years ago
Dylan Baker
f459c0e918
interpreter: remove stringArgs uses
...
It's only used now on a files that always raises an exception anyway,
might as well just not do any checking and reduces the uses of that
function
3 years ago
Dylan Baker
52c68ca6fe
interpreter: use typed_pos_args for files
3 years ago
Dylan Baker
011f13bcdc
interpreter: use typed_pos_args for add_langauges
3 years ago
Dylan Baker
011b58d75f
interpreter: use typed_pos_args for project
3 years ago
Dylan Baker
015e44014a
interpreter: use typed_pos_args for subdir
3 years ago
Dylan Baker
3f6afa2693
interpreter: use typed_pos_args for assert
3 years ago
Dylan Baker
2486938011
interpreter: use typed_pos_args for subproject
3 years ago
Dylan Baker
9f07a1ad41
interpreter: use typed_pos_args for get_option
3 years ago
Dylan Baker
6f6db0f2e3
interpreter: use typed_pos_args configuration_data
3 years ago
Dylan Baker
982973f303
interpreter: use typed_pos_args for alias_target
3 years ago
Dylan Baker
09d7da19c1
interpreter: use typed_kwargs for include_directories
3 years ago
Dylan Baker
3135b130b8
interpreter: use typed_pos_args for include_directories
3 years ago
Dylan Baker
5aed9dd939
interpreter: use typed_pos_args for add_test_setup
3 years ago
Dylan Baker
e71a6544c5
interpreter: use typed_pos_args for join_paths
3 years ago
Dylan Baker
9ecd578167
interpreter: use typed_pos_args for set_variable
3 years ago
Dylan Baker
20c5dfe869
interpreter: use typed_pos_args for get_variable
3 years ago
Dylan Baker
4d05f9d64b
interpreter: use typed_pos_args for is_variable
3 years ago
Dylan Baker
30a9bb60ee
interpreter: use typed_pos_args for is_disabler
3 years ago
Eli Schwartz
bd6f46e723
condense lines
3 years ago
Eli Schwartz
dd31891c1f
more f-strings too complex to be caught by pyupgrade
3 years ago
Daniel Mensinger
971a0b1775
fix: get_variable default variables are not ObjectHolders ( fixes #8936 )
3 years ago
Dylan Baker
bc4201a7f1
interpreter: add required and disabled to import
...
This is useful both from the perspective of optional functionality that
requires a module, and also as I continue to progress with Meson++,
which will probably not implement all of the modules that Meson itself
does.
3 years ago
Dylan Baker
4a0a6a8083
modules: modules need to return either an ExtensionModlue or a
...
NewExtensionModule object
So that we get the found() method.
3 years ago
Dylan Baker
351a1e9ec9
interpreter: use typed_pos_args for func_import
...
and make the helper method private
3 years ago
Simon Ser
1f3adc4dbe
Add feed arg to custom_target()
3 years ago
Daniel Mensinger
3e396b3782
fix: Always explicitly set encoding for text files ( fixes #8263 )
3 years ago
Daniel Mensinger
8f7343831b
refactor: Refactor BothLibraries logic
...
This commit introduces a new type of `HoldableObject`: The
`SecondLevelHolder`. The primary purpose of this class is
to handle cases where two (or more) `HoldableObject`s are
stored at the same time (with one default object). The
best (and currently only) example here is the `BothLibraries`
class.
3 years ago
Daniel Mensinger
3f889606c7
Split compiler detection from Environment
...
This moves all the compiler detection logic into the new
compilers.detect module. This dramatically reduces the size
and complexity of Environment.
3 years ago
Xavier Claessens
0bef89b0c2
interpreter: Empty list used to be allowed in install_headers/man
...
That change introduced when porting to @typed_pos_args breaks gtk4. We
could decide to deprecate/warn but should not error for backward
compatibility.
3 years ago
Daniel Mensinger
0c4dd81c4d
fix: Handling BothLibraries objects ( fixes #8907 )
3 years ago
Dylan Baker
d636b92c1a
install_*: FileMode doesn't need to be None
...
There's no reason to allow None into the backend, it already has code to
check that all of the values of the FileMode object are None, so let's
use that, which is much simpler all the way down.
3 years ago