aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-14Fix crash when a reconfigure adds a new subprojectXavier Claessens6-2/+26
When a subproject is disabled on the initial configuration we should not add it into self.coredata.initialized_subprojects because that will prevent calling self.coredata.init_builtins() on a reconfigure if the subproject gets enabled. Fixes: #10225.
2022-06-14add testcase for previous commitPaolo Bonzini4-8/+68
2022-06-14backend: always use the same code to compute the files in ExtractedObjectsPaolo Bonzini3-18/+9
Instead of asking the ExtractedObjects, but with a hook back into the backend, use the existing function in the backend itself. This fixes using the extract_objects(...) of a generated source file in a custom_target. It should also fix recursive extract_all_objects with the Xcode backend. Fixes: #10394
2022-06-14take override_option('unity=...') into account when allowing extract_objects()Paolo Bonzini8-10/+26
A single target could be picked for unity build, and in that case extract_objects() should not be allowed. Likewise for the opposite case, where extract_objects() should be allowed if unity build is disabled for a single target. A test that covers that case is added later.
2022-06-13ninja backend: generate additional meta-rules for test/benchmarks targetsEli Schwartz3-12/+24
'meson-test-prereq' now depends on any targets that were formerly added directly to 'all'. Behavior is not changed -- the all target still depends on this other meta-rule, and thus indirectly depends on all targets it used to depend on. It is now possible to build just the targets needed for the testsuite and then e.g. run `meson test --no-rebuild`.
2022-06-13unittests: do more accurate check for ninja "nothing to do"Eli Schwartz1-2/+2
We only want to scan stdout for these strings, and particularly, if we allow `-d explain` to be mingled into stdout, then buffering issues across OSes can lead to inaccurate results.
2022-06-13unittests: allow test commands to suppress returning stderrEli Schwartz1-5/+11
Add better logging of commands by printing stdout and stderr separately, if relevant. Also while we are at it, print the actual command being run.
2022-06-13flake8: remove unused variableEli Schwartz1-1/+1
2022-06-13flake8: don't use f-strings for strings without formattingEli Schwartz3-3/+3
2022-06-13flake8: fix non-idiomatic ordering of "if not in" checksEli Schwartz1-3/+3
2022-06-13flake8: fix various whitespace nitsEli Schwartz9-16/+16
2022-06-10add Feature checks for install_subdir creating an empty directoryEli Schwartz1-0/+7
Most importantly, tell people it's broken and to stop using it for 0.62.0
2022-06-10fix typo in IndepthTutorial.mdff1-1/+1
2022-06-10ACfL version detection with regexStepan Nassyr1-28/+6
2022-06-10Allow for 3-component ACfL versionsStepan Nassyr1-8/+26
2022-06-10treewide: various cleanups to move imports for mypy into typechecking blocksEli Schwartz17-59/+93
Along the way, add __future__ annotations where lacking.
2022-06-10flake8: remove import that was never usedEli Schwartz1-1/+0
Introduced via commit 0d0a4fa0fe02ca8297743a5a8e64ee72060cc990, probably in the course of heavy rebasing.
2022-06-10flake8: remove no longer used importsEli Schwartz4-4/+0
2022-06-10build: CustomTargetIndex.is_linkable_target misses '.dylib'Sutou Kouhei1-1/+1
CustomTarget.is_linkable_target has '.dylib'. See also 93b1d31af9d90f306aa104eee1e9be8e1ebbacad that added '.dylib' to CustomTarget.is_linkable_target but didn't add '.dylib' to CustomTargetIndex.is_linkable_target.
2022-06-10wayland: Lookup for wayland-scanner using pkgconfigXavier Claessens3-43/+46
Just like some of glib tools, wayland-scanner can be defined in the pkgconfig dependency variables. Share code between gnome and wayland modules into ModuleState.
2022-06-09intro-install_plan: fix destinations for build_targets with custom install_dirEli Schwartz4-15/+26
There are a couple issues that combine to make the current handling a bit confusing. - we call it "install_dir_name" but it is only ever the class default - CustomTarget always has it set to None, and then we check if it is None then create a different variable with a safe fallback. The if is useless -- it cannot fail, but if it did we'd get an undefined variable error when we tried to use `dir_name` Remove the special handling for CustomTarget. Instead, just always accept None as a possible value of outdir_name when constructing install data, and, if it is None, fall back to {prefix}/outdir regardless of what type it used to be.
2022-06-09mtest: do not process zero byte reads in read_decode()Hemmo Nieminen1-4/+5
AsyncIO.StreamReader.readuntil() occasionally raises IncompleteRead exception before a byte of data has been read. Do not process the "read" data in those cases.
2022-06-09mtest: enable access to the console logger instanceHemmo Nieminen1-3/+7
Store a reference to the console logger instance in a test harness' member variable to allow accessing it (and its logging utilities) from any other functions in test harness. This added functionality will be used in future commits.
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