aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-28iconv dependency: try even harder to find working iconvEli Schwartz1-1/+2
has_function(prefix: '...') is useless to check the difference between builtins and external library functions. It has code to detect "builtins" that misfires and reports that iconv_open is defined as a builtin on mingw, but only if you include the header. Instead compile an open-coded test file that this iconv dependency implementation fully controls, that doesn't get up to imaginative edge cases like trying to find `__builtin_iconv_open`. Fixes commit db1fa702f3943c6e4fec142b2bf5468c89173993, which merely moved the brokenness over one step to the right (by breaking mingw instead of freebsd) Fixes https://github.com/mesonbuild/meson/pull/9632#issuecomment-979581509
2021-11-28Add typing to msubprojects.pyTristan Partin4-65/+107
2021-11-27Merge pull request #9599 from dcbaker/submit/typed_kwargs-message-improvementsJussi Pakkanen4-30/+54
Improve error messages for typed_kwarg type mismatches in containers
2021-11-27Fix _calculate_toolset_version for VS2022.Luke Elliott1-0/+2
2021-11-27Merge pull request #9531 from dcbaker/submit/interpreter-more-typingJussi Pakkanen5-115/+194
More use of typed_* in the interpreter module
2021-11-27Remove premature return in BuildTarget.check_module_linking()Mike Gilbert1-2/+1
We want to loop over all link_targets to update backwards_compat_want_soname if necessary. Fixes: ec9bdc6edb17d1d9da5df2d6525025242c119f3a
2021-11-27Add -g for debug builds.Nathanael Gray1-1/+1
2021-11-27Fix more code which appears copied from CcrxCompiler.Nathanael Gray1-4/+6
2021-11-27Fix '# Visual Studio <>' comment in sln files with VS backendLuke Elliott7-5/+20
such that Visual Studio Version Selector works.
2021-11-25interpreter: fix `feature.require` handling of error messageBenoit Pierre4-1/+13
Don't show a blank error when no `error_message` was passed as argument.
2021-11-25minstall: do not run ldconfig on the *BSDsEli Schwartz1-0/+4
They don't utilize a soname cache, so running ldconfig without arguments is basically pointless -- and at least some of them are buggy: running ldconfig with the verbose flag switches on "delete all directories from the hints file, and recreate it using 0 command-line positional arguments", which would soft-brick the system. Fixes #9592
2021-11-25Stop backend_startup_project from erasing the last project in a VS solutionLuke Elliott2-1/+5
if it is not the specified project.
2021-11-25tests: add a test for OptionKey.from_stringDylan Baker1-0/+19
2021-11-25mesonlib: update `OptionKey.__repr__`Dylan Baker1-1/+1
Which is missing several values
2021-11-25iconv dependency: include header when checking for libc builtinEli Schwartz1-1/+1
This header is required anyway. And the compile test for linking to libc with the iconv_open symbol, can succeed when we try to use the literal symbol name without includes, but fail later during project build, because actually including iconv.h might redefine the function to match a forked symbol. This happens when GNU iconv is installed as a standalone library on systems that have a less fully-featured iconv implementation. So, by including the header in has_function, we ensure that we test against the default resolved header. In the event that the symbol which is #define'd by the header is 'libiconv_open', linking will fail against libc even when a builtin iconv does exist, and we will fall back to the iconv dependency that provides -liconv (and which is needed to properly use the default header). Fixes compiling against the iconv dependency on e.g. FreeBSD when the libiconv port is installed.
2021-11-24shared_module: Add soname when used as a link targetNirbheek Chauhan9-15/+63
Emit a detailed deprecation warning that explains what to do instead. Also add a unittest. ``` DEPRECATION: target prog links against shared module mymod, which is incorrect. This will be an error in the future, so please use shared_library() for mymod instead. If shared_module() was used for mymod because it has references to undefined symbols, use shared_libary() with `override_options: ['b_lundef=false']` instead. ``` Fixes https://github.com/mesonbuild/meson/issues/9492
2021-11-23run_mypy: add modules/keyvalDylan Baker1-0/+1
2021-11-23modules/keyval: add type annotationsDylan Baker1-14/+16
And use typed_pos_args
2021-11-23modules/keyval: cleanup importsDylan Baker1-4/+3
2021-11-24unit tests: Extend prebuilt test to test intermediateDylan Baker6-1/+70
This provides coverage for the bug: https://github.com/mesonbuild/meson/issues/9542
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