Commit Graph

12085 Commits

Author SHA1 Message Date
Nirbheek Chauhan 1cda222a1a install: Setup VS env if we did that during setup
Otherwise we might not find a ninja that was picked up from the Visual
Studio installation.

```
$ meson setup _build
...
Activating VS 15.9.40
...
Found ninja-1.8.2 at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.EXE"
$ meson compile -C _build
Activating VS 15.9.40
...
$ meson install -C _build
Can't find ninja, can't rebuild test.
```

Fixes https://github.com/mesonbuild/meson/issues/9774
2022-01-16 23:42:19 +05:30
Andy Alt d9dee508ae Subprojects.md:add single quotes around subproject and variable name 2022-01-16 02:04:37 +05:30
Eli Schwartz 96d0005744 gnome.genmarshal: restore the ability to pass sources as Files objects
It used to support:
- a single string
- an array of anything

And as long as CustomTarget supported it too, everything worked fine.
So, a `files('foo')` worked but a `files('foo')[0]` did not, which is
silly... and it's not exactly terrible to use files() here, the input is
literally a list of source files.

Fixes building gnome-terminal
Fixes #9827

Test updated by Nirbheek Chauhan <nirbheek@centricular.com>
2022-01-15 23:50:14 +05:30
Gatgat f3a8e5d3b2 Fix system include arguments for clang-cl 2022-01-15 22:00:05 +05:30
Dylan Baker 9cc222c048
docs/dep.yaml: davault -> default 2022-01-14 19:20:31 -08:00
Nirbheek Chauhan f35e2fcb3e tests: Add a partial test for gtk_doc check: kwarg
check: true is needed for an actual regression test, but that requires
a pedantically correct gtk-doc configuration, which I attempted to do
and failed. So let's just put check: false so we get *some* coverage:
just that typed_kwargs accepts the argument.

Related to https://github.com/mesonbuild/meson/pull/9807
2022-01-15 00:38:14 +05:30
Nirbheek Chauhan ca0c757770 tests: Add regression tests for gdbus_codegen args
https://github.com/mesonbuild/meson/pull/9812
2022-01-15 00:38:14 +05:30
Nirbheek Chauhan 23bc0e6422 tests: Add a regression test for gtk-doc arguments
gobject_typesfile
html_assets

https://github.com/mesonbuild/meson/pull/9807
2022-01-15 00:38:14 +05:30
Nirbheek Chauhan 67bb25b246 tests: Add a regression test for vapigen metadatadir
https://github.com/mesonbuild/meson/pull/9806
2022-01-15 00:38:14 +05:30
Eli Schwartz bda11fe25d gome.gdbus_codegen: fix annotations argument for multiple annotations, harder
The original attempted fix only allowed configuration to succeed, but
not building. It was modeled based on the gdbus-codegen documentation,
which states:

  --annotate WHAT KEY VALUE WHAT KEY VALUE WHAT KEY VALUE
                        Add annotation (may be used several times)

which clearly indicates that gdbus-codegen accepts an --annotate flag
that is followed by a multiple of 3 values, despite this not actually
working.

The manpage actually contradicts the --help text:

   --annotate ELEMENT KEY VALUE
       Used to inject D-Bus annotations into the given XML files. []

... and gives examples that use multiple --annotate flags each with 3
arguments.

To better understand what meson is supposed to do here, we should look
at ef52e60936, which ported to
typed_kwargs. There is actually a big chunk of code to handle
annotations that got completely dropped, leading with a comment (that
did not get dropped): "they are a list of lists of strings..."

Reimplement this logic inside a validator/converter for the annotations
kwarg container:

- do not listify, we don't accept `annotations: ''` and listify is
  supposed to be for when either x or list[x] is valid

- go back to checking for a list of exactly 3 values

- allow a list of the aforementioned, in the traditionally expected
  form:

  [
    ['foo1', 'foo2', 'foo3'],
    ['bar1', 'bar2', 'bar3'],
  ]

- pass one --annotate flag per 3-value-list

And add some better error reporting for the cause of errors when
processing lists of lists.
2022-01-12 18:55:25 -08:00
DFOVIT eeb110ab02 Search for Visual Studio Express when activating VS env
Visual Studio Express does not come with the
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' workload.
This adds a check for the 'Microsoft.VisualStudio.Workload.WDExpress'
workload. Non-express versions take precedence over express versions
when activating.
2022-01-13 01:14:26 +05:30
Øyvind Aarrestad Aakre 5b3094d43b subproject: fix version validation on lookup
Fixes a bug where the subproject version was not validated
when the subproject had already been processed.

The bug would cause inconsistent build results if the subproject was
referenced more than once (diamond) with conflicting version requirements.
2022-01-12 14:04:11 -05:00
Declan Qian bc8c1f578f ninja backend: Fix custom_target() console: kwarg when using env
When a custom_target() uses an env, meson uses a wrapper
script to run the executable. This breaks the console: kwarg
because the wrapper script buffers the output. Fix it by setting
the verbose flag which will not buffer output.
2022-01-12 21:22:22 +05:30
Eli Schwartz 71540d1841 fix typo in error message 2022-01-11 22:28:00 -08:00
Eli Schwartz 63593a5528 gnome.gdbus_codegen: allow File objects as XML file
As soon as we check for args[1] we declare it is of type FileOrString,
and the additional ones specified in the `sources` kwarg explicitly
allow this. It makes no sense to not accept it as the posarg too.

Fixes building tracker-miners.
2022-01-11 22:28:00 -08:00
Eli Schwartz bcfb4d0f46 gnome.gtkdoc: fix passing file arguments as a configured file
Fixes gtk3 build, which uses typesfile.

All these arguments are processed by a function that explicitly handles
both str and File, and converts them to absolute paths. They clearly
need to handle File objects.
2022-01-11 22:28:00 -08:00
Eli Schwartz 704e9802c9 gome.gdbus_codegen: fix annotations argument for multiple annotations
Per the gdbus-codegen documentation, this "may be used several times",
and it is:
- a valid use case
- used that way in the wild

Fixes building at least geoclue2, gdm.
2022-01-11 22:28:00 -08:00
Erik Faye-Lund f956b95712 link to mesa website instead of gitlab
The mesa website is a bit more helpful as an introduction to the project than the gitlab-project. So it seems better to link there instead.
2022-01-11 10:03:54 -05:00
Eli Schwartz 81fbcd1df4
fix broken module tests which caused gtkdoc-check to traceback on assert
Regression in commit 566c2c9a9c.

The interpreter details are a bit of black magic. Functions expect
tuples, but they receive lists and then the type-checking decorators
convert those to tuples.

So, directly manhandling a self._interpreter.func_*() but passing it the
tuple it nominally expected, actually explodes in your face by way of
failing an assert, then dumping 'ERROR: Unhandled python exception'.

Fixes use of gnome.gtkdoc(..., check: true), for example when building
glib.
2022-01-10 23:06:51 -05:00
Dylan Baker fe51450970 depfile: type annotate 2022-01-10 23:06:20 -05:00
Eli Schwartz 4b351aef26
first pass at migrating to dataclasses
In some cases, init variables that accept None as a sentinel and
immediately overwrite with [], are migrated to dataclass field
factories. \o/

Note: dataclasses by default cannot provide eq methods, as they then
become unhashable. In the future we may wish to opt into declaring them
frozen, instead/additionally.
2022-01-10 18:36:57 -05:00
Eli Schwartz 98a41ec24e
manually clean up some python 3.6 era code 2022-01-10 18:36:57 -05:00
Eli Schwartz 140097faf0
port from embedded data to importlib.resources 2022-01-10 18:36:57 -05:00
Eli Schwartz be6e09bfdb
condense lines 2022-01-10 18:36:57 -05:00
Eli Schwartz 751f84405e
pyupgrade --py37-plus 2022-01-10 18:36:56 -05:00
Eli Schwartz ad525dcce4
bump minimum required version of python to 3.7
Comment out the pending deprecation notice. It cannot be reached
anymore, but is still useful for the next time we do a version bump.
2022-01-10 18:36:56 -05:00
Eli Schwartz 0c30db20b1
update ubuntu bionic to use python 3.7
The pip package is for python 3.6, but installs pip for all versions of
python. Apparently. Including python 3.7.

So do all other packages, especially the ones where it doesn't work but
pip thinks it is installed anyway. Force a reinstall.
2022-01-10 18:36:56 -05:00
Eli Schwartz 6f8008cd7d
clean up even more function signatures in preparation for dataclasses
Names used in init functions are sometimes pointlessly different from
the class instance attributes they are immediately assigned to. They
would make more sense if defined properly.
2022-01-10 18:36:56 -05:00
Dylan Baker e77582b251 docs: fix rust module bindgen arguments
Fixes: 9795
2022-01-10 15:34:03 -08:00
Michal Vasilek 9952446a2a gnome: fix typo in vapigen option metadatadir
This typo was introduced in 9ef36fa80b and
can cause a build failure, because --metadatdir is not a valid vapigen
option.
2022-01-10 15:30:53 -08:00
Dylan Baker 1209b8820b compilers: push the compiler id to a class variable
It really is a per class value, and shouldn't be set per instance. It
also allows us to get rid of useless constructors, including those
breaking mypy
2022-01-10 15:53:26 -05:00
Eli Schwartz f67994476d remove the RPM module
It is unmaintained, broken (frequently for long periods of time) and not
really required for any meson functionality. Its purpose is to be used
as a one-shot tool for creating a distro package recipe, and then
deleted from your meson.build files.

Due to its fragile dependency on coredata implementation details, we
cannot assume it will reliably work, or continue to work, without
someone who is actively willing to take responsibility for it.

Even if that were to happen, this might be better off as an external
script that parses introspection data.

Closes #9764
Closes #9763
2022-01-10 20:21:40 +02:00
Jussi Pakkanen 251d6f0f5d
Merge pull request #9739 from mathstuf/armclang-support
Armclang support
2022-01-10 19:01:11 +02:00
Jussi Pakkanen 3ab08265c0 Bump version number for new development. 2022-01-10 19:00:28 +02:00
Jussi Pakkanen 9e1f20728f Prepare release 0.61.0. 2022-01-10 18:27:11 +02:00
Eli Schwartz 09f03a8424 add pending deprecation notice for python 3.6 2022-01-10 01:36:46 +02:00
Jussi Pakkanen 43c6860a3a Use VS 2022 release version for packaging. 2022-01-09 21:48:06 +02:00
x-yuri 84ac1b6fbb Running-Meson.md: fix a broken link 2022-01-10 00:45:13 +05:30
Jussi Pakkanen a311364f54 Remove docs for ghwt that got deleted ages ago. 2022-01-09 11:14:21 -05:00
Itoh Shimon a22d0f9a0a Fix typo. 2022-01-07 09:25:16 -08:00
Jussi Pakkanen 8b54ee58ef
Merge pull request #9773 from annacrombie/master
Add a man page backend to refman
2022-01-07 18:55:07 +02:00
Stone Tickle 2c4a98f851
add release notes for refman man page 2022-01-06 20:14:34 -06:00
Stone Tickle 71ea9e3d4c
add man page generation to build 2022-01-06 20:14:34 -06:00
Stone Tickle ac468a1394
add man page backend to refman 2022-01-06 20:14:29 -06:00
John Kilpatrick 484a389bbe Fix syntax highlighting Continuous-Integration.md 2022-01-05 18:59:04 -05:00
Stone Tickle 95057340b3
cleanup _extract_meson_version() 2022-01-05 11:32:03 -06:00
Ben Boeckel f30e83efd6 armltdclang: add support for ARM Ltd.'s `armclang` toolchain
This is another toolchain also called `armclang`, but it is not a cross
compiler like Keil's `armclang`. It is essentially the same as `clang`
based on its interface and CMake's support of the toolchain.

Use an `armltd` prefix for the compiler ID.

Fixes: #7255
2022-01-03 12:49:04 -05:00
Jussi Pakkanen 09f52a3817 Bump version numbers for rc1. 2022-01-02 22:22:31 +02:00
Jussi Pakkanen c8733f65b3
Merge pull request #9757 from eli-schwartz/broken-types
Fix some broken type annotations
2022-01-02 21:48:28 +02:00
Jussi Pakkanen 117ba23071 Condense test directory numbers for rc1. 2022-01-02 19:07:36 +02:00