aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreterobjects.py
AgeCommit message (Collapse)AuthorFilesLines
2022-02-01interpreter: support for forcibly verbose logging of some testsPaolo Bonzini1-1/+2
Add a new keyword argument to test() and benchmark(), completing the implementation of the feature. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-23interpreterobjects: Don't warn on set10(bool)Dylan Baker1-1/+4
Python inherited a really bad design from C, booleans happen to be ints. Which is awful, but it's true. Fixes: #9858
2022-01-18interpreterobjects: deprecated passing a number to configuration_data.set10Dylan Baker1-0/+8
This is currently allowed, and is used in at least a few projects. It was not intended to work or documented, but it does and since it is in use a full deprecation period must be used. A warning has also been added for values < 0, which have surprising behavior.
2022-01-18interpreterobjects: remove no-flattening from configuraiton_data.getDylan Baker1-1/+0
It's no longer required because we don't allow arrays as fallbacks anymore.
2022-01-18interpreterobjects: don't allow keyword arguments in configuration_data.keysDylan Baker1-0/+1
Which do nothing, and shouldn't be allowed.
2022-01-18interpreter: replace ConfigurationDataObject with ConfigurationDataHolderDylan Baker1-28/+22
This is much cleaner, and more in line with the way we handle interpreter objects in modern meson practice
2022-01-18interpreterobjects: clean up ConfigurationData initializerDylan Baker1-4/+2
2022-01-18interpreterobjects: use typed_* for configuration_data.set*Dylan Baker1-43/+23
This removes the ability to use ConfigurationData as a dict, but restricting the inputs to `str | int | bool`. This may be a little too soon for this, and we may want to wait on that part, it's only bee 8 months since we started warning about this.
2022-01-18interpreterobjects: use typed_* with configuration_data.merge_fromDylan Baker1-7/+5
2022-01-18interpreterobjects: use typed_* with configuration_data.get_unquotedDylan Baker1-7/+5
2022-01-18interpreterobjects: use typed_args for configuration_data.getDylan Baker1-12/+6
2022-01-18interpreterobjects: use typed_pos_args and noKwargs for configuration.data.hasDylan Baker1-1/+3
2022-01-18interpreterobjects: use typed_kwargs for dependency.get_variableDylan Baker1-8/+20
2022-01-18interpreterobjects: use typed_kwargs for dependency.get_pkgconfig_variableDylan Baker1-2/+12
2022-01-18dependencies: don't pass kwargs from get_pkgconfig_variableDylan Baker1-1/+1
This is a layering violation, we're relying on the way the interpreter handles keyword arguments. Instead, pass them as free variables, destructuring in the interpreter
2022-01-18interpreterobjects: use typed_kwargs for FeatureOption.requireDylan Baker1-10/+9
2022-01-18interpreterobjects: use typed_pos_args for FeatureOpotionDylan Baker1-10/+4
2022-01-18interpreterobjects: use typed_pos_args for dependency.as_system_methodDylan Baker1-11/+3
2022-01-18interpreterobjects: use typed_pos_args for dependency.get_configtool_variableDylan Baker1-8/+3
2022-01-18interpreterobjects: use typed_pos_args for dependency.get_pkgconfig_variableDylan Baker1-8/+3
2022-01-18interpreterobjects: consistently use dependency. for error messagesDylan Baker1-16/+16
We currently use a mixture of dependency, Dependency, and dep
2021-12-17Fix mypy errorsDaniel Mensinger1-0/+1
2021-12-06interpreter: use build.GeneratedTypesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-06interpreter: allow extract_objects to receive generated sourcesPaolo Bonzini1-2/+2
Fixes: #8333
2021-12-01add install_symlink functionPablo Correa Gómez1-0/+3
Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
2021-11-30fix broken FeatureNew checks that never printedEli Schwartz1-2/+2
They passed the arguments in the wrong order, so the version parsed as the message and the message parsed as a version. While we are at it, pass the location node in too.
2021-11-25interpreter: fix `feature.require` handling of error messageBenoit Pierre1-1/+2
Don't show a blank error when no `error_message` was passed as argument.
2021-11-01various manual conversion of percent-formatted strings to f-stringsEli Schwartz1-5/+5
2021-10-30Typo fixes (CustomTaget -> CustomTarget)rusty-snake1-1/+1
2021-10-10Fix typos discovered by codespellChristian Clauss1-2/+2
2021-10-08add install_emptydir functionEli Schwartz1-0/+3
This replaces the absolute hack of using ``` install_subdir('nonexisting', install_dir: 'share') ``` which requires you to make sure you don't accidentally or deliberately have a completely different directory with the same name in your source tree that is full of files you don't want installed. It also avoids splitting the name in two and listing them in the wrong order. You can also set the install mode of each directory component by listing them one at a time in order, and in fact create nested structures at all. Fixes #1604 Properly fixes #2904
2021-10-04remove f from f-string that has no formattingEli Schwartz1-1/+1
2021-09-25Remove helpers.check_stringlist()Daniel Mensinger1-10/+13
2021-09-01interpreter: Remove permissive from _unholderDaniel Mensinger1-3/+3
2021-08-31pylint: enable unnecessary-not checkDylan Baker1-1/+1
This finds things like ```python if not x == 1: ``` which should be ```python if x != 1: ```
2021-08-30interpreter: rename EnvironmentVariablesObject -> EnvironmentVariablesHolderDylan Baker1-3/+3
This is more consistent with other Holder classes
2021-08-30interpreterobjects: Use typed_kwargs for EnvironmentVariablesObjectDylan Baker1-24/+19
2021-08-30make EnvironmentVariablesObject a proper holderDylan Baker1-30/+14
Currently, EnvironmentVariablesObject is a strange holder-that's-not-a-holder. This has implicaitons for things that expect to get an EnvironmentVariables object, as we can't automatically unholder it, and instead have to to manually do so. Now we can automatically unholder it, which makes everything much nicer.
2021-08-30Allow EnvironmentVariablesObject to be passed an EnvironmentVariables instanceDylan Baker1-1/+3
2021-08-27interpreter: fix cases of `KwargInfo(..., T, default=None)`Dylan Baker1-1/+2
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
2021-08-20interpreterobjects: fix Test annotationsDylan Baker1-3/+6
2021-08-16interpreterobjects: Add TypedDict annoations for `extract_search_dirs`Dylan Baker1-1/+1
This allows for more accurate type checking
2021-07-05more f-strings too complex to be caught by pyupgradeEli Schwartz1-2/+2
2021-07-05pyupgradeEli Schwartz1-1/+1
2021-07-02Flatten test suite valueTristan Partin1-2/+2
This behavior is more inline with the rest of Meson
2021-07-02fix: get_variable default variables are not ObjectHolders (fixes #8936)Daniel Mensinger1-2/+2
2021-06-26refactor: Refactor BothLibraries logicDaniel Mensinger1-2/+4
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-22fix: Handling BothLibraries objects (fixes #8907)Daniel Mensinger1-1/+2
2021-06-21fix: Ensure that build targets have all methods from ExternalProgramDaniel Mensinger1-8/+17
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-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger1-287/+261