aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-30Add new debug() functionMarvin Scholz7-0/+46
Adds a new debug() function that can be used in the meson.build to log messages to the meson-log.txt that will not be printed to stdout when configuring the project.
2022-03-29Correctly handle --version argument to runpythonElliott Sales de Andrade1-4/+2
Followup to #10204.
2022-03-30packaging: rework how pyinstaller gets its instructionsEli Schwartz3-50/+51
Make use of pyinstaller hooks by creating a hook that updates how the `mesonbuild` import functions. This is more or less the same as passing a bajillion arguments to pyinstaller's CLI, but allows the logic to be self-contained (and reusable). It becomes more obvious what parts of the process pertain to pyinstaller, and which parts pertain to MSI/pkg creation.
2022-03-29move typing-only definition to TYPE_CHECKINGEli Schwartz1-14/+15
2022-03-29move a bunch of imports into TYPE_CHECKING blocksEli Schwartz9-23/+44
These are only used for type checking, so don't bother importing them at runtime. Generally add future annotations at the same time, to make sure that existing uses of these imports don't need to be quoted.
2022-03-29Target: Stop passing environment in method argsXavier Claessens2-58/+58
2022-03-29Replace backend.get_option_for_target() with target.get_option()Xavier Claessens5-67/+57
That method had nothing specific to the backend, it's purely a Target method. This allows to cache the OptionOverrideProxy object on the Target instance instead of creating a new one for each option lookup.
2022-03-29Pass environment down to base Target classXavier Claessens11-18/+60
2022-03-29Fix CMake deprecation warning generated from interpreterTristan Partin1-1/+1
2022-03-29gnome: Fix gtkdoc when using multiple Apple frameworksJan Tojnar4-32/+57
The `-framework Foundation -framework CoreFoundation` ended up de-duplicated by OrderedSet into `-framework Foundation CoreFoundation`.
2022-03-29gnome: Fix typo in _get_dependencies_flagsJan Tojnar1-1/+1
This was introduced in https://github.com/mesonbuild/meson/commit/823da3990947a8f4a2152826f0d7229f8a7a0159
2022-03-29runpython: support --versionEli Schwartz1-2/+6
argparse is the gift that keeps on giving, hahaha. Suppress the script argument when --version is specified to avoid "required argument not provided" errors, and print the python version. The version argument is required in order to make this baseline functional as a resolved python for find_program, which may specify a version and expect this to work with python itself. Our incomplete CLI wrapper over the python CLI interface was missing this. Fixes #10162
2022-03-28fix regression in propagating depends in gtkdocEli Schwartz1-6/+11
In commit 68e684d51f1e469e0d9f4b499ffda15146cad98a the function signature was changed, but several places did not adapt. Additionally, we now totally dropped the in-place update of gtkdoc's sole source of dependencies, but didn't propagate them upward to assign the newly collected dependencies anywhere. Fixes building gtkdoc with internal dependencies and failing when specified directly (when building the 'all' target with sufficiently random parallelism, deps may be built on time). Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008382 https://gitlab.gnome.org/GNOME/libmediaart/-/issues/4
2022-03-29Condense test directory names.Jussi Pakkanen575-177/+177
2022-03-27wrap: implement allow-insecure for 'meson wrap'Eli Schwartz2-16/+29
2022-03-27wrap: use shared function to connect to wrapdb with better errorsEli Schwartz1-5/+4
We currently inconsistently handle connection, `has_ssl`, and printing errors on urlopen failure between `meson subprojects` and `meson wrap`. Make the latter work more like the former.
2022-03-27wrap: add functionality to specify whether insecure downloads should be usedEli Schwartz2-10/+30
We have a fallback route in `meson subprojects download` and friends, which tries to retrieve wrapdb urls via http, if Python was not built with SSL support. Stop doing this. Replace it with a command line option to specify that insecure downloads are wanted, and reference it in the error message if downloading fails due to SSL issues.
2022-03-27Fix typoÖnder Görmez1-1/+1
2022-03-27docs: add missing docs for new pkgconfig featureEli Schwartz1-1/+2
Added in commit 6240920c213fb76b4e4be8b6b59ae3346cbbcf77 and documented in release notes but not in module docs.
2022-03-25cygwin CI: work around gcovr bugEli Schwartz1-0/+6
Due to https://github.com/gcovr/gcovr/pull/576 it is not possible to `pip install gcovr` and have it work. It is possible, but not ideal, to install the cygwin gcovr package, which is unmaintained and built for python36 while only depending on python39. This is of course not a problem on the other CI jobs, where we either install it from a distro repository that ensures it is stable and backports patches, or simply tests that the resulting image passes tests before baking it as a CI images update. gcovr upstream isn't sure when they are going to release a new version that fixes this bug. There is a new feature release scheduled "soon".
2022-03-24install_symlink: Handle $DESTDIR case for links with absolute pathMarco Trevisan (Treviño)1-2/+4
In case a link is pointing_to an absolute path and we are using $DESTDIR we fail in case the target is missing. This is incorrect because we may need to use an absolute path to an already installed file that is in $DESTDIR. So if an absolute target is not existing, check if we have such file in $DESTDIR before failing for real.
2022-03-24build.py: Simplify uses_rust()Xavier Claessens1-19/+1
There is no need to check all source files again, if there are .rs sources then rust compiler is in self.compilers already.
2022-03-24build.py: Simplify validate_sources()Xavier Claessens1-15/+3
There is no need to go through all sources again, we already did that to populate self.compilers. When cs or java compilers are in the list, then there must be only one compiler. The code was also not considering generate sources any way.
2022-03-24Make compilers list per subprojectXavier Claessens15-132/+157
Previously subprojects inherited languages already added by main project, or any previous subproject. This change to have a list of compilers per interpreters, which means that if a subproject does not add 'c' language it won't be able to compile .c files any more, even if main project added the 'c' language. This delays processing list of compilers until the interpreter adds the BuildTarget into its list of targets. That way the interpreter can add missing languages instead of duplicating that logic into BuildTarget for the cython case.
2022-03-24Debian renamed cython to cython3, support bothXavier Claessens1-1/+1
2022-03-24hotdoc module: use typed_pos_args to check positional argumentsEli Schwartz1-6/+4
We cannot use typed_kwargs though, because we allow fully arbitrary kwargs and pass them as arguments to the hotdoc program.
2022-03-24dub module: use typed_pos_args to check positional argumentsEli Schwartz1-4/+2
We cannot use typed_kwargs though, because we allow fully arbitrary kwargs and add them as keys in the generated dub file.
2022-03-24python 3 module: type-check all posargsEli Schwartz1-3/+4
Yes, it's deprecated, but we can still stop people doing the wrong thing with it if they are still using it.
2022-03-23gnome module: properly fallback to gtk-update-icon-cacheAntoine Jacoutot1-1/+1
Commit a0cade8f introduced a typo and wrongly check for gtk4-update-icon-cache twice. If gtk4-update-icon-cache (gtk4) is not found, look for gtk-update-icon-cache (gtk3) instead.
2022-03-23Add support for cython_argsTristan Partin4-0/+39
cython_args was previoously ignored by Meson.
2022-03-23Make sure we support "<lang>_args" kwarg for all languagesXavier Claessens1-25/+8
2022-03-23boost: preserve compiler/linker argument orderHemmo Nieminen1-2/+2
Looks like boost dependency mixes up it's compiler and linker argument order when it is removing duplicates (?) from those. This causes unnecessary recompilations of everything depending on those components. Use OrderedSet to remove the duplicates while also maintaining consistent order for them.
2022-03-23add test d/14 dub with depsRemi Thebault2-0/+93
2022-03-23Fix DUB dependenciesRemi Thebault1-126/+295
- fix the research of target built by DUB - explicitely state that DUB dynamic libraries and source libraries are not supported (yet) (mesonbuild#6581) - fix the build settings of recipes having sub-dependencies (mesonbuild#7560) - fix winlibs added from dub recipe - sanitization, comments, explanations...
2022-03-23ninja backend: do not fatally error on compdb failureEli Schwartz1-1/+1
We print a warning if a compilation database isn't successfully generated, which is good, because that gives some visibility in case the user really wanted to use the compdb. But warnings default to being fatal with --fatal-meson-warnings, which is not so good, because this isn't a very important warning at all, and we'd rather not error out in such cases when building works fine and a random bonus IDE feature doesn't work. Mark this particular warning as non-fatal. Fixes side issue in https://github.com/mesonbuild/wrapdb/pull/343#issuecomment-1074545609
2022-03-22Fix missing ' in custom_target docsrusty-snake1-2/+2
2022-03-22docs/rust: fix markdown titleDylan Baker1-1/+1
VSCode is perfectly happy with the trailing `---`, hotdoc only likes `...` apparently.
2022-03-22interpreter: Make compiler options per-subprojectXavier Claessens9-7/+67
2022-03-22coredata: Do not forget subproject's default_optionsXavier Claessens1-6/+9
2022-03-22OptionOverrideProxy: Handle per-subproject optionsXavier Claessens2-17/+25
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens14-74/+70
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-03-22backends: Stop separating base and compiler optionsXavier Claessens5-25/+18
Since OptionKey is used we can mix all options together in a single dictionary. That's already what we do in coredata.options.
2022-03-22unittests: Fix rpath tests no nixosDylan Baker1-0/+3
Which insert a bunch of rpath entries we strip, but then don't check if they're empty and fail anyway.
2022-03-22envconfig: use $PKG_CONFIG for pkg-config find_program as well as pkgconfigDylan Baker1-0/+1
It looks like internally we use pkgconfig, even though the installed name is pkg-config. This fixes `tests cases/common/44 pkgconfig-gen`, which will ignore PKG_CONFIG and select the wrong pkg-config binary if you have $PKG_CONFIG set.
2022-03-22tests/common/44: Prepend to PKG_CONFIG_PATh instead of replacing itDylan Baker2-4/+10
Which is required to make this test work when PKG_CONFIG_PATH is required to get a working system, such as on nixos
2022-03-22tests/linuxlike: prepend rather than override PKG_CONFIG_PATHDylan Baker1-5/+17
If you rely on PKG_CONFIG_PATH to make anything work (like nixos) then these tests cannot pass without the system values appended to the override values.
2022-03-22tests/linuxlike: Honor PKG_CONFIG envvarDylan Baker1-14/+16
For some of us, we need to use this to get the right pkg-config. If the variable is unset, `'pkg-config'` is used.
2022-03-22compilers: fix mypy warning in Rust detectionDylan Baker1-0/+1
2022-03-22Add ability to add resources to jarsTristan Partin9-7/+101
Previously Meson lacked the ability to add resources to jar files. Fixes #9945
2022-03-22Bump version number for new development.Jussi Pakkanen1-1/+1