Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes https://github.com/mesonbuild/meson/issues/10865
|
|
We need to support cases where the library might be called "foo.so" and
therefore we check for exact matches too. But this also allows
`cc.find_library('libfoo')` to find libfoo.so, which is strange and
won't work in many cases. Emit a warning when this happens.
Fixes #10838
|
|
|
|
A subproject could have a sub-subproject as a git submodule, or part of
the subproject's release tarball, and still have a wrap file for it
(e.g. needed for [provide] section). In that case we need to use the
source tree for the sub-subproject inplace instead of downloading a new
copy into the main project.
This is the case with GLib 2.74, it has a subproject "gvdb" as git
submodule, and part of release tarball, it ships gvdb.wrap file as well.
|
|
|
|
It can wait until after parsing the wrap file to set it.
|
|
|
|
It is common, at least in GNOME projects, to install tests. Files goes
into various locations, including:
- /usr/lib/x86_64-linux-gnu/installed-tests
- /usr/share/installed-tests
- /usr/libexec/installed-tests
It is safe to assume that everything that goes into a "installed-tests"
subdir should be tagged as "tests" by default.
|
|
itstool detects a language code from the mo fileâs basename,
so when https://github.com/mesonbuild/meson/commit/26c1869a142a952ffa23fe566a255b259304a39b
changed the file name to be prefixed with project name,
values like âmy-project-xxâ ended up in the `xml:lang` attribute
of the generated page files, instead of the expected
IETF BCP 47 language tag.
Letâs fix it by passing a locale code to itstool explicitly.
|
|
|
|
Fixes: #10845
|
|
Use set where order does not matter, fix is_source() to really mean only
source suffixes.
|
|
Unused "type:ignore"
|
|
Type annotation, documentation string, and implementation were doing 3
different things. Change implementation to match type annotation which
makes the most sense because it match what get_target_sources() does.
All callers only use keys from the returned dictionary any way, but
that's going to change in next commits.
|
|
This allows early exit of the project tests once a certain number of
failures are detected. For example `meson test --maxfail=1` will abort
as soon as a single test fails.
Currently running tests are marked as failed via INTERRUPT.
Resolves #9352
|
|
|
|
This was initially added in eb76ba7031f053a3c1 to avoid picking
it up from azure/gha images.
Looks like it is no longer set for some time now though:
https://github.com/actions/runner-images/pull/540
so should no longer be needed.
The empty string makes some meson tests fail which expect a path.
A recent msys2-runtime change now lets empty env vars through to child processes
whereas before they would get filtered out, which is why this worked before.
|
|
separator behaviour"
This reverts commit 3fd2459a748cc9eed4be73132b002400da81cb0a.
The underlying issue has been fixed and deployed:
https://github.com/msys2-contrib/cpython-mingw/pull/107
|
|
This does force a number of uses of `# pylint: disable` comments, but it
also finds a couple of useless global uses and one place (in the
previous commit) that an easy refactor removes the use of global. Global
is a code smell, so forcing adding a comment to disable helps force
developers to really consider if what they're doing is a good idea.
|
|
The `global` statement is only needed to assign to global variables, not
read or mutate them. So calling `global.mutate()` is fine, but not
`var = foo`, which would otherwise shadow `var`.
|
|
This removes the need for the use of the global statement. I've also
updated the test that overrides this to use mock.patch instead of hand
monkey patching.
|
|
We *mostly* just need to do the same thing. Plug in one utility method
to make sanity_check_impl find the right compile args, and plug in
DEVNULL to the test run. It's that simple.
This solves a few inconsistencies. The main one is that fortran never
logged the sanity checks to the Meson debug log, making it hard to
debug.
There's also some interesting quirks we built up in the dedicated
fortran handling. For example:
- in commit 5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9 we added cwd to
building the fortran executable, with a wordy comment about how the
compiler has defects. But the clike base has always done that on
general principle anyway, so we would never have had that bug in the
first place.
- in commit d6be7822a0a7391c9d2a22c053cd4fc61b5a71e4 we added special
deletion of an old "bad existing exe file" just for fortran. Looking
at the PR discussion for this odd requirement, it turns out that the
real problem is mixing WSL and native Windows without deleting the
build directory. This is apparently fortran specific simply because
"contemporary Windows 10 Fortran users" switch between the two?
The actual problem is that this never used .exe as the output name, so
Windows thinks you want to run something other than the thing you
asked to run, because it's not even a Window executable. But... the
common clike handling could have fixed that without needing special
cases.
|
|
This code dates back to 2012 and probably has no specific reason...
|
|
It is more correct to join commands with a command joiner than a
whitespace joiner.
|
|
Currently it repeats the text of the exception, which appeared
immediately above. And strerror is already part of args, so that was
then doubled. `str(e)` formats this much better anyway.
While we are at it, point out that it is probably a build environment
issue, rather than just saying "this is probably not a meson bug". The
former comes across a bit more as constructive advice rather than just
"idk but it's not our fault".
|
|
In commit fa044e011d5d7a3525c9b3f2acfe1cbf4a0a96a1 we caught OSError and
started emitting a special error message disclaiming that it probably
isn't Meson's fault, and skipping the generic "This is a meson bug and
should be reported" handler.
But, we no longer did this after verifying that the command *isn't*
runpython, so arbitrary scripts that raised OSError would start saying
stuff about Meson, which was wrong.
Start checking for runpython first.
|
|
Mostly just move a comment around back to where it's more relevant, and
handle MESON_FORCE_TRACEBACK once instead of twice.
|
|
In commit 9ed5cfda155c585f7aea896fe2f40d3a92eac43a we refactored
startup to be a bit faster and import less. But this had the side effect
of moving out of our errorhandler. Refactor this so it can be easily
used elsewhere.
|
|
"MSYSTEM= python ..." no longer works because of some changes in the MSYS2 runtime
Until this is fixed in either MinGW Python or the MSYS2 runtime this should revert
things to the previous behaviour to get the CI green again.
|
|
|
|
|
|
|
|
|
|
We already use textwrap.wrap() for that and it will correctly split on
spaces.
|
|
|
|
It is useful to redirect some outputs, such as "meson configure" to a
pager (e.h. less). This is similar to most git commands.
|
|
This will allow using colors and redirect print into a pager.
|
|
If neither pwsh.exe nor powershell.exe works, fallback to cmd.exe. This
script could be failing because of virus scanner.
|
|
gwmi command does not exist any more and is replaced by Get-CimInstance.
See https://github.com/PowerShell/PowerShell/issues/4766.
While at it, use a do..while loop to avoid duplicated lines.
Fixes: #10820
|
|
Include paths to different drives as absolute paths
fixes #8329
|
|
Fixes #10523
|
|
|
|
|
|
|
|
This found a couple of places where we *don't* want to use set(), and
want to use list() instead.
|
|
This finds a bunch of places where we can do more efficient string
splitting.
|
|
Which found a couple of places where we could write better code.
|
|
This makes it much easier to see what we're ignoring, as well as
allowing pylint to enforce any lints that currently pass but aren't in
the allow list automatically.
|
|
This used to be fine, until imports were removed from this file. Now a
function annotated as T.NoReturn doesn't actually tell mypy that it
cannot return, though, so we manually do it.
|
|
|