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
Xavier Claessens
e646130ef1
interpreter: Fix dependency(..., static: true) fallback
...
It should build the fallback subprject with default_library=static and
override the dependency for both static=True and static kwarg not given.
Fixes : #8050 .
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
abababfb93
interpreterobjects: fix Test annotations
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
272674e792
interpreter/compiler: make helper methods protected
3 years ago
Dylan Baker
b30dddd4e5
interpreter/compiler: Add type checking for the Compiler object
...
This adds a full set of `typed_pos_args` and `typed_kwarg` decorations,
as well as fixing all of the typing errors reported by mypy.
3 years ago
Dylan Baker
bcb5400e34
interpreter/compiler: Add type annotations to TryRunResultHolder
3 years ago
Dylan Baker
7dda90f1bf
interpreter/compiler: remove unittest_args method
...
It's not documented, and it's been marked deprecated for who knows how
long.
3 years ago
Dylan Baker
32d3b5c9e2
interpreter/compiler: Replace permittedKwargs({}) with noKwargs
...
The former isn't really correct, as it wants a set and is getting a
dict, the other is also conceptually clearer I think.
3 years ago
Dylan Baker
a1fb3199c8
interpreterobjects: Add TypedDict annoations for `extract_search_dirs`
...
This allows for more accurate type checking
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
Xavier Claessens
943596abbb
Fix --force-fallack-for with --wrap-mode=nofallback
...
Fixes : #9065
3 years ago
Felix Schwarz
53ce1610a6
fix spelling error in user output ("depencency" -> "dependency")
3 years ago
Dylan Baker
f4a1da0145
interpreterbase/decorators: use a named function for lowering strings
...
Mypy gets confused by the lambda, so we might as well just use a named
function.
3 years ago
Dylan Baker
2307cbd2ac
interpreter/typing: Add some type annotations
...
We really need PEP464 to annotate many fo thse correctly, but until then
we can manually annotate many of them to fix typing issues.
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
Eli Schwartz
c4f5f6364e
pyupgrade
3 years ago