Commit Graph

11782 Commits

Author SHA1 Message Date
Dylan Baker b7a3457765 modules/gnome: fix missing install_dir, again, harder
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
2021-10-28 17:39:24 -04:00
Paolo Bonzini a077aaad99 mtest: accept very long lines
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>
2021-10-28 15:32:46 -04:00
Dylan Baker ae35b1f45a modules/gnome: ensure that `install_dir` is set
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
2021-10-27 20:50:29 -04:00
Xavier Claessens 3902bd4ef1 Fix add_install_script() ignoring install_tag
Fixes: #9454
2021-10-27 20:49:28 -04:00
georgev93 18e4b3f4f9 Changing xc16's linker from 'xc16-gcc.exe' to 'xc16-gcc'. Windows will
still find the correct linker and now linux will be able to use its
xc16-gcc as the linker.
2021-10-27 15:25:20 -07:00
Xavier Claessens ef255db73a test_clang_format: Do not assume meson source is in git
Fixes: #9437
2021-10-27 15:32:57 -04:00
Xavier Claessens 8eaa2be5d9 Fix crash when getting cuda options
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
2021-10-27 15:29:44 -04:00
Eli Schwartz 6ed1332603 wrap: fix support for git < 2.28
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
2021-10-27 10:44:11 -04:00
Matthieu Gautier 135b3bc0fd Fix markdown list in Bultin-options.md [skip ci]
The broken list was introduce by commit f72ee8e7 which fix too long lines.
2021-10-27 10:07:25 -04:00
Eli Schwartz e51dfe0bb7 remove public export of private function 2021-10-27 09:59:08 -04:00
Eli Schwartz 9ec3b99a4f do not repeat magic regexes for cmake define replacements
We already have this magic string in mesonlib, and this should always
have used the cmake@ format which is identical to the meson format other
than the regex.
2021-10-27 09:59:08 -04:00
Eli Schwartz f4b91c4306 Revert "mark a couple of typing-only imports as noqa, to appease pyflakes"
This reverts commit 6cc1b8441c.

The latest version of pyflakes learned to detect that correctly.
2021-10-27 09:51:52 -04:00
Eli Schwartz 8947352889 fix various flake8 whitespace errors 2021-10-27 09:51:52 -04:00
Eli Schwartz 81a2c1b36d
remove unused imports 2021-10-26 20:53:43 -04:00
Eli Schwartz b1f0eec38f
fix lgtm.com "Use of the return value of a procedure"
we return _log even though this entire family of functions returns None,
because a side effect of returning is that the other version of the
function is not run.

We can do that more obviously, using an else clause that doesn't attach
meaning to return values.
2021-10-26 20:53:43 -04:00
Eli Schwartz 739de7b088
unittests: use better assert methods
assertTrue and assertFalse are recommended against, if you can get a
more specific assertion. And sometimes it is considerably shorter, for
example we have a custom assertPathExists which we can take advantage
of.
2021-10-26 20:53:43 -04:00
Eli Schwartz 67792fc223
do not save unused variable
Constructing a PackageDefinition is enough to assert that it raises an
error.
2021-10-26 20:53:43 -04:00
Eli Schwartz e0b86a8d38
remove unused variable
It never made sense here to save self.init() which returns a string
containing a log or stdout or something, and which was never actually
used.

Also we then overwrote the variable with a pathname...
2021-10-26 20:53:42 -04:00
Eli Schwartz 7b53c26501
remove dead code that is immediately overridden
In commit d932cd9fb4, we migrated to
meson's own static linker definition, and the old code that hardcoded
two of the possible exelists should have been removed in the process.
2021-10-26 20:53:42 -04:00
Eli Schwartz 1979132a9d
do not save variable when all we want is the side effect of popping it
It's redefined on every loop iteration, and as the comment says, we just
want to make sure the next loop skips a value.
2021-10-26 20:53:41 -04:00
Daniel Mensinger 0fea9965ad interpreter: Revert old path joining behavior (fixes #9450) 2021-10-26 15:16:11 -04:00
Xavier Claessens 89e9b50292 doc: Requires hotdoc >=0.13.7
Building documentation fails with older hotdoc versions.
2021-10-26 18:02:09 +02:00
Xavier Claessens 6298e29070 message: Allow bool
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
2021-10-26 10:59:13 -04:00
Thomas Heijligen ecdf192f46 dep.name(): return dependency name even if dependency is not found
The dep.name() function schould always return the name of the
dependency as documented. No matter if it was found or not.
https://mesonbuild.com/Reference-manual_returned_dep.html#depfound
2021-10-26 09:36:22 -04:00
Eli Schwartz 67e841720c
make sure the devenv powershell script is actually distributed
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 #9435
Closes #9443
2021-10-25 20:22:45 -04:00
Jussi Pakkanen 4840c86ec9 Add sccache support. 2021-10-25 19:59:49 -04:00
Xavier Claessens abaa980436 mcompile: Load coredata first because it checks major version
Fixes: #9444
2021-10-25 19:14:01 -04:00
Nirbheek Chauhan 6ea4e21b6d Fix typos in release notes for 0.60.0 2021-10-25 00:35:11 -04:00
Jussi Pakkanen 954fa95133 Bump version number for new development. 2021-10-24 19:09:47 +03:00
Jussi Pakkanen 39c268ce0d Create release notes page for 0.60. 2021-10-24 18:45:35 +03:00
Jussi Pakkanen f64e5cee6b Bump version number for release. 2021-10-24 18:12:07 +03:00
Jussi Pakkanen 475b8b1ad8
Merge pull request #9377 from mensinda/jsonDocs
docs: Add a JSON documentation backend
2021-10-24 17:46:05 +03:00
Moroz Oleg 012ec7d5b3 Add stdc++20 support for Visual Studio 2019 v16.11
fix #9242
2021-10-24 17:08:13 +03:00
Daniel Mensinger 2d8da3cb11 interpreter: Fix missing featuer check (fixes #9425) 2021-10-24 09:58:20 -04:00
Daniel Mensinger ffc8721465 cmake: Add support for the Linux CMake registry (fixes #9418) 2021-10-24 09:57:06 -04:00
Jussi Pakkanen 5aeed25617 Remove temp files that the macOS installer builder leaves hanging. 2021-10-24 03:04:37 +03:00
Jussi Pakkanen 4d8548aa06 Fix MSI creation with Python 3.10. 2021-10-24 03:04:13 +03:00
Dylan Baker 034b3a92d9 compilers/rust: fix typo in standard description 2021-10-21 13:48:01 -04:00
Dylan Baker 841dc2a4e7 compilers/rust: add support for the 2021 edition 2021-10-21 13:48:01 -04:00
Hofer-Julian 939394ed31 Fix typos
"seperator" -> "separator"
2021-10-21 06:57:57 -04:00
Olexa Bilaniuk 8fa5b90bf1 Add entries for new CUDA Toolkit versions. 2021-10-21 10:20:17 +05:30
Gabor Kertesz 60c8fedb95 Add support for win-arm64 to MSVC
For Windows on Arm win-arm64 platform, the corresponding vcvars
is called now.
2021-10-20 12:34:58 -04:00
Jussi Pakkanen cf587f39ea Update version number for rc2. 2021-10-19 17:00:45 +03:00
Gabor Kertesz 747982e6cb Fix NamedTemporaryFile file reopen issue on Win #9412
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.
2021-10-19 09:41:17 -04:00
Paolo Bonzini 492cc9bf95 linkers: detect LLD when built with PACKAGE_VENDOR
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>
2021-10-18 14:43:42 -07:00
Paolo Bonzini 8945c53711 mtest: limit "magic" CTRL+C behavior to process group leaders
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>
2021-10-18 15:16:10 -04:00
Matthew Brett 6718556571 Add missing but expected as exception clause
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))
```
2021-10-16 12:41:02 -04:00
Eli Schwartz f52a5a7cd3
wrap: move FeatureNew checks to a more natural place
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
2021-10-15 14:38:44 -04:00
Xavier Claessens a3f3ddf581 cuda: Override std=none to avoid host_compiler to emit -std argument 2021-10-14 14:17:50 -04:00
Xavier Claessens 8a0d12ec29 optinterpreter: Fix builtin option names not being reserved anymore 2021-10-14 14:17:50 -04:00