aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
AgeCommit message (Collapse)AuthorFilesLines
2022-02-16flake8: fix various whitespace errors with badly aligned codeEli Schwartz1-7/+8
2022-01-28modules/gnome: remove unnecessary type checkDylan Baker1-3/+0
This should have been removed when typed_kwargs was added
2022-01-28gnome: genmarshal: If the source includes the header, depend on itDylan Baker1-15/+18
Otherwise we're racing between the header generation and the source generation.
2022-01-28build: replace kwargs in CustomTarget initializerDylan Baker1-172/+211
Because we don't want to pass the Interpreter kwargs into the build layer. This turned out to be a mega commit, as there's really on elegant way to make this change in an incremental way. On the nice side, mypy made this change super easy, as nearly all of the calls to `CustomTarget` are fully type checked! It also turns out that we're not handling install_tags in custom_target correctly, since we're not converting the boolean values into Optional values!
2022-01-27modules/gnome: Allow gdbus_annotations to take an empty list againDylan Baker1-2/+3
This was allows up to 0.61.0 (including with the initial type annotations), but was accidentally broken by fixes for other bugs in 0.61.1. Fixes: #9883
2022-01-26gnome: Fix gtk4 pkgconfig nameBilal Elmoussaoui1-1/+1
2022-01-18modules/gnome: make some methods staticDylan Baker1-13/+25
Since they don't use the instance or class state, they should be static methods.
2022-01-18modules/gnome: fix remaining typing errorsDylan Baker1-8/+13
Which is one incorrect type annotation, and a couple of instances of concatenating lists of unlike types. List being invariant is super annoying.
2022-01-18modules/gnome: fix annotation to type that isn't definedDylan Baker1-1/+1
2022-01-18modules/gnome: fix _get_build_args type annotationsDylan Baker1-1/+2
2022-01-18modules/gnome: fix _make_typelib_target typesDylan Baker1-3/+4
2022-01-18modules/gnome: Fix typing with _get_dependencies_flags andDylan Baker1-17/+25
_get_gir_target_deps The typing issues with these are tightly intertwined, so it didn't really make sense to solve them independently
2022-01-18modules/gnome: fix issues with _make_gir_targetDylan Baker1-5/+13
2022-01-18modules/gnome: fix declared type of listDylan Baker1-1/+1
2022-01-18modules/gnome: use T.Sequence instead of T.ListDylan Baker1-2/+3
Which is pretty much necessary to make anything involving unions of lists work
2022-01-18modules/gnome: use itertools.chain instead of list concatenationDylan Baker1-1/+2
This is better as it avoids building unnecessary lists, and two fixes the typing issue from concatenating lists of different types.
2022-01-18modules/gnome: ignore the return type of _get_depDylan Baker1-2/+5
This is hard to fix, and it's really doing something bad anyway. But we know it's right, so just tell mypy to not worry about it.
2022-01-18modules/gnome: fix type annotations and issues with ↵Dylan Baker1-5/+9
_gather_typelib_includes_and_update_depends There is the problem of the annotations themselves, then there is the problem with depends being mutated. The mutation side effect is a problem in itself, but there's also the problem that we really want to use Sequence, which isn't mutable.
2022-01-18modules/gnome: define and annotate all instance variables in the initializerDylan Baker1-3/+5
2022-01-18dependencies: don't pass kwargs from get_pkgconfig_variableDylan Baker1-1/+1
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-15gnome.genmarshal: restore the ability to pass sources as Files objectsEli Schwartz1-2/+2
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-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-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-10gnome: fix typo in vapigen option metadatadirMichal Vasilek1-1/+1
This typo was introduced in 9ef36fa80bf4483bcd837ea3985a51ab533c7972 and can cause a build failure, because --metadatdir is not a valid vapigen option.
2022-01-02modules/gnome: replace yelphelper with run and custom targetsPablo Correa Gómez1-38/+91
This is basically a rewrite of the gnome.yelp target to remove the ad-hoc script, which generates multiple issues, including meson not knowing which files were installed. Closes #7653 Closes #9539 Closes #6916 Closes #2775 Closes #7034 Closes #1052 Related #9105 Related #1601
2021-12-20modules/gnome: use T.Sequence instead of T.ListDylan Baker1-3/+3
because List is invariant, and that's not what we want.
2021-12-20modules/gnome: use typed_kwargs for mkenumDylan Baker1-94/+65
This is the last function that doesn't use typed_kwargs. This now uses the same shared path as the mkenums_simple
2021-12-20modules/gnome: don't call through mkenums for mkenums_simpleDylan Baker1-33/+60
It's just a bad idea, but especially once we start adding type annotations to both of them.
2021-12-20gnome: use typed_kwargs for mkenums_simpleDylan Baker1-35/+52
the simple_version still goes through the big version of this function, but at last we have type checking
2021-12-20gnome: remove 'template' handling from mkenumsDylan Baker1-9/+1
This has never been in permittedKwargs, it does nothing, and it was never documented, so it seems pretty safe to just remove it.
2021-12-09modules/gnome: fix genmarshall install_dir defaultDylan Baker1-1/+1
Which needs to be converted from None to an empty list
2021-12-09modules/gnome: Fix handling of flags to genmarshalDylan Baker1-11/+11
These are actually just flags, they don't take any arguments (except prefix, which was already handled correctly), and as such their arguments should be booleans, not strings, and they should default to False.
2021-12-09modules/gnome: set genmarshal extra_args default to listDylan Baker1-1/+1
Which is what it should have been all along.
2021-12-07modules/gnome: replace FeatureDeprecatedKwarg with typed_kwargDylan Baker1-3/+6
Using the deprected_message helper.
2021-12-07modules/gnome: use typed_kwargs for generate_vapiDylan Baker1-47/+52
There is a change here, in that packages has error messaging for using IncludeDirs objects in the packages argument, but it never worked, so the message was useless.
2021-12-07modules/gnome: use typed_kwargs for genmarshalDylan Baker1-43/+57
2021-12-07gnome/genmarshal: Add missing kwargs to permittedKwargsDylan Baker1-1/+1
There are thee arguments that are passed directly to CustomTarget which are not in the permittedKwargs: depends, depend_files, and build_always. The first two are obviously generically useful, as they allow creating correct ordering. The latter, not so much. Since it was an error to pass it, we'll just delete it.
2021-12-06gnome module: deprecate passing false to install_dir_girEli Schwartz1-2/+10
Use a proper install option for this. Now `install_<type>` can directly override `install` instead of passing a boolean to the string kwarg `install_dir_<type>`.
2021-12-06gnome module: document and fix install_dir x3, by allowing false *_gir and ↵Eli Schwartz1-6/+24
*_typelib generate_gir forces building both the typelib and gir, and some people only want one or the other (probably only the typelib?) which means flagging the other as install_dir: false in the same way custom_target supports. As this always worked, albeit undocumented, make sure it keeps working. It's pretty reasonable to allow, anyway. Fixes https://github.com/mesonbuild/meson/pull/9484#issuecomment-980131791
2021-12-02gtkdoc: add support for a binary wrapperAlexander Kanavin1-1/+3
Make it possible to specify a wrapper for executing binaries in cross-compiling scenarios. (usually, some kind of target hardware emulator, such as qemu)
2021-11-23modules/gnome: import missing FeatureDeprecated for generate_girPablo Correa Gómez1-1/+1
Commit dbb109703e0b1f91965868c3ab193eff6e45eb22 broke generate_gir by using FeatureDeprecated without importing it.
2021-11-20add location nodes to some Feature callsEli Schwartz1-2/+2
2021-11-20convert more mlog.deprecation into FeatureDeprecatedEli Schwartz1-1/+2
2021-11-20fix missing subproject kwarg to FeatureDeprecatedEli Schwartz1-1/+2
We went straight to the extra message, which when parsed as a subproject string resulted in the Feature being entirely skipped because "project() has not been parsed yet" as it could not find a subproject named that.
2021-11-16modules/gnome: fix warning message that will always fireDylan Baker1-3/+2
`typed_pos_args` ensures that the length of args is always true.
2021-11-16modules/gnome: Add back deprecation messageDylan Baker1-0/+2
This looks like it was probably removed in a bad rebase
2021-11-08modules/gnome: use typed_kwargs for gdbus_codegenDylan Baker1-51/+70