aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-18interpreter: replace ConfigurationDataObject with ConfigurationDataHolderDylan Baker6-50/+55
This is much cleaner, and more in line with the way we handle interpreter objects in modern meson practice
2022-01-18build: move configuration_data initial value handling to build.ConfigurationDataDylan Baker1-9/+8
It really belongs here, not in the interpreter
2022-01-18interpreterobjects: clean up ConfigurationData initializerDylan Baker1-4/+2
2022-01-18interpreterobjects: use typed_* for configuration_data.set*Dylan Baker5-54/+29
This removes the ability to use ConfigurationData as a dict, but restricting the inputs to `str | int | bool`. This may be a little too soon for this, and we may want to wait on that part, it's only bee 8 months since we started warning about this.
2022-01-18interpreterobjects: use typed_* with configuration_data.merge_fromDylan Baker1-7/+5
2022-01-18interpreterobjects: use typed_* with configuration_data.get_unquotedDylan Baker1-7/+5
2022-01-18interpreterobjects: use typed_args for configuration_data.getDylan Baker1-12/+6
2022-01-18interpreterobjects: use typed_pos_args and noKwargs for configuration.data.hasDylan Baker1-1/+3
2022-01-18interpreterobjects: use typed_kwargs for dependency.get_variableDylan Baker2-8/+31
2022-01-18interpreterobjects: use typed_kwargs for dependency.get_pkgconfig_variableDylan Baker2-2/+18
2022-01-18dependencies: don't pass kwargs from get_pkgconfig_variableDylan Baker7-36/+31
This is a layering violation, we're relying on the way the interpreter handles keyword arguments. Instead, pass them as free variables, destructuring in the interpreter
2022-01-18interpreterobjects: use typed_kwargs for FeatureOption.requireDylan Baker2-10/+14
2022-01-18interpreterobjects: use typed_pos_args for FeatureOpotionDylan Baker1-10/+4
2022-01-18interpreterobjects: use typed_pos_args for dependency.as_system_methodDylan Baker1-11/+3
2022-01-18interpreterobjects: use typed_pos_args for dependency.get_configtool_variableDylan Baker1-8/+3
2022-01-18interpreterobjects: use typed_pos_args for dependency.get_pkgconfig_variableDylan Baker1-8/+3
2022-01-18interpreterobjects: consistently use dependency. for error messagesDylan Baker1-16/+16
We currently use a mixture of dependency, Dependency, and dep
2022-01-18wraps: implement exponential backoff for downloading filesEli Schwartz1-1/+12
Implementation modeled after mesonlib.windows_proof_rmtree(). Implements the other half of #9688
2022-01-18wraps: on failure to apply a patch, delete the subproject directoryEli Schwartz1-2/+6
This code path is only called on initial download of a subproject, but if we raise an error and abort while downloading/applying a patch overlay we still have the upstream sources extracted... which appears to be a subproject, then turns out to be broken due to missing meson.build Partially implements #9688
2022-01-17index.md:add link to GitHub Discussions sectionandy59951-5/+7
2022-01-16Add a test for the --vsenv meson setup optionNirbheek Chauhan5-17/+57
The tests and the unittests both unconditionally call setup_vsenv() because all tests are run using the backend commands directly: ninja, msbuild, etc. There's no way to undo this vs env setup, so the only way to test that --vsenv works is by: 1. Removing all paths in PATH that provide ninja 2. Changing setup_vsenv(force=True) to forcibly set-up a new vsenv when MESON_FORCE_VSENV_FOR_UNITTEST is set 3. Mock-patching build_command, test_command, install_command to use `meson` instead of `ninja` 4. Asserting that 'Activating VS' is in the output for all commands 5. Ensure that compilation works because ninja is picked up from the vs env. I manually checked that this test actually does fail when the previous commit is reverted.
2022-01-16install: Setup VS env if we did that during setupNirbheek Chauhan1-1/+4
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-16Subprojects.md:add single quotes around subproject and variable nameAndy Alt1-1/+1
2022-01-15gnome.genmarshal: restore the ability to pass sources as Files objectsEli Schwartz5-21/+64
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-15Fix system include arguments for clang-clGatgat4-0/+24
2022-01-14docs/dep.yaml: davault -> defaultDylan Baker1-1/+1
2022-01-15tests: Add a partial test for gtk_doc check: kwargNirbheek Chauhan1-1/+2
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-15tests: Add regression tests for gdbus_codegen argsNirbheek Chauhan2-1/+22
https://github.com/mesonbuild/meson/pull/9812
2022-01-15tests: Add a regression test for gtk-doc argumentsNirbheek Chauhan5-0/+14
gobject_typesfile html_assets https://github.com/mesonbuild/meson/pull/9807
2022-01-15tests: Add a regression test for vapigen metadatadirNirbheek Chauhan2-0/+8
https://github.com/mesonbuild/meson/pull/9806
2022-01-12gome.gdbus_codegen: fix annotations argument for multiple annotations, harderEli Schwartz1-6/+27
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 ef52e60936665c982cd17a4a17c2045b445d8e6d, 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-13Search for Visual Studio Express when activating VS envDFOVIT1-0/+4
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-12subproject: fix version validation on lookupØyvind Aarrestad Aakre5-0/+23
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-12ninja backend: Fix custom_target() console: kwarg when using envDeclan Qian1-1/+2
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-11fix typo in error messageEli Schwartz1-1/+1
2022-01-11gnome.gdbus_codegen: allow File objects as XML fileEli Schwartz1-2/+2
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-11gnome.gtkdoc: fix passing file arguments as a configured fileEli Schwartz1-6/+6
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-11gome.gdbus_codegen: fix annotations argument for multiple annotationsEli Schwartz1-1/+1
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-11link to mesa website instead of gitlabErik Faye-Lund1-1/+1
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-10fix broken module tests which caused gtkdoc-check to traceback on assertEli Schwartz1-1/+4
Regression in commit 566c2c9a9c98d13f85ccef624e9ac584f64c6a4a. 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-10depfile: type annotateDylan Baker2-15/+21
2022-01-10first pass at migrating to dataclassesEli Schwartz7-281/+259
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-10manually clean up some python 3.6 era codeEli Schwartz2-12/+3
2022-01-10port from embedded data to importlib.resourcesEli Schwartz8-545/+23
2022-01-10condense linesEli Schwartz1-2/+1
2022-01-10pyupgrade --py37-plusEli Schwartz6-8/+7
2022-01-10bump minimum required version of python to 3.7Eli Schwartz9-13/+22
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-10update ubuntu bionic to use python 3.7Eli Schwartz1-1/+8
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-10clean up even more function signatures in preparation for dataclassesEli Schwartz1-2/+2
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-10docs: fix rust module bindgen argumentsDylan Baker1-5/+5
Fixes: 9795