aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-10Use a temp file to invoke the introspection command.Jussi Pakkanen1-1/+6
This is more reliable as '-c' can, for example, exhaust the maximum command line length.
2022-04-10python module: restore logging for broken pythonEli Schwartz1-5/+12
This check was erroneously removed in commit c5c02b72e132a03ae0284bdd5e15d1675301a37d
2022-04-09packaging: make sure pyinstaller sees our distributed data filesEli Schwartz2-0/+8
Running pyinstaller to create a bundle, and using the resulting `pyinst-tmp/meson/meson setup ...` with the cmake module revealed that no data files were being bundled, unlike what we did for setup.cfg. Fix this oversight. Fixes #10163
2022-04-07Revert "wayland: Also lookup scanner in pkgconfig"Eli Schwartz4-30/+26
This reverts commit 7954a4c9cbf8355d8c8ea9b3d98df45d9f96f66e.
2022-04-07docs: YAML: Add `arg_flattening: false` where requiredDaniel Mensinger12-0/+27
2022-04-07docs: refman: Add `arg_flattening` supportDaniel Mensinger8-8/+27
2022-04-07docs: Document argument flatteningDaniel Mensinger1-0/+48
2022-04-07docs: Fix [[true]] --> `true`Daniel Mensinger1-2/+2
2022-04-04wayland: Also lookup scanner in pkgconfigXavier Claessens4-26/+30
This moves generally useful logic from GNOME module's _get_native_binary() into find_program() implementation. We could decide later to expose it as public API.
2022-04-03project tests: log the reason why a test is skippedEli Schwartz2-3/+35
We expose a reason after the string 'MESON_SKIP_TEST', but it is actually ignored when running the test, so it is only useful as documentation and really might as well be a comment. Make it even more useful by actually printing that string after the '[SKIPPED]' message. Also, sometimes a test can be skipped for multiple reasons, and it would be useful to know which one occurred.
2022-04-03project tests: do not use tqdm progress bars for a single testEli Schwartz1-9/+11
This can happen for example with `--only fpga` as that category has exactly one test.
2022-04-03Document and test env vars a bit betterJohn Ericson2-10/+8
2022-04-03cmake: Better error message when configuring a CMake subproject fails.Daniel Mensinger5-4/+46
2022-04-01Fix CMake error messageDaniel Mensinger1-2/+2
2022-04-01main: Make the msys/python check work again, in some casesChristoph Reiter1-8/+3
msys/python in MSYS2 pretends to be cygwin in all cases for some time now, so this check was impossible to hit. The underlying confusion it tried to prevent is still there, namely trying to build with mingw but wrongly using a msys/cygwin python/meson. We can use the MSYSTEM env var to detect if we are in a mingw shell, and in case the Python doesn't match we suggest installing mingw variants of both python and meson. Using msys/python + meson in a MSYS environment works fine on the other hand, so no need to error out in that case. Fixes #8726 Also addresses the concern raised in https://github.com/mesonbuild/meson/issues/3653#issuecomment-474122564
2022-04-01docs: fix inaccurate description of command targetsEli Schwartz2-2/+2
It isn't possible to have one target depend on a run_target, because those produce no outputs and are always out of date. But the docs didn't specify which types of target are valid here. Correct the docs to align with the implementation. Fixes #10198
2022-03-31i18n: don't let our maintainer targets run via wrapped envEli Schwartz1-2/+2
They are RunTargets because they are one-shot commands without outputs. But we implement them purely via our internal wrapper for gettext, so there is no reason to wrap them *again* in our internal wrapper for meson_exe and set a bunch of environment variables we know we absolutely do not need, use, or want. This avoids the ugly "wrapped due to env" status, and allows users to directly see the command being run without going into despair at obscure pickled nonsense. It also offers a tiny defense against upgrading Meson without reconfiguring. People should not do that, and we error out about this in a bunch of places, but `--internal gettext` has a perfectly stable interface just like most build tools that aren't part of Meson internals, since it uses command line arguments instead of pickling.
2022-03-31allow RunTarget to skip wrapping due to envEli Schwartz3-9/+13
Forcing serialization on when writing out the build rule makes very little sense. It was always "forced" on because we mandated a couple of environment variables due to legacy reasons. Add an attribute to RunTarget to say that a given target doesn't *need* those environment variables, and let ninja optimize them away and run the command directly if set.
2022-03-31docs: note that find_program accepts file objectsEli Schwartz1-4/+6
This was implemented in commit 280346da3ac5904ec097afe89ef45ad34bd4a173 but never properly documented (it predated the version-controlled docs).
2022-03-31Handle same Framework multiple times in Xcode.Jussi Pakkanen1-2/+4
2022-03-31Handle feed and capture in xcodebackend.Jussi Pakkanen1-1/+2
2022-03-31fix continued breakage in gnome module APIEli Schwartz1-2/+2
In commit 823da3990947a8f4a2152826f0d7229f8a7a0159 we tried to fix disappearing dependencies. Instead, we appended the replacement dependencies to the existing ones. But this, too, was wrong. The function doesn't return new dependencies... it returns a copied list of all the dependencies, then alone of all parts of that API, expects to overwrite the existing variable. (Sadly, part of the internals actually uses the entire list for something.) As a result, we produced a repeatedly growing list, which eventually scaled really badly and e.g. OOMed on gstreamer. Instead, let's just replace the dependencies with the updated copy.
2022-03-31docs: correct documentation of shared_library soversionsEli Schwartz1-2/+2
We have always accepted an int here as an alternative to a string, but the initial documentation thought it was only a string.
2022-03-31Merge pull request #9989 from ePirat/epirat-fix-uscore-prefix-detectionJussi Pakkanen4-9/+130
Fix underscore detection
2022-03-31unittests: move get_convincing_fake_env_and_cc to run_tests.pyMarvin Scholz2-15/+15
2022-03-31unittests: add underscore prefix testsMarvin Scholz1-0/+37
Tests the two new detection methods for the underscore prefix against what is detected in the binary. Contrary to the in-the-wild failures, we can trust the binary here as we do not get any additional flags that influence the binary contents in this test environment.
2022-03-31clike: print stderr instead of stdout for debuggingMarvin Scholz1-1/+1
When something goes wrong with running the compiler in _symbols_have_underscore_prefix_searchbin, print stderr instead, as it actually contains helpful output while stdout is usually empty in this case.
2022-03-31visualstudio: do not query underscore define with MSVCMarvin Scholz1-0/+17
MSVC does not has the builtin define to check for the symbol prefix, so do not try to query it at all, to save some time.
2022-03-31clike: add more reliable ways to check underscore prefixMarvin Scholz1-6/+73
Fix #5482
2022-03-30compilers/gnu: use Popen_safe to prevent resource leaksMarvin Scholz1-8/+1
Fixes the following ResourceWarnings: ResourceWarning: subprocess 25556 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback mesonbuild/compilers/mixins/gnu.py:195: ResourceWarning: unclosed file <_io.BufferedReader name=4> return gnulike_default_include_dirs(tuple(self.exelist), self.language).copy() ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-03-30Fix typos in Xcode backend.Jussi Pakkanen1-3/+3
2022-03-30unittests: correctly use test asserts instead of regular onesMarvin Scholz1-2/+2
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