We say:
> If version 4.2 or higher of the first is found, targets coverage-text,
> coverage-xml, coverage-sonarqube and coverage-html are generated.
But this is totally untrue. Make it true, by actually checking (and
not generating broken coverage commands when older versions of gcovr are
found).
Fixes#9505
Two tests are failing on Cygwin because the argument is passed as
a long-path and the Path is ending up as a short-path:
AllPlatformTests.test_run_target_files_path
Traceback (most recent call last):
File "/cygdrive/d/a/meson/meson/test cases/common/51 run target/check-env.py", line 22, in <module>
assert build_root == env_build_root
AssertionError
SubprojectsCommandTests.test_purge
> self.assertEqual(deleting(out), sorted([
str(self.subprojects_dir / 'redirect.wrap'),
str(self.subprojects_dir / 'sub_file'),
str(self.subprojects_dir / 'sub_git'),
]))
E AssertionError: Lists differ: ['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49[205 chars]git'] != ['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/s[196 chars]git']
[...]
['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap',
^^^^^^^^^^^
['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap',
^^^^^^^^
The fix is to not use the tempdir for all tests, but only for tests
that check the mode.
(cherry picked from commit 04ae1cfb79)
install: false was only available since 0.50, so we should not warn
people who support older versions to use something they cannot.
Fortunately, we can do FeatureDeprecated for this -- and then it even
gets summarized. Unfortunately, it's not well used, and certainly isn't
here.
It turns out this could be missing in GResource*Target as well, due
mostly to the same problem, side effects of mutating a shared
dictionary; though it could also happen with a specific set of keywords
given and other omitted.
Fixes#9350
Unless parsing TAP output, there is no strict requirement for
"meson test" to process test output one line at a time; it simply
looks nicer to not print a partial line if it can be avoided.
However, in the case of extremely long lines StreamReader.readline
can fail with a ValueError. Use readuntil('\n') instead and
just process whatever pieces of the line it returns.
Fixes: #8591
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Some custom_target()s may want to receive "fat" archives, so making use
of thin static_library() archives conditional only on it not being
installed, and without the possibility of an override by the user, is
undesirable. In #9453 I propose adding a thin: kwarg defaulting to true,
but that's a new feature that can only land in 0.61.
The `mkenums` functions can have this unset if, and only if, the
c file only variant is called. Due to side effects if the header file is
generated then `install_dir` is ensured to be set for the c file. I have
removed this side effect so that our tests actually cover this case.
Fixes#9472
We could have an OptionOverrideProxy of an OptionOverrideProxy,
recursively. This fix is a minimal subset of the refactoring I did in
https://github.com/mesonbuild/meson/pull/9394. Instead of faking
UserOption we can just do a shallow copy of one and set a new value on
it.
Fixes: #9448
both of these do the same thing:
init -b <branchname>
-c init.defaultBranch=<branchname> init
The latter contributes to unreadably long lines of code, but has the
advantage of working on older versions of git.
Fixes#9449
It has always been working even if not documented and there is no reason
to not accept it. However, change "True/False" to "true/false" to be
consistent with meson language.
Fixes: #9436
It's not a python file, so it will never end up in the installed package
unless we mark it as package_data. This causes problems for people using
non-git checkouts.
Fixes#9435Closes#9443
They always have been ignored but it became an hard error with no
deprecation period in 0.60.0. Since it breaks some GNOME projects,
deprecate for now and keep it removed for 0.61.0.
Fixes: #9441
NamedTemporaryFile can't be opened by name on Windows.
For Windows the created temporary bat file is now closed before
passing to a subprocess, prevented from removal automatically upon
close and deleted explicitly upon finish.
e7c972b606
added PACKAGE_VENDOR to lld, causing the -v output to start with "Homebrew LLD"
rather than just "LLD". Meson no longer detects it and fails the
test_ld_environment_variable_lld unit test.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
If meson is not a process group leader, a SIGINT will be delivered also to
its parent process (and possibly other processes). The parent process then
will probably exit and mtest will continue running in the background, without
any way to interrupt the run completely.
To fix this, treat SIGINT and SIGTERM the same way unless mtest is a
process group leader.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The `except` line was missing its `as e` clause.
As a result, when erroring out, after not finding a compiler, Meson
gives an error ending:
```
File "C:\Users\Matthew\AppData\Roaming\Python\Python39\site-packages\mesonbuild\mesonlib\vsenv.py",
line 100, in setup_vsenv
mlog.warning('Failed to activate VS environment:', str(e))
```
Now, warnings are unconditionally raised when parsing the wrap file,
whether they are used or not. That being said, these warnings literally
just check for a couple of keys used in the .wrap ini file.
Moving these checks from the time of use to the time of loading, means
that we no longer report warnings only when originally downloading or
extracting the file or VCS repo.
It also means we no longer report warnings in one subproject, when a
wrap file is picked up from a different subproject because the first
subproject actually does a dependency lookup. This caused issues for the
WrapDB tooling, which uses patch_directory everywhere and the
superproject requires a suitable minimum version of meson for this...
but individual wraps might use a much lower version, and would then
raise a warning (in strict mode, converted to an error) when it resolved
a dependency from another WrapDB project.
Fixes#9118
Add 'formatoptions' to improve comment formatting.
Set b:match_words. See :help matchit
Set b:browsefilter. See :help browsefilter
Add 'expandtab' from the style guide and a meson_recommended_style
config variable to allow users to disable style-related settings. This
is a defacto standard feature for ftplugins.