summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update configure_file.yamladd-configuration-configure_FileDylan Baker2021-12-071-1/+1
| | | Squash this
* docs: Add the `configuration` keyeword argument to `configure_File`Dylan Baker2021-12-061-0/+7
| | | We were missing the most important keyword argument of them all!
* gnome module: deprecate passing false to install_dir_girEli Schwartz2021-12-064-7/+21
| | | | | | Use a proper install option for this. Now `install_<type>` can directly override `install` instead of passing a boolean to the string kwarg `install_dir_<type>`.
* gnome module: document and fix install_dir x3, by allowing false *_gir and ↵Eli Schwartz2021-12-064-11/+29
| | | | | | | | | | | | | | *_typelib generate_gir forces building both the typelib and gir, and some people only want one or the other (probably only the typelib?) which means flagging the other as install_dir: false in the same way custom_target supports. As this always worked, albeit undocumented, make sure it keeps working. It's pretty reasonable to allow, anyway. Fixes https://github.com/mesonbuild/meson/pull/9484#issuecomment-980131791
* decorators: fold some duplicated code into a closureDylan Baker2021-12-061-26/+17
|
* add message option to since_values and deprecated_valuesDylan Baker2021-12-062-7/+24
| | | | | This allows these two arguments to take a tuple of (version, message), where the message will be passed to Feature*'s message parameter
* unittests/internal: use more subTestDylan Baker2021-12-061-13/+11
|
* Add deprecated_message and since_message to KwargInfoDylan Baker2021-12-062-12/+23
| | | | | | For passing an extra message to Feature* This allows providing a more detailed message.
* unittests/internal: use mock and subTestDylan Baker2021-12-061-7/+9
| | | | | This just makes things a little cleaner, and allows more accurate error reporting.
* interpreterbase/decorators: Fix types of deprecated_values and since_valuesDylan Baker2021-12-062-2/+8
| | | | | Which shouldn't be Dict[str, str], they should be Dict[_T, str], as nay value that can be passed to types is valid here.
* ci: install pytest-subtestsDylan Baker2021-12-065-4/+5
| | | | Which lets pytest understand unittest.subtest
* ci/ubuntu-rolling: remove pkg-config-arm-linux-gnueabihfDylan Baker2021-12-061-1/+0
| | | | | | This has been removed as an explicit package in impish. It seems that having pkg-config installed and adding arm as an arch will cause it to be generated automatically
* interpreter: use build.GeneratedTypesPaolo Bonzini2021-12-061-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* interpreter: allow extract_objects to receive generated sourcesPaolo Bonzini2021-12-065-14/+45
| | | | Fixes: #8333
* allow passing a CustomTargetIndex as argument to a testPaolo Bonzini2021-12-064-6/+8
| | | | | Fixes: #7585 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* pass all outputs of a custom_target as arguments to a testPaolo Bonzini2021-12-063-15/+25
| | | | | | | Meson was passing only the first output and warning about it. To do this easily, refactor construct_target_rel_path to return a list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* doc: fix missing kwarg in qt5 moduleEli Schwartz2021-12-061-0/+1
| | | | | | | | compile_moc accepts "dependencies" for the same reason preprocess does, but the original documentation never copied this over from the preprocess docs. See: https://github.com/mesonbuild/meson/issues/9683#issuecomment-986825041
* Fix performance regression in build file generationcomplexoctonion2021-12-061-1/+2
| | | | | | Re-use any already determined rpaths for a target. Fixes #9695
* fix stray typoEli Schwartz2021-12-051-1/+1
|
* rename exe_runner to exe_wrapper everywhereEli Schwartz2021-12-053-15/+15
| | | | I don't understand the purpose of this confusing API naming split.
* clean up function signatures in preparation for dataclassesEli Schwartz2021-12-052-16/+16
| | | | | | | | | | FeatureCheck always immediately sets extra_message to '' if it isn't explicitly passed, so there is really no point in using None as a sentinel that is never used. Names used in init functions are sometimes pointlessly different from the class instance attributes they are immediately assigned to. They would make more sense if defined properly.
* modules/qt: compeil_resources allow name to be unsetDylan Baker2021-12-051-1/+1
| | | | | | | | | Originally name should have been set to required=True, but since then the requirement to name CustomTargets (which compile_resources is a wrapper around) has been dropped. As such we just need to allow the default value of None through. Fixes: #9698
* gtkdoc: add support for a binary wrapperAlexander Kanavin2021-12-021-1/+3
| | | | | | Make it possible to specify a wrapper for executing binaries in cross-compiling scenarios. (usually, some kind of target hardware emulator, such as qemu)
* i18n module: correctly annotate the availability of data_dirsEli Schwartz2021-12-021-2/+2
| | | | | | It was originally forgotten in merge_file() and later added for parity with gettext(). This means that the FeatureNew for each function is different.
* gnome module: document that yelp(languages: ...) is deprecatedEli Schwartz2021-12-011-1/+5
| | | | | | | If you use it, we emit a warning telling you to use LINGUAS instead. So we should warn people in the documentation as well. Fixes #9495
* cmake: Deprecate CMake <3.14 and warn for <3.17 (#9677)Daniel Mensinger2021-12-022-0/+21
| | | | | | | | | | * cmake: Deprecate CMake <3.14 and warn for <3.17 See: - #7832 - #9676 * cmake: Add deprecation release note snippet
* cmake: Fix old style dependency lookup with imported targetsDaniel Mensinger2021-12-017-169/+171
| | | | | | | This also includes some refactoring, since the alternaticve would have been to duplicate the huge traceparser target code block again. fixes #9581
* add install_symlink functionPablo Correa Gómez2021-12-0114-17/+180
| | | | | | Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
* interpreter: reorder functions alphabeticallyPablo Correa Gómez2021-12-011-15/+15
|
* Fix typo in wrap.pyRandy2021-11-301-1/+1
|
* fix broken FeatureNew checks that never printedEli Schwartz2021-11-301-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.
* docs: add missing argument documentation for run_command captureDylan Baker2021-11-291-0/+9
|
* interpreter: allow Compiler as a variadic positional argumentDylan Baker2021-11-291-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.
* interpreter: use typed_kwargs for run_commandDylan Baker2021-11-293-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.
* interpreter: use typed_pos_args for run_commandDylan Baker2021-11-292-10/+19
|
* report the context, if possible, on python tracebacksEli Schwartz2021-11-291-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?"
* make sure files arguments to compiler.compiles and friends, performs rebuildEli Schwartz2021-11-282-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
* Merge pull request #9623 from dcbaker/submit/keyval-typeingJussi Pakkanen2021-11-282-16/+18
|\ | | | | Add type annotations and typed_pos_args to the keyval module
| * run_mypy: add modules/keyvalDylan Baker2021-11-231-0/+1
| |
| * modules/keyval: add type annotationsDylan Baker2021-11-231-14/+16
| | | | | | | | And use typed_pos_args
| * modules/keyval: cleanup importsDylan Baker2021-11-231-4/+3
| |
* | fix BSD ldconfig handling (#9631)Eli Schwartz2021-11-282-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.
* | iconv dependency: try even harder to find working iconvEli Schwartz2021-11-281-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
* | Add typing to msubprojects.pyTristan Partin2021-11-284-65/+107
| |
* | Merge pull request #9599 from dcbaker/submit/typed_kwargs-message-improvementsJussi Pakkanen2021-11-274-30/+54
|\ \ | | | | | | Improve error messages for typed_kwarg type mismatches in containers
| * | unittests: cover cases here two of the same wrong type are providedDylan Baker2021-11-221-1/+1
| | | | | | | | | | | | | | | We don't want to get something like "expected array[str], but got array[int | int]", we really want `arrayp[int]`.
| * | typed_kwargs: use | for type unions, not ,Dylan Baker2021-11-223-7/+7
| | | | | | | | | | | | Python uses this syntax now, as does typescript and other languages
| * | typed_kwargs: provide better error messages for wrong container typesDylan Baker2021-11-223-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.
| * | typed_kwargs: move some closures around to increase code clarityDylan Baker2021-11-221-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.
| * | run_single_test: honor the --use-tmpdir flagDylan Baker2021-11-221-1/+1
| | |