aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31add types-PyYAML to lint workflowStone Tickle1-1/+1
2022-01-31print warning when using fastyaml loaderStone Tickle1-2/+7
2022-01-31mention fastyaml loader in the docsStone Tickle1-1/+4
2022-01-31add --quiet option to genrefmanStone Tickle1-0/+4
2022-01-31add fastyaml loaderStone Tickle2-65/+171
2022-01-29docs: find_program can return the current Python3 interpreterAndrea Pappacoda1-1/+3
This was the case since 067ff7eeae26eda8edc9f7f7432f551c3e373eaa, i.e. version 0.50.0. Fixes #3856
2022-01-30unittests: Fix warning about distutils deprecationNirbheek Chauhan1-2/+5
unittests/rewritetests.py:19: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.dir_util import copy_tree
2022-01-30ninja backend: Fix usage of same constants file for native and crossNirbheek Chauhan5-32/+39
For example: ``` meson builddir \ --native-file vs2019-paths.txt \ --native-file vs2019-win-x64.txt \ --cross-file vs2019-paths.txt \ --cross-file vs2019-win-arm64.txt ``` This was causing the error: > ERROR: Multiple producers for Ninja target "/path/to/vs2019-paths.txt". Please rename your targets. Fix it by using a set() when generating the list of regen files, and add a test for it too.
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 Baker13-465/+497
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-28interpreter: use find_program_impl instead of shutil.which for vcs_tagDylan Baker1-2/+1
This is the right thing to do, using which is wrong.
2022-01-28interpreter: remove dead code from custom_targetDylan Baker1-2/+0
This has been completely replaced by typed_kwargs now
2022-01-28interpreter: use typed_kwargs for vcs_tagDylan Baker2-24/+45
2022-01-27add location data to various Feature checksEli Schwartz4-21/+22
2022-01-27pkgconfig module: fix incorrect Feature logging for uninstalled_variablesEli Schwartz1-2/+2
The utility function that processes this for both 'variables' and 'uninstalled_variables' accepts a kwarg for the name of the argument, but then hardcodes 'variables' in the warning message. This is misleading.
2022-01-27do not report context on python traceback, for PermissionErrorEli Schwartz1-0/+5
It's not a MesonBug which needs to be reported, and the existing error already adequately points out the problematic file. It is impossible to get a PermissionError for files created by meson itself, once the build directory has been created, anyway.
2022-01-27modules/gnome: Allow gdbus_annotations to take an empty list againDylan Baker2-2/+13
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-27remove incorrect deprecated feature for vcs_tagEli Schwartz2-2/+1
In commit 06481666f4e74ecef01e59351fc345ab0962d998 this warning got moved from build.py to the interpreter. Unfortunately it got added to the wrong function... it is supposed to be part of custom_target and even mentions this as the feature_name. Since then, build_always became a KwargInfo and has the deprecated-since attribute baked into it. But it didn't have the additional message which it really should have. Add that message at the same time we remove it from vcs_tag.
2022-01-27move the version info for build_always* directly into the kwarginfoEli Schwartz2-4/+9
Rather than pointlessly evolving it in the exactly one place which it is used. It's not clear what the purpose for this was.
2022-01-27mark regex string as raw string to fix invalid escapesEli Schwartz1-2/+2
2022-01-27flake8: fix indentation styleEli Schwartz8-37/+37
2022-01-27flake8: fix wonky comment styleEli Schwartz1-1/+1
2022-01-27fix some flake8 violations for unused importsEli Schwartz4-5/+4
And one undefined T.cast name in a file that isn't yet mypy-ready anyway.
2022-01-27Checkout subproject submodules even when nestedWill Toohey1-3/+8
2022-01-26Popen_safe and wrappers can accept os.PathLike for cwdEli Schwartz2-4/+4
Do not require users to convert it to a string first. This is a waste of time and effort for exactly the same results.
2022-01-26gnome: Fix gtk4 pkgconfig nameBilal Elmoussaoui1-1/+1
2022-01-26docs: correct weakref typo in Reference-tables.mdArsen Arsenović1-1/+1
2022-01-26compilers/c_function_attributes: add retainArsen Arsenović3-0/+10
retain is a relatively young attribute which has proven itself useful for working with --gc-sections -z start-stop-gc.
2022-01-26mcompile: fix broken codepaths and restore orphaned codeEli Schwartz1-7/+5
In commit 928078982c8643bffd95a8da06a1b4494fe87e2b a good error message about the directory not being a valid build directory, was replaced by a worse message. In commit abaa980436f53100041bd5535589bb1c42019bd6 the error message was replaced by a traceback when trying to load the coredata before checking if it was a build directory. Revert back to using the helper function with the good error message. Reorganize code so that we check basic things first, and do less work before detecting errors. Fixes #9584
2022-01-26Add docs for JDK system dependencyTristan Partin1-0/+14
For whatever reason, the original PR was merged without documentation.
2022-01-25cygwin: fix python versions againEli Schwartz1-9/+2
Now cygwin seems to have completed a migration of the default python to 3.9, so that is where the devel package is at. Back out the changes from commit 3304a38496a52052ae9d58ed2459c7deb18ca703 and update the pip/wheel packages as appropriate.
2022-01-25docs: fix bad advice in the READMEEli Schwartz1-2/+2
Do not recommend running the 'upload' target by default in order to build the docs. That will fail with permission errors when trying to push to a repo most people don't have commit access to, and if they did have commit access it would be an even worse problem -- unpredictably overwriting the main website without any guarantee it was generated from the latest version of the docs! Plus, it does not actually work. The first thing it does is spawn an error message that required files do not exist, because the actual docs were not, in fact, built. So they cannot be uploaded either. The docs will build by default if you do not specify a non-default target. Fixes #9873
2022-01-25docs: fix command help regenerator on python 3.10Eli Schwartz1-1/+1
In https://github.com/python/cpython/pull/23858 the section header for option flags was changed from "optional arguments" to "options" with the rationale that they are not (necessarily) at all optional, while GNU coreutils calls them options. In fact, POSIX calls them options (-o) and option-arguments (-o val) and operands ("positional arguments") so it is indeed a mess, but argparse is not yet perfect. Still, fix the documentation generator for now so that it is compatible with python 3.10 as well. Fixes traceback on building the docs with: ``` [1/4] Generating gen_docs with a custom command FAILED: gen_docs.stamp /home/eschwartz/git/meson/docs/../tools/regenerate_docs.py --output-dir /home/eschwartz/git/meson/docs/builddir --dummy-output-file gen_docs.stamp Traceback (most recent call last): File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 160, in <module> regenerate_docs(output_dir=args.output_dir, File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 146, in regenerate_docs generate_hotdoc_includes(root_dir, output_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 113, in generate_hotdoc_includes cmd_data = get_commands_data(root_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 106, in get_commands_data cmd_data[cmd] = parse_cmd(cmd_output) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 65, in parse_cmd assert arguments_start AssertionError ```
2022-01-24properly error out when project version is an array other than files()Eli Schwartz1-2/+2
Due to the support for specifying version as files('VERSION'), we need to internally accept an array, since that is what files() returns. Before that, we didn't accept arrays, and after that, we don't intend to accept generic arrays, only arrays as a side effect of files(). So tighten the typechecking to ensure that that is what we actually get.
2022-01-23interpreterobjects: Don't warn on set10(bool)Dylan Baker1-1/+4
Python inherited a really bad design from C, booleans happen to be ints. Which is awful, but it's true. Fixes: #9858
2022-01-23Contributing.md:specify max line length for docsandy59951-4/+6
I thought it would good to specify a general rule here so people can set their line wrapping appropriately. [skip ci]
2022-01-23Subprojects.md:add extra detailandy59951-9/+24
This adds a link https://mesonbuild.com/Builtin-options.html#specifying-options-per-subproject in two different places and provides an example for changing the default options. This info is partially based on a [recent discussion](https://github.com/mesonbuild/meson/discussions/9830) between me and @eli-schwartz [skip ci]
2022-01-23cmake: require CMake 3.19 to get rid of Whitelist restrictionsDaniel Mensinger1-0/+5
2022-01-23cmake: Add TARGET_ generator expression support (fixes #9305)Daniel Mensinger7-13/+116
2022-01-23cmake: Move generator expression evaluation to the end of the traceparserDaniel Mensinger2-3/+35
2022-01-23Subprojects.md:add link to is_subproject()andy59951-1/+1
2022-01-22fix broken version annotations for the new itstool_join featureEli Schwartz2-2/+2
It was not added in 0.61.0 as that was already released.
2022-01-22Merge pull request #9742 from ximion/wip/itstoolJussi Pakkanen15-3/+308
i18n: Add support for joining XML localization via itstool
2022-01-21i18n: Add support for joining XML localization via itstoolMatthias Klumpp13-2/+305
2022-01-20python module: only find a pkg-config dependency from the found pythonEli Schwartz1-8/+21
If the found python returns None from sysconfig.get_config_var('LIBPC') then we cannot (and don't) set PKG_CONFIG_LIBDIR from it. In fact, we can virtually guarantee we won't find a PkgConfigDependency either, because any python that doesn't have a LIBPC is presumably not installed to the system pkg-config directory (maybe it's an isolated relocatable install, maybe it just doesn't have pkg-config support for who knows what reason). Trying to find one anyway using pkg-config's builtin search paths can unexpectedly succeed, though, by finding a completely unrelated python installation installed to a system location, which isn't the one we are actually building for. Instead, return early so that we use the system dependency class fallback. While we are at it, add back the debug messages from #3989 which got removed.
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-18run_mypy: add gnome moduleDylan Baker1-0/+1
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