bd6f46e723
condense lines
2021-07-05 17:55:04 +03:00
dd31891c1f
more f-strings too complex to be caught by pyupgrade
2021-07-05 17:55:04 +03:00
c4f5f6364e
pyupgrade
2021-07-05 17:55:04 +03:00
ec5baa62c8
Merge pull request #8950 from dcbaker/submit/import-required-disabled
...
Add required and disabled to import, modules.found method
2021-07-03 14:00:47 +03:00
6f3f43bb2d
Flatten test suite value
...
This behavior is more inline with the rest of Meson
2021-07-02 21:58:22 +03:00
971a0b1775
fix: get_variable default variables are not ObjectHolders ( fixes #8936 )
2021-07-02 17:14:44 +03:00
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.
2021-06-30 16:28:14 -07:00
4a0a6a8083
modules: modules need to return either an ExtensionModlue or a
...
NewExtensionModule object
So that we get the found() method.
2021-06-30 14:07:26 -07:00
351a1e9ec9
interpreter: use typed_pos_args for func_import
...
and make the helper method private
2021-06-30 12:46:33 -07:00
1f3adc4dbe
Add feed arg to custom_target()
2021-06-29 20:54:13 +03:00
3e396b3782
fix: Always explicitly set encoding for text files ( fixes #8263 )
2021-06-29 11:28:08 +02:00
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.
2021-06-26 12:49:35 +02:00
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.
2021-06-25 19:34:48 +02:00
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.
2021-06-23 10:15:00 -04:00
6e0a0fd1da
Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functions
...
Add annotations for the various install_* functions
2021-06-23 01:00:59 +03:00
0e5f88baf4
Merge pull request #8912 from mensinda/fixBothLibraries
...
Fix `BothLibraries` processing
2021-06-23 00:54:58 +03:00
0c4dd81c4d
fix: Handling BothLibraries objects ( fixes #8907 )
2021-06-22 21:09:19 +02:00
39f25ec6aa
Merge pull request #8905 from mensinda/refactorFix
...
fix: Fix set_variable not holderifying (fixes #8904 )
2021-06-22 21:26:38 +03:00
a44c1d18c1
Merge pull request #8898 from e820/interpreter-required-arguments
...
interpreter: Add checked kwarg to compiler.get_supported_arguments
2021-06-22 09:50:24 -07:00
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.
2021-06-22 09:13:41 -07:00
7213b7d81f
interpreter: use typed_kwargs for install_man
2021-06-22 09:13:41 -07:00
7619f31f71
interpreter: man sections can be up to 9 on many platforms
...
Linux and FreeBSD use section 9 for kernel man pages, so we should allow
that.
2021-06-22 09:13:41 -07:00
9611bd8244
interpreter: use typed_pos_args for install_man
2021-06-22 09:13:41 -07:00
f4d2efbed3
interpreter: use typed_kwargs for install_headers
2021-06-22 09:13:41 -07:00
251dff56fb
interpreter: use typed_pos_args for install_headers
2021-06-22 09:13:41 -07:00
ea3d85a1c0
interpreter: use typed_kwargs for install_data
2021-06-22 09:13:41 -07:00
a551e76137
interpreter: use typed_pos_args for install_data
2021-06-22 09:13:41 -07:00
596c8d4af5
interpreter: use typed_kwargs for install_subdir
2021-06-22 09:12:54 -07:00
3d940fec98
interpreter: use typed_pos_args for install_subdir
2021-06-22 09:12:54 -07:00
a024f432dd
interpreter: add overload for source_strings_to_files
...
when only passing strings or Files we only get back Files. This is
useful for the install_* methods
2021-06-22 09:12:54 -07:00
281f5abee3
interpreter: Replace manual kwarg validation in compiler.get_supported_arguments with @typed_kwargs
2021-06-22 07:59:08 +02:00
5cd9f88d6c
fix: Ensure that build targets have all methods from ExternalProgram
...
As a side-effect from #8885 `find_program()` returns now `Executable`
objects when `meson.override_find_program` is called with an
executable target. To resolve this conflict the missing methods
from `ExternalProgram` are added to `BuildTarget`.
2021-06-21 20:19:06 +03:00
d5ed8f61a5
interpreter: Move argument checks from add_*_arguments to compiler.get_supported_arguments
2021-06-21 09:15:13 +02:00
e44587fc73
interpreter: Consider the compiler language before checking arguments
2021-06-21 09:15:13 +02:00
c9ad98ef5e
interprter: Add required kwarg to add_(project|global)_arguments
...
To avoid manual compiler support checks add_project_arguments and
add_global_arguments receive a new keyword argument to perform
them automatically.
2021-06-21 09:15:13 +02:00
a73791b529
fix: Fix strange holder_map bug in combination with subprojects
...
I was unable to reproduce this in a minimal test-case, so there
is currently no new test :(
2021-06-20 00:26:06 +02:00
f1ac7db2e6
fix: Fix set_variable not holderifying ( fixes #8904 )
2021-06-20 00:26:02 +02:00
7c757dff71
holders: Fix the remaining code to respect the holder changes
2021-06-18 23:48:33 +02:00
34c28dc92c
holders: remove unholder
2021-06-18 23:48:33 +02:00
84a3e459a8
holders: Introduce BothLibraries
2021-06-18 23:48:33 +02:00
c2c7f7c9d7
holders: Ensure that InterpreterBase is the sole instance for (un)holderifying
2021-06-18 23:48:33 +02:00
6879e84c48
holders: Move get_version from directly to ExternalProgram
2021-06-18 23:48:33 +02:00
66b32a4591
holders: Introduce HoldableObject
2021-06-18 23:48:33 +02:00
d601227cb2
interpreter: Add FileHolder and remove specical case for File
2021-06-18 23:48:33 +02:00
63ade7d937
interpreter: Add a new MesonInterpreterObject for non-elementary objects
2021-06-18 23:48:33 +02:00
202e345dfb
interpreter: Refactor interpreter.compiler to use ObjectHolder
2021-06-18 23:48:33 +02:00
2b09af834a
interpreter: Refactor ObjectHolder to extend InterpreterObject
2021-06-18 23:48:33 +02:00
2c08e55f85
typing: Import missing classes in interpreterobjects.py
2021-06-18 23:48:33 +02:00
3ec2cf9c60
interpreter: add type annotations to build_incdir_object
...
and use textwrap.dedent to make the very large messages more readable
and not break method folding.
2021-06-18 09:52:23 -07:00
5f3b73beb5
dependency: Empty fallback is the same as allow_fallback: false
2021-06-18 12:47:41 -04:00