Commit Graph

12506 Commits

Author SHA1 Message Date
Daniel Mensinger 1b9c4b7192 Fix generator expression list problems (fixes #10288) 2022-04-18 22:59:44 -04:00
Peter Lesslie ab5ed4db09 Add note in docs that multiline f-strings are not supported
Companion to https://github.com/mesonbuild/meson/pull/10284
2022-04-15 11:08:22 -04:00
Eli Schwartz 5df0fb45ca
unittests: make datatests capable of parsing module subsections properly
We will need to update the tests for each module that gets newly added,
apparently, but the basic structure for doing so is hopefully there.
2022-04-14 18:37:04 -04:00
Eli Schwartz 6a287fae5d
simplify destdir_join for readability
We can immediately short-circuit if there is no destdir, as we simply
return the prefix unchanged.

If there is some kind of destdir and the prefix contains a drive letter,
then no matter what we need to remove the drive letter before joining.
Technically, if the destdir is a relative path e.g. `destdir\` and
`C:\prefix`, we should still install to `destdir\prefix` without the
drive letter.

But... we also guarantee that destdir is an absolute path (or empty)
anyway. And even if we didn't, non-absolute destdir is a broken concept
for a variety of complicated reasons. So none of this matters in
practice.

One way or another, we don't need to actually check whether destdir is
an absolute path before cutting off the prefix drive letter.
2022-04-14 18:37:04 -04:00
Eli Schwartz 19de032d20
docs: make upload target depend on building the docs
Manually running hotdoc's upload command does not guarantee the docs
have actually been built.
2022-04-14 18:37:04 -04:00
Eli Schwartz f72fbd7562
CI images: don't build on a schedule for forks
It's a bit annoying having to *manually* disable a workflow for forks,
because the scheduled build is a waste of time and also spammy.

On the other hand, having the workflow enabled is in general a good
thing, because it is in fact desirable to test it locally in forks.
2022-04-14 18:37:04 -04:00
Eli Schwartz 22b9a66f7c
qt module: move comment to the correct location after refactoring
In commit f291b637b1 the tools were moved
around but a comment got forgotten. Now, in order to be meaningful and
remind us of anything, it needs to be in a different location.
2022-04-14 18:37:04 -04:00
Eli Schwartz ea8f4bb4ad
typo 2022-04-14 18:37:04 -04:00
Eli Schwartz eb2551c90e
remove useless condition
not is_subproject() is the same check as self.subproject == ''
2022-04-14 18:37:04 -04:00
Eli Schwartz bb171c2dff
pyupgrade --py37-plus
Some more old style code crept in again.

Additionally, pyupgrade learned to catch more if/elsed code based on the
python version, and delete it.
2022-04-14 18:37:03 -04:00
Eli Schwartz 906aec0df5
ac_converter: use better style for header check iteration
underscorifying and upper casing the header name is superior to
duplicating it.
2022-04-14 18:37:03 -04:00
Ben Brown 20ac070fca Fix typo in comment 2022-04-14 14:43:50 -04:00
Xavier Claessens c649a2b8c5 wayland: Make sure wayland-scanner has same version as wayland libraries 2022-04-13 21:40:59 +03:00
Jussi Pakkanen 2fcd3a4174 Add regression test for Python dist. 2022-04-13 21:27:22 +03:00
Eli Schwartz a0e7f93414 compilers: fix broken CompCert support for release flags
This has been broken ever since the original implementation. Due to a
typo, the optimization flag used a zero instead of an uppercase "o",
which the compiler then breaks on during argument parsing because it is
an invalid argument.

Fixes #10267
2022-04-13 21:11:09 +03:00
Xavier Claessens 3180c579f6 mconf: Fix printing <inherited from main project> for yielding options
In print_options() k was a string instead of OptionKey, but
self.yielding_options expects OptionKey. Not sure how this has not been
catched by mypy.

Fix by keeping k as OptionKey which makes self.yielding_options useless.

Fixes: #9503
2022-04-13 21:10:32 +03:00
Eli Schwartz d68a0651e4
qt module: also prefer the changed name scheme for the tools
Although Qt6 has decided these are "internal" commands and should never
be run directly, so they don't get symlinked to /usr/bin at all, and are
only available in the qt_dep.bindir anyway.

But, the general naming pattern should be followed on principle.
2022-04-12 20:44:51 -04:00
Eli Schwartz b5a81ff634
qt dependency: adapt to the qmake command changed name
Qt now has official guidance for the symlinked names of the tools, which
is great.

Qt now officially calls the tools `fooX` instead of `foo-qtX` where the
major version of Qt is X. Which is not great, because a bit of an
unofficial standard had prior art and now needs to change, and we never
adapted.

Prefer the official name whenever looking up qmake, and in the
testsuite, specifically look only for the official name on versions of
qt which we know should have that.
2022-04-12 20:44:07 -04:00
Eli Schwartz e223136b10
qt dependency: find the correct -qtX configtool name
Fixes regression in commit c211fea513. The
original dependency lookup looked for `qmake-{self.name}`, i.e.
`qmake-qt5`, but when porting to config-tool, it got switched to
`qmake-{self.qtname}` i.e. `qmake-Qt6`, which was bogus and never
worked. As a result, if `qmake-qt5` and `qmake` both existed, and the
latter was NOT qt5, it would only try the less preferred name, and then
fail.

We need to define self.name early enough to define the configtool names,
which means we need to set it before running the configtool __init__()
even though configtool/pkgconfig would also set it to the same value.

Mark the tests as passing on two distros that were failing to detect
qmake due to this issue, and were marked for skipping because we assumed
that the CI skipping there was an expected case rather than an old
regression.
2022-04-12 20:44:07 -04:00
Stefan Hajnoczi b956d74175 tests: fix incomplete Qt 6 support
The "frameworks/4 qt" test covers Qt 4 and 5. There is already Qt 6 code
in the test but it is incomplete because translations are missing and Qt
6 requires C++17 or later to compile.
2022-04-12 20:42:42 -04:00
John Lindgren a606ce22eb Add support for Qt 6.1+
Qt 6.1 moved the location of some binaries from QT_HOST_BINS to
QT_HOST_LIBEXECS as noted in the changelog:

c515ee178f Move build tools to libexec instead of the bin dir
- Tools that are called by the build system and are unlikely to be
called by the user are now installed to the libexec directory.

https://code.qt.io/cgit/qt/qtreleasenotes.git/tree/qt/6.1.0/release-note.txt

It's possible to help the 'qt' module find the tools by adding Qt's
libexec directory to the PATH environment variable, but this manual
workaround is not ideal.

To compensate, meson now needs to look for moc, rcc, uic, etc. in
QT_HOST_LIBEXECS as well as QT_HOST_BINS.

Co-authored-by: Stefan Hajnoczi <stefanha@jammr.net>
2022-04-12 20:42:42 -04:00
Daniel Mensinger 589600cb51 cmake: Always use all compilers for LLVM (fixes #10249) 2022-04-12 18:25:38 -04:00
alex-tee 0176419bec Update Zrythm entry in Users.md
Fixed broken link and updated outdated description.
2022-04-12 14:48:25 -04:00
mattip c003c49311 add pypy3 to msys2 CI run 2022-04-12 06:58:04 -04:00
mattip a9b63ff76f add a pypy3 for windows too 2022-04-12 06:58:04 -04:00
Matti Picus 73fa3aad43 python module: windows dll name for pypy needs special casing 2022-04-12 06:58:04 -04:00
mattip 1bb0387e67
add pypy3 to the bionic image 2022-04-11 16:59:40 -04:00
Eli Schwartz 1420d0dace
mdist: use better approach to finding original configured options
Instead of reading intro-buildoptions.json, a giant json file containing
every option ever + its current value, use the private file that is
internally used by msetup for e.g. --wipe to restore settings.

This accurately tracks exactly the options specified on the command
line, and avoids lengthy summary messages containing all the overridden
defaults.

It also avoids passing potentially incompatible options, such as
explictly specifying -Dpython.install_env while also having a non-empty
-Dpython.{x}libdir

Fixes #10181
2022-04-11 14:10:59 -04:00
Jussi Pakkanen 3c80f8f965 Use a temp file to invoke the introspection command.
This is more reliable as '-c' can, for example, exhaust
the maximum command line length.
2022-04-10 17:13:51 +03:00
Eli Schwartz d27fd555e8 python module: restore logging for broken python
This check was erroneously removed in commit c5c02b72e1
2022-04-10 15:17:22 +03:00
Eli Schwartz 7ceec99c55 packaging: make sure pyinstaller sees our distributed data files
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-09 14:20:31 +03:00
Eli Schwartz e5aa47d8af Revert "wayland: Also lookup scanner in pkgconfig"
This reverts commit 7954a4c9cb.
2022-04-07 23:44:34 -04:00
Daniel Mensinger 99f510a817 docs: YAML: Add `arg_flattening: false` where required 2022-04-07 17:16:26 -04:00
Daniel Mensinger f192ecd1ef docs: refman: Add `arg_flattening` support 2022-04-07 17:16:26 -04:00
Daniel Mensinger 0808ae1b3d docs: Document argument flattening 2022-04-07 17:16:26 -04:00
Daniel Mensinger 8e13e63fca docs: Fix [[true]] --> `true` 2022-04-07 17:16:26 -04:00
Xavier Claessens 7954a4c9cb wayland: Also lookup scanner in pkgconfig
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-04 09:17:34 -04:00
Eli Schwartz 105bbaabdd
project tests: log the reason why a test is skipped
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-03 16:06:33 -04:00
Eli Schwartz ce7a67e511
project tests: do not use tqdm progress bars for a single test
This can happen for example with `--only fpga` as that category has
exactly one test.
2022-04-03 16:06:33 -04:00
John Ericson 01a7aa0a4d Document and test env vars a bit better 2022-04-03 10:58:03 -07:00
Daniel Mensinger 4dd6cb8469 cmake: Better error message when configuring a CMake subproject fails. 2022-04-03 12:04:21 -04:00
Daniel Mensinger 2c4c7f6e64 Fix CMake error message 2022-04-01 15:22:17 -04:00
Christoph Reiter 26903d7b12 main: Make the msys/python check work again, in some cases
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-01 13:15:33 -04:00
Eli Schwartz cc8e67ce59
docs: fix inaccurate description of command targets
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-04-01 07:03:35 -04:00
Eli Schwartz fdcc566590
i18n: don't let our maintainer targets run via wrapped env
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-31 22:52:31 -04:00
Eli Schwartz 8ae2bf5a9e
allow RunTarget to skip wrapping due to env
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-31 22:52:31 -04:00
Eli Schwartz 3455f21f72
docs: note that find_program accepts file objects
This was implemented in commit 280346da3a
but never properly documented (it predated the version-controlled docs).
2022-03-31 22:52:31 -04:00
Jussi Pakkanen a7356f6bf2 Handle same Framework multiple times in Xcode. 2022-03-31 21:30:16 -04:00
Jussi Pakkanen 6f24ab9407 Handle feed and capture in xcodebackend. 2022-03-31 21:30:16 -04:00
Eli Schwartz 1cfead6647
fix continued breakage in gnome module API
In commit 823da39909 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-31 14:50:27 -04:00