aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-24backends/backends: recurse when looking for paths in bundled shared librariesDylan Baker1-0/+3
This previously worked because we were accidentally doing this via mutation. However, doing this via mutation is not a good way to do it, we should be explicit. Fixes #9542
2021-11-24build|backend: Fix some type annotationsDylan Baker2-8/+12
These currently say the take `Target`, but the really take `BuildTarget | CustomTarget | CustomTargetIndex`.
2021-11-24backends/backends: fix typo in commentDylan Baker1-1/+1
2021-11-24unittests: use UnitTest.addCleanup a bitDylan Baker1-11/+14
2021-11-23modules/gnome: import missing FeatureDeprecated for generate_girPablo Correa Gómez1-1/+1
Commit dbb109703e0b1f91965868c3ab193eff6e45eb22 broke generate_gir by using FeatureDeprecated without importing it.
2021-11-23interpreter: extract_objects provides a valid sourcePaolo Bonzini2-4/+11
This ensures that there is no warnings when running meson on test cases/common/22 object extraction. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-23rust: clean up inputs and outputs to bindgenPaolo Bonzini5-4/+50
Make the handling of bindgen inputs consistent with the inputs and outputs of source_strings_to_files. However, for the first source argument reject anything that cannot possibly be an header file. This also fixes a mypy failure from the next patch, since ExtractedObjects does not have a zero-argument get_outputs method. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-22qt module: fix stupid copy-paste errorEli Schwartz1-1/+1
As evidenced by the warning message immediately below this, I meant to write "5.15" here. As is, this will enable depfile support on too-old versions of moc.
2021-11-22simplify passing some nodes aroundEli Schwartz1-2/+2
Every function has a copy of the node as a kwarg, and doesn't need to go through the class's self.current_node.
2021-11-22ldc2: invoke -Oz instead of -OsDenis Feklushkin1-1/+1
2021-11-22unittests: cover cases here two of the same wrong type are providedDylan Baker1-1/+1
We don't want to get something like "expected array[str], but got array[int | int]", we really want `arrayp[int]`.
2021-11-22typed_kwargs: use | for type unions, not ,Dylan Baker3-7/+7
Python uses this syntax now, as does typescript and other languages
2021-11-22typed_kwargs: provide better error messages for wrong container typesDylan Baker3-5/+17
Currently, if you pass a `[]string`, but the argument expects `[]number`, then you get a message like `expected list[str] but got list`. That isn't helpful. With this patch arrays and dictionaries will both print messages with the types provided.
2021-11-22interpreter: use typed_kwargs for find_programDylan Baker2-10/+20
2021-11-22interpreter: use find_program_impl internally instead of func_find_programDylan Baker2-4/+4
Calling interpreter implementation methods is just a bad idea, apart from the extra type checking that goes into it, we need to pass more arguments than we need to calling the impl method.
2021-11-22interpreter: move disabler KwargInfo to the type_checking moduleDylan Baker2-1/+4
2021-11-22interpreter: use typed_pos_args for find_programDylan Baker1-8/+6
2021-11-22interpreter: add type annotations to find_program_implDylan Baker1-4/+8
2021-11-22interpreter: use typed_* args for the summary functionDylan Baker2-24/+28
This also includes a few type annotation cleans for the Summary object. Getting the positional arguments exactly right is impossible, as this is really a function with two different signatures: ``` summary(value: dictionary): void summary(key: string, value: any): void ``` We can get close enough in the typed_pos_args by enforcing that there are two parameters, one required and one optional, and that the first must be either a dictionary or a string.
2021-11-22interpreter: add typed_kwargs to subdirDylan Baker2-7/+30
2021-11-22interpreter: use typed_kwargs for projectDylan Baker3-28/+62
2021-11-22build: TestSetup.exe_wrapper doesn't need to be optionalDylan Baker1-1/+1
It works fine as-is with an empty list, and since that's easier to get using our typed_kwargs, and thus is what we're passing, go ahead and simplify the class to only take a list of strings.
2021-11-22interpreter: use typed_kwargs for add_test_setupDylan Baker2-32/+35
This also sets a few missing "new kwarg" warnings, as they're quite easy to set with typwed_kwargs
2021-11-22typed_kwargs: move some closures around to increase code clarityDylan Baker1-21/+24
The inner closure of the typed_kwargs function is already complicated enough without defining closures in the middle of a loop. Let's just pass the types_tuple as an argument to both avoid redefining the function over and over, and also make the whole thing easier to read.
2021-11-22run_single_test: honor the --use-tmpdir flagDylan Baker1-1/+1
2021-11-22run_single_test: fix running failing testsDylan Baker1-1/+10
2021-11-21Clarify some wording for compiler.first_supported_argumentLuke Drummond1-2/+3
After a discussion implementing this for muon [1] and clarification on IRC on Meson's behaviour. [1] https://lists.sr.ht/~lattis/muon/patches/26722
2021-11-21Make the generated reproducible .cmake files reproducible.Chris Lamb1-1/+1
Whilst working on the Reproducible Builds effort [0], I noticed that meson did not generate reproducible .cmake files: they include the full path name. This commit not only makes the build reproducible, but it also matches CMake's own behaviour. Specifically, CMakePackageConfigHelpers.cmake does the equivalent transformation using: get_filename_component(inputFileName "${_inputFile}" NAME) I originally filed this in Debian as bug #1000327 [1]. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/1000327
2021-11-21Support Visual Studio 2022 backendCrend King9-16/+92
2021-11-21Run pylintGustavoLCR1-28/+36
2021-11-21Fix vs backend cross compilation regressionGustavoLCR1-6/+15
2021-11-20dependencies/zlib: Allow for generic OS checksDudemanguy1-4/+1
Contrary to most system method checks, zlib currently functions as a whitelist of OSes. This isn't really needed however. The first special case for OSes that provide zlib as part of the base OS is worth keeping. However, the elif for windows is more than generic enough to allow any other potential OSes to try. Just make it a simplie if/else instead.
2021-11-20FeatureDeprecated: add a notice summary of future deprecationsEli Schwartz1-5/+30
Since these aren't warnings, per se, we don't note every single call site that has one. And we raise mlog.notice in non-fatal mode to avoid either: - being too threatening - making builds fail with --fatal-meson-warnings Nevertheless, it is useful to give people a heads-up that there is an upgrade opportunity, rather than waiting until they upgrade and then causing projects to begin printing fatal warnings.
2021-11-20add location nodes to some Feature callsEli Schwartz5-16/+23
2021-11-20Feature kwargs decorator: automatically report the nodes which trigger an issueEli Schwartz3-12/+14
2021-11-20add location support to feature checksEli Schwartz1-11/+14
mlog can already print location info, and we use this often -- including for custom feature warnings already. Make this work everywhere, so that it is feasible to move such custom warnings to globally tracked Features.
2021-11-20guard a complicated mlog.warning inside a Feature checkEli Schwartz2-5/+7
This is only relevant on certain versions of meson, so do not print it when meson_version is too low. The message itself is not precisely a deprecation warning, since ostensibly it may be an unlikely coding mistake. It is probably an attempt to implement `copy: true`, but it might not be, hence "warning" instead of "deprecation". So although we could switch this to a FeatureDeprecated, that is not being done at this time.
2021-11-20convert more mlog.deprecation into FeatureDeprecatedEli Schwartz2-3/+5
2021-11-20fix missing subproject kwarg to FeatureDeprecatedEli Schwartz1-1/+2
We went straight to the extra message, which when parsed as a subproject string resulted in the Feature being entirely skipped because "project() has not been parsed yet" as it could not find a subproject named that.
2021-11-20cmake: Use find_library() on bare library names in cmake dependenciesJon Turney1-6/+4
Convert bare library names to a dependency linker argument using find_library(), rather than hardcoding the MSVC transformation.
2021-11-20Update expected skip condition for llvm framework test on msys2Jon Turney1-1/+1
On msys2, we will now find static llvm using cmake
2021-11-18tests: replace python2 framework with metalDylan Baker1-3/+3
The bundled python is deprecated, metal is unlikely to be deprecated any time soon, so let's use that.
2021-11-18tests: remove extraframework test for pythonDylan Baker1-3/+0
This tries to link the system provided python, which is deprecated and will result in an ambiguous error like "your binary is not an allowed client of .../Library/Frameworks/python.framework/python.tbd for architecture x86_64".
2021-11-17hdf5 dependency: check for alternative config-tool namesEli Schwartz1-3/+3
Depending on whether hdf5 is compiled with parallel support, the same config-tool program may be installed with a mysterious "p" in the name. In this case, dependency lookup will totally fail, unless of course you use the superior pkg-config interface in which case you get a predictable name. Work around this insanity by checking for both types of config-tool name. Fixes #9555
2021-11-16i18n: Fix backtrace when missing input kwargXavier Claessens1-21/+1
When input kwarg is missing in i18n.merge_file() it was crashing with a backtrace because of kwargs['input'][0]. That code was useless anyway because CustomTarget now uses first output as default name which is what we need here.
2021-11-16Add vala templateAlberto Fanjul4-5/+134
2021-11-17MSI generator fixesJussi Pakkanen1-7/+13
2021-11-16Support ancient (<3.4.0) gcc versionsWilliam Toohey1-1/+4
2021-11-16mtest: add an ASCII-only version of the spinnerPaolo Bonzini1-4/+7
While the horizontal line and the other pictograms in mtest have an ASCII-only version, the spinner does not. This causes mtest to fail with a UnicodeEncodeError exception on non-Unicode locales. Fixes: #9538 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-16modules/gnome: fix warning message that will always fireDylan Baker1-3/+2
`typed_pos_args` ensures that the length of args is always true.