aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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.
2021-11-16modules/gnome: Add back deprecation messageDylan Baker1-0/+2
This looks like it was probably removed in a bad rebase
2021-11-15Fix to find Python files for Windows virtualenvsMatthew Brett1-2/+6
Virtualenvs do not have their Python DLLs etc in the `sys.prefix` directory, but in the `sys.base_prefix` directory. This directory is the same as `sys.prefix` if not in a virtualenv, so is safe for either case: https://docs.python.org/3/library/sys.html#sys.base_prefix
2021-11-15Merge pull request #9520 from dcbaker/submit/gnome-first-typed-kwargsJussi Pakkanen4-373/+401
Add typed_kwargs to some of the gnome module functions
2021-11-15only pass clang LTO arguments when they are neededEli Schwartz1-2/+4
If the LTO threads == 0 clang will default to the same argument we manually pass, which meant we dropped support for admittedly ancient versions of clang that didn't yet add that option. Drop the extraneous argument, and add a specific error condition when too old versions of clang are detected. Fixes #9569
2021-11-15Merge pull request #9565 from bonzini/invalid-run-targetJussi Pakkanen8-6/+47
reject run_target in test or install script arguments
2021-11-15dependencies/zlib: Add system zlib method for androidDudemanguy3-5/+5
The same method that the BSDs use should also work for android. Also update the tests and docs where appropriate.
2021-11-15interpreter: disallow RunTarget in meson.add_install_scriptPaolo Bonzini4-5/+28
Without this patch, the name of the RunTarget is passed to the install script; for the enclosed test, meson setup (incorrectly) succeeds, but installation fails.
2021-11-15interpreter: disallow RunTarget in testPaolo Bonzini4-1/+19
Fixes the following error in the testcase: File "/usr/lib/python3.10/site-packages/mesonbuild/backend/ninjabackend.py", line 548, in generate self.generate_tests() File "/usr/lib/python3.10/site-packages/mesonbuild/backend/ninjabackend.py", line 1093, in generate_tests self.serialize_tests() File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 567, in serialize_tests self.write_test_file(datafile) File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 943, in write_test_file self.write_test_serialisation(self.build.get_tests(), datafile) File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 1017, in write_test_serialisation pickle.dump(self.create_test_serialisation(tests), datafile) File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 1002, in create_test_serialisation cmd_args.append(self.construct_target_rel_path(a, t.workdir)) File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 1021, in construct_target_rel_path return self.get_target_filename(a) File "/usr/lib/python3.10/site-packages/mesonbuild/backend/backends.py", line 253, in get_target_filename assert(isinstance(t, build.BuildTarget))
2021-11-15valac dependencies: use the canonical list of vala source namesEli Schwartz1-1/+1
Don't hardcode one of the three possible source types, thus ignoring the needed vapis for dependencies using .gs or .vapi sources. Fixes #9544
2021-11-14Users.md: add mpvDudemanguy1-0/+1
2021-11-14interpreter: Fix a typoYasushi SHOJI1-1/+1
This is a trivial typo. Fix projeccts to projects. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-11-14Share common code between clang tidy and formatXavier Claessens3-89/+84
2021-11-14Remove incorrect arguments for C2000 C++ compiler. Add correct form for ↵Nathanael Gray1-12/+13
output and include args.
2021-11-13qt module: add depfile support to moc as wellEli Schwartz1-1/+11
We currently enable this only for rcc (where this really really matters) but it can often matter for moc as well, and is just generally more correct. Really, this should have been added in #7451 too, but I neglected it since the module warned about inaccurate dependencies only for rcc...
2021-11-09docs: fix refman 2.0 regression in correctly describing ↵Eli Schwartz1-2/+37
find_library(has_headers) All kwargs inherited from has_header need to be prefixed `header_` so we cannot just do straight inheritance. And the part of the description that highlighted the way kwargs are derived and evolved, went entirely missing. Fixes #9551
2021-11-09docs: fix some spelling typosEli Schwartz1-1/+1