aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-09mtest: store all test results directly to TestRunHemmo Nieminen1-60/+57
Store return code, test result and additional error directly to the relevant TestRun instance. This reduces the number of individual arguments to other relevant functions that need to be passed around and thus simplifies the code. The test output (and error) were earlier similarly moved to be stored directly to the TestRun instance for the same reason.
2022-06-09mtest: store test output directly to a TestRun objectHemmo Nieminen1-33/+48
By storing test output directly to the TestRun instance we avoid the need to pass the outputs around in individual function arguments thus simplifying the code. The amount of individual arguments will be further reduced in a future commit.
2022-06-09mtest: print only one empty line before test summaryHemmo Nieminen1-1/+0
2022-06-09mlog: add support for italic/emphasized text in AnsiTextHemmo Nieminen1-0/+3
2022-06-09mtest: improve text test log formattingHemmo Nieminen1-13/+17
Write additional metadata such as exit details and try to visually differentiate the tests better from each other in the (textual) test logs.
2022-06-09mtest: differentiate stdout and stderr in test log text filesHemmo Nieminen1-2/+7
Make --no-stdsplit option affect test log text files as well. This means that if the option --no-stdsplit is used only "output" is seen not only on the console but in the test log text file as well.
2022-06-09mtest: print "live" test output when verbose with only 1 testHemmo Nieminen1-0/+2
Since running only one test sort of implies --num-processes=1 the "live" output of the test should be printed out when --verbose option has been given and running only a single test.
2022-06-09mtest: remove unused arguments from read_decode_lines()Hemmo Nieminen1-7/+5
The only time the argument would matter (console_mode == ConsoleUser.STDOUT) never happens as the only time the function is ever called is when parsing of the output is needed which in turns implies that console_mode != ConsoleUser.STDOUT.
2022-06-09mtest: introduce get_test_num_prefix() helper functionHemmo Nieminen1-5/+6
2022-06-09mtest: split TestRun's get_details() to multiple functionsHemmo Nieminen1-5/+11
These new functions will be used individually in later commits.
2022-06-09mtest: make ConsoleLogger's detail property a functionHemmo Nieminen1-8/+7
As fetching the returned data is non-trivial (we e.g. iterate over all subtest results) it is best not to hide that fact from the caller of the property / function.
2022-06-09mtest: show "timed out" messages with --print-errorlogs optionHemmo Nieminen1-1/+2
2022-06-09mtest: fix a couple of minor whitespace / typing issuesHemmo Nieminen1-5/+9
2022-06-08interpreter/kwargs: fix typoDylan Baker1-1/+1
2022-06-08build: correctly annotate _process_install_tag helperDylan Baker1-1/+1
Which could receive `None | Sequence[Optional[str]]`, but isn't annotated for the `None`
2022-06-08Revert "build: check for -fno-pic and -fno-pie while we're checking for pic ↵Dylan Baker1-5/+2
and pie" This reverts commit 5f02d0d9e164a5bcda072d223eaa5bc92b57747e. Which isn't correct, we have very strange behavior of "force on pie/pic or let the toolchain do whatever it wants, but you can't turn it off."
2022-06-08build: fix types added in CustomTarget.get_target_dependenciesDylan Baker1-3/+3
Because everything except ExternalProgram in CustomTarget.sources is a valid dependency
2022-06-08build: Fix type annotations for get_target_dependenciesDylan Baker1-4/+5
2022-06-08build: use inheritance properly for is_internalDylan Baker1-1/+4
Calling `isinstance(self, X)` is an anti-pattern, we should just be using inheritance for this, letting the `StaticLibrary` override the method, and having the base class always return `False`.
2022-06-08build: Fix annotations for CustomTargetDylan Baker2-1/+5
and fix a bug in the backend that the correct annotations uncover
2022-06-08build: Store depends in GeneratedList instead of GeneratorDylan Baker2-4/+8
Since they are actually dependencies out the output not the Generator itself. This fixes dependency issues in the ninja backend, allowing Meson to rebuild more accurately. It also does sometimes in the vs backend, but there are problems in the vs backend I'm not sure how to solve. The vsbackend is, itself, so fragile looking I don't want to get too involved with it.
2022-06-08backend/vs: "fix" handling of CustomTarget dependenciesDylan Baker1-3/+6
This doesn't actually fix the problem, but it provides parity with what is currently happening. I don't have access to a Windows machine to further debug, however, so not breaking anything is the best I can do ATM.
2022-06-08mesonlib: fix annotation of OrderedSet.differenceDylan Baker1-1/+1
Any iterable is acceptable, not just Set | OrderedSet
2022-06-08typing: replace ImmutableSetProtocol with typing.AbstractSetDylan Baker2-43/+4
Which does the same thing, but is a builtin and is more accurate
2022-06-08backends/ninja: Add missing type annotationDylan Baker1-1/+1
2022-06-08build: move typename to class level in Target subclassesDylan Baker1-7/+14
There's no reason for this to be defined at the instance level (and thus duplicated into each instance, when it's really a class constant.
2022-06-08build: check for -fno-pic and -fno-pie while we're checking for pic and pieDylan Baker1-2/+5
2022-06-08build: use a helper to process set install tagsDylan Baker1-4/+13
Which can be shared by BuildTarget
2022-06-07wrap: Add support for applying a list of patch filesPaweł Marczewski9-1/+172
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
2022-06-06compilers: Add support for stand-alone leak sanitizerMarco Trevisan (Treviño)3-3/+3
Leak sanitizer can be enabled without the whole AddressSanitizer, this can be done by passing -fsanitize=leak as documented at [1]. Meson doesn't support this, so add support for it. [1] https://clang.llvm.org/docs/LeakSanitizer.html
2022-06-03devenv: do not fatally error if pkg-config or bash-completion is not availableEli Schwartz1-1/+1
We might be using all fallbacks, or be super weird and not use bash-completion, or simply have a different PKG_CONFIG_LIBDIR set. And devenv already checks whether the dependency is found, but defaults to required anyway, which is wrong.
2022-06-01backends: work around some mypy limitations and fix spotted bugsDylan Baker1-15/+21
2022-06-01build: stop overwriting outputs, and replace the intended outputDylan Baker1-2/+4
Currently, the code puts a placeholder in for the first output, then replaces all of the outputs when it generates final value. Instead, let's only replace the placeholder value.
2022-06-01interpreter: add missing type annotationDylan Baker1-1/+1
2022-06-01interpreter: add location to a FeatureNew callDylan Baker1-2/+3
2022-06-01interpreter: use a shared KwargInfo for install_dirDylan Baker6-18/+21
CustomTarget allows multiple install dirs, while basically everything else allows only one. So this provides a shared instance for that.
2022-06-01dependencies: Fix d_module_version typesDylan Baker1-1/+1
It's a `List[str | int]`, just like in the build module. In fact, we should probably share the same type information between the two.
2022-06-01modules/gnome: fix gen_marshall annotationDylan Baker1-1/+1
2022-06-01targets: Fix annotations of get_install_dir to be accurateDylan Baker1-7/+7
2022-06-01ast: rename module constant to match PEP8 styleDylan Baker4-8/+13
2022-06-01ast/introspection: tidy up imports a bit more with __future__.annotationsDylan Baker1-3/+8
This lets us not import quite as much at runtime
2022-06-01ast/introspection: sort importsDylan Baker1-9/+10
2022-06-01modules: move gnome targets into gnome moduleDylan Baker3-18/+19
They're not used outside of the gnome module anyway, and they create some annoying potentials for dependency loops
2022-06-01compiler: Add missing needs_static_linker to base Compiler classDylan Baker1-0/+3
2022-06-01Add "in development" in release notes titleXavier Claessens1-3/+4
It was already written in the side menu, but better have it in the page title too.
2022-06-01Fix sandbox violation when using subproject as a symlinkVili Väinölä6-1/+35
Fix "Tried to grab file outside current (sub)project" error when subproject exists within a source tree but it is used through a symlink. Using subprojects as symlinks is very useful feature when migrating an existing codebase to meson that all sources do not need to be immediately moved to subprojects folder.
2022-05-31docs: fix incorrect linkEli Schwartz1-2/+2
When referring to the custom_target docs, we want to point to the docs on the function, not the docs on the returned method.
2022-05-31fix bug in i18n merge_file/itstool_join revealed by previous commitEli Schwartz2-19/+31
Logically, i18n.merge_file cannot ever take a MULTI_OUTPUT_KW, but it does take a CT_OUTPUT_KW-like interface. Actually trying to pass multiple merge_file outputs causes the msgfmthelper script to be entirely malformed in the arguments it accepts, and treat the broken one like a --flag, then exit with argparse errors. Even if we somehow assumed that somehow it was designed to actually allow this, msgfmt doesn't support conceptually passing multiple outputs so that would be a msgfmt error instead of an error inside the guts of `meson --internal msgfmthelper`. Same logic applies again for the itstool command and the itstool internal helper. Catch this error at configuration time by using the single-output kwarg form. Likewise, it's totally nonsense to accept multiple install_dir or install_tags, and ever since commit 11f96380351a88059ec55f1070fdebc1b1033117 the CustomTarget itself won't even check this.
2022-05-31rename a badly named KwargInfoEli Schwartz3-7/+7
CT_OUTPUT_KW is the same OUTPUT_KW we use in lots of places. The most distinctive thing about it is not that it's part of custom_target (basically any other function that uses such a kwarg follows the same rules due to using CustomTarget under the hood), but the fact that it takes multiple outputs.
2022-05-31fix regression that broke type checking of CustomTarget outputsEli Schwartz4-6/+12
We validate a few things here, such as the non-presence of '@INPUT' in an output name. These got moved out of the CustomTarget constructor in commit 11f96380351a88059ec55f1070fdebc1b1033117 and into KwargInfo, but only for kwargs that took multiple values. This caused configure_file() and unstable_rust.bindgen() to stop checking for this. Add a shared single-output KW and use it in both places. This now dispatches to _output_validator. configure_file now validates subdirectories in output names the same way we do elsewhere, directly in the typed_kwargs and by specifying the erroring kwarg.