aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-03-23Prevent changing backend during reconfigure.keepbackendJussi Pakkanen1-0/+13
2023-03-21Fix run_tool() when git is not installedAlyssa Ross1-3/+3
Previously, it would raise an exception.
2023-03-20fix one more missing explicit "setup" subcommandEli Schwartz1-0/+1
2023-03-20project tests: add log of the setup command being runEli Schwartz2-6/+9
Followup to commit 2acb6ee79e24db047800da30f5f4ac52cb9c012d.
2023-03-20backends: add a new "none" backendEli Schwartz12-10/+91
It can only be used for projects that don't have any rules at all, i.e. they are purely using Meson to: - configure files - run (script?) tests - install files that exist by the end of the setup stage This can be useful e.g. for Meson itself, a pure python project.
2023-03-20tests: fix regression that broke mtest_inprocessEli Schwartz1-1/+1
In commit faf79f4539841cbf89fe8d53cf35aa91fd8273c9 we broke this utility function by referencing a non-existent variable. Fortunately, the only time we ever used said function was once, and that in a test case where we tested that it raised a MesonException before the undefined variable error could occur.
2023-03-20mtest: move the detection of rebuild compatibility out into the entry pointEli Schwartz1-6/+6
What we are mainly doing here is checking that the options make sense, or fixing that up if they don't. And in the next commit we will want to do that by also checking the build object.
2023-03-20backends: simplify class setupEli Schwartz9-9/+25
2023-03-20Add restat = 1 to the fortran_COMPILER ruleVolker Weißmann1-1/+4
gfortran does not update the modification time of *.mod files. Fixes #11552
2023-03-19CUDA: make "Ampere" equivalent to SM8.0+SM8.6David Seifert1-1/+8
2023-03-18Small fix on how cc.sizeof (and similar functions) use the 'prefix' kwargVolker Weißmann1-14/+14
2023-03-17Better error message when custom_targets has duplicates in the output kwargVolker Weißmann1-0/+7
2023-03-17Fix "meson subprojects checkout -b" regressionXavier Claessens1-2/+3
The argument position is wrong since https://github.com/mesonbuild/meson/commit/1c631ec8abd34df9971ab03faf22d709f1c54348
2023-03-17fix meson compile with alias targetCharles Brunet2-4/+5
this fixes a bug introduced by #11528
2023-03-16coredata: Do not pickle it twiceXavier Claessens3-6/+16
Exclude coredata from build.dat because it gets pickled separately already.
2023-03-16Stop using replace_if_different() for coredata pickle fileDaan De Meyer4-31/+75
This was added in f774609 to only change the access time of the coredata file if the coredata struct actually changed. However, this doesn't work as pickle serializations aren't guaranteed to be stable. Instead, let's manually check if options have changed values and skip the save if they haven't changed. We also extend the associated unit test to cover all the option types and to ensure that configure does get executed if one of the options changes value.
2023-03-16modules/i18n: fix typo in gettext decoratorCorentin Noƫl1-1/+1
2023-03-16Disable codecov commentXavier Claessens1-0/+3
2023-03-16hotdoc: Install devhelp files at the right locationXavier Claessens2-6/+19
When devhelp is enabled, hotdoc generates a devhelp/ subdir that needs to be installed to /usr/share/devhelp/. Otherwise, the html/ subdir needs to be installed to /usr/share/doc/<project>/html/
2023-03-16prevent lib prefix warning from pkg-configCharles Brunet8-15/+16
2023-03-14add typename to AliasTargetCharles Brunet1-0/+3
It will allow to distinguish AliasTarget from RunTarget in introspection files (e.g. meson-info/intro-targets.json).
2023-03-14rewriter: fix indentation of kwargsCharles Brunet1-0/+2
2023-03-14rewriter: add missing command aliasesCharles Brunet1-3/+3
2023-03-14rewriter: activate vsenvCharles Brunet1-1/+2
2023-03-14rewriter: fix warning about empty sourcesCharles Brunet2-2/+4
2023-03-12Fix warning_level=everything with GCC 8David Robillard1-1/+3
This option was introduced with GCC 8.1.0 as in the original commit, but the value wasn't right initially and was volatile during the 8 series. To avoid this, this commit moves the warning to 9.1.0 (the next version we generally care about), since we don't want to get too deep into the weeds of point releases, and a warning not being used yet in some particular version of GCC isn't a big deal.
2023-03-11Make generator exe more resilient.Jussi Pakkanen1-2/+10
2023-03-09detect.py: Be more precise about detecting xtensa gcc toolchainsKhem Raj1-1/+1
clang --version can yield a string like below when its installed into such a directory clang version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9) Target: aarch64-yoe-linux Thread model: posix InstalledDir: /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux as you can see InstallDir has 'xt-' subtring and this trips the check to guess gcc if 'Free Software Foundation' in out or 'xt-' in out: Therefore, check if compiler output starts with xt- then assume it to be gcc Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-09tests: allow a long test to have more time to complete before timing outEli Schwartz1-2/+2
This test is intended to test really long output, so it prints 100k lines of stdout/stderr. It completes in two seconds on my machine, but the default 30-second timeout is apparently too much for CI, because on Windows we often get flaky tests due to this. e.g. we'll get within 200 lines of the end. Bump the CI time by x2. We know this isn't particularly surprising behavior, and allowing it to request another 30 seconds won't hang the CI. But it will save us from some spurious failures and restarted jobs.
2023-03-09configure_file: emit FeatureNew when a cmake-formatted file has too many tokensEli Schwartz2-8/+13
In commit 97a72a1c53e68cf53541285075b4000f7c85ccc6 we started to allow cmakedefine with 3 tokens, as cmake expects (unlike mesondefine). This would silently start working even if the declared minimum version was older than 0.54.1
2023-03-09emit FeatureNew warning for compiler.preprocess used multiple timesEli Schwartz1-0/+3
In commit c2a55bfe43fae1b44cf49a083297d6755c89e1cc multiple bugs were fixed, but a FeatureNew was only added for the one that was mentioned in the commit message. Make sure to warn users about the reliability of the one that wasn't mentioned, too.
2023-03-09compiler.preprocess should only update the private name per directoryEli Schwartz1-2/+5
We add a unique ID to each rule we create, to work around the use of an entire build target with private directory named "preprocess" per use of the preprocess() method. But this ID doesn't need to increment every time it is used anywhere -- only when it is used in the same subdir as a previous time. That is the only case where it could conflict. By making the increment counter per-subdir, we can avoid potential frivolous rebuilds when a new preprocess() is added in a different directory, the build is reconfigured, and all uses in the entire project tree suddenly get new output paths even if they haven't changed.
2023-03-09re-deduplicate feature warnings printed at the end of setupEli Schwartz2-2/+2
In commit eaf365cb3ef4f1c2ba66e07237d86a44089aff4f we explicitly sorted them for neatness, with the rationale that we were restoring intentional behavior and we only need a set for stylistic purposes. This actually wasn't true, because we never sorted them to begin with (we did sort the version numbers), but sorting them is fine. The bigger issue is that we actually used a set to avoid printing the same feature type multiple times. Now we do print them multiple times -- because each registered feature includes the unique node. Fix this by using both sorted and a set. Fix tests that should in retrospect have flagged this as an issue, but were added later on in the same series to check something else entirely, happen to cover this too, and were presumably copied directly from stdout as-is...
2023-03-09utils: fix annotation of pickle_loadDylan Baker3-11/+28
It's actually Generic, and we should use Generic annotations to get the correct result. This means that we don't have to assert or cast the return type, because mypy just knowns
2023-03-09dependencies: add pybind11 custom factoryEli Schwartz4-1/+40
This works with pkg-config and cmake without any special support. The custom factory adds further support for config-tool, via `pybind11-config`. This is useful because the config-tool will work out of the box when pybind11 is installed, but the pkg-config and cmake files are shoved into python's site-packages, which is an unfortunate distribution model and makes it impossible to use in an out of the box manner. It's possible to manually set up the PKG_CONFIG_PATH to detect it anyway, but in case that does not happen, having the config-tool fallback is extremely useful.
2023-03-09build: fully type CompileTargetDylan Baker2-9/+12
Which is pretty trivial
2023-03-09build: Add some missing annotations to BuildTarget initializerDylan Baker1-20/+62
2023-03-09build: move all Target attributes to dataclassDylan Baker1-11/+16
We'll want to be able to pass all of these to the initializer, so make them all available.
2023-03-09build: Add missing annotation to Target methodDylan Baker1-1/+1
2023-03-09build: make Target an abstract properties instead of doing hasattrDylan Baker1-5/+10
checks
2023-03-09interpreter: Add missing Union annotationDylan Baker1-1/+1
2023-03-05hotdoc module: properly error out when configuring failsEli Schwartz1-1/+2
We used to just abort during configure because we ran in-process and hotdoc's argparse would leak into our own process space. Now we fail to handle this case and succeed at configuring, only for building to fail because the hotdoc config file doesn't exist.
2023-03-04msubprojects: fix potential error when resetting a git checkoutBenoit Pierre2-3/+17
Untracked files need to be stashed too, or resetting may fail when trying to (re-)apply a patch that adds one of those untracked files.
2023-03-04typed_kwargs: Remove feature_validator as it's not currently usedXavier Claessens1-9/+0
2023-03-04typed_kwargs: Extend since_values and deprecated_values for typesXavier Claessens7-37/+81
2023-03-02run_mypy: accept the path to an alternative mypy executableEli Schwartz1-4/+3
mypy might be installed with a different python than the one run_mypy.py is using.
2023-03-02Revert "target python 3.10 as the mypy language version"Eli Schwartz1-1/+1
This reverts commit 0b7d935a846b8f2aa33b4e0d19fd7b4423d35df4. The issue is fixed in mypy 1.0.0 now.
2023-03-02run_mypy: passthrough unknown options to mypy itselfEli Schwartz1-2/+1
Useful for running as a thin wrapper in other contexts that expect the ability to run mypy itself with arbitrary arguments.
2023-03-02doc: remove unexisting operators from grammarCharles Brunet1-1/+1
2023-03-02mintro: redirect stdout to stderrCharles Brunet2-8/+14