aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-12-02cmake: Deprecate CMake <3.14 and warn for <3.17 (#9677)Daniel Mensinger2-0/+21
* cmake: Deprecate CMake <3.14 and warn for <3.17 See: - #7832 - #9676 * cmake: Add deprecation release note snippet
2021-12-01cmake: Fix old style dependency lookup with imported targetsDaniel Mensinger7-169/+171
This also includes some refactoring, since the alternaticve would have been to duplicate the huge traceparser target code block again. fixes #9581
2021-12-01add install_symlink functionPablo Correa Gómez14-17/+180
Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
2021-12-01interpreter: reorder functions alphabeticallyPablo Correa Gómez1-15/+15
2021-11-30Fix typo in wrap.pyRandy1-1/+1
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-29docs: add missing argument documentation for run_command captureDylan Baker1-0/+9
2021-11-29interpreter: allow Compiler as a variadic positional argumentDylan Baker1-6/+15
We allow this for the command (the first parameter), but not later parameters, which is just odd. This also allows us to give better error messages for the case of overridden programs.
2021-11-29interpreter: use typed_kwargs for run_commandDylan Baker3-19/+26
This also cleans up a couple of internal callers of the internal impl version that don't set the `check` argument, and therefore trigger a warning about not setting the check argument.
2021-11-29interpreter: use typed_pos_args for run_commandDylan Baker2-10/+19
2021-11-29report the context, if possible, on python tracebacksEli Schwartz1-2/+8
The interpreter tries to catch any exception and add the latest node information to it, but currently we only used that to print better formatted error messages on MesonException. Since we should theoretically have that property for most/all exceptions, let's percolate that upward, and message the user that an unexpected traceback was encountered, that it should be reported as a bug, and the helpful information of "how far into parsing this meson.build did we get before erroring out, anyway?"
2021-11-28make sure files arguments to compiler.compiles and friends, performs rebuildEli Schwartz2-0/+10
If the compiler check is updated as a string in meson.build, we force rebuild, which is a good thing since the outcome of that check changes the configuration context and can enable or disable parts of the build. If the compiler check came from a files() object then we didn't add a regen rule on those files. Fixes #1656
2021-11-28Merge pull request #9623 from dcbaker/submit/keyval-typeingJussi Pakkanen2-16/+18
Add type annotations and typed_pos_args to the keyval module
2021-11-28fix BSD ldconfig handling (#9631)Eli Schwartz2-6/+16
For libraries installed to libdir, it's not expected to have rpath hooked up. But for non-default libdirs, the path might not get searched by default. `ldconfig -m <libdir>` is convenient here, as it will programmatically add a new directory to search for shared libraries, so the resulting installed programs work out of the box. Include the dragonfly BSD platform name, which doesn't match the 'bsd' catch-all pattern.
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