aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-10Strip out garbage debug text.fromlongmsgJussi Pakkanen1-1/+5
2023-06-02docs: List vc++20 for cpp_stdNathan Kidd1-1/+1
vc++20 support was added in 012ec7d5b3379b035f1dd1369d74cafd26ff6ab0
2023-06-01pkgconfig: Add include directories from internal deps in -uninstalled.pcXavier Claessens7-23/+47
Fixes: #8651
2023-06-01python: Use detect.find_external_dependency() for log consistencyXavier Claessens2-9/+6
py.find_installation().dependency() was not logging whether it is found or not. Use find_external_dependency() for consistency.
2023-06-01vcs_tag: Add --always to git describeXavier Claessens1-1/+1
This fallbacks to short commit id in case the git repository does not contain any annotated tag, for example before the first release of a project.
2023-06-01mparser: Further cleanup node definitionsXavier Claessens1-98/+88
- Include BaseNode position in hash methods, integer is the most straightforward way of differentiating nodes. - Exclude non hashable fields from hash method. - Avoid using default values in BaseNode that way subclasses can have fields wihtout default value without repeating init=False. - Nodes that does not add fields does not need `@dataclass`. - Make all node types hashable because they can be used for feature_key in FeatureCheckBase.use(). - Remove unused type annotations
2023-06-01mparser: add equality operators to nodesDylan Baker1-54/+161
This makes use of dataclasses, but without a dataclass generated initializer. This means that we get nice `__repr__` and `__eq__` methods without having to type them by hand. Pylance understands `dataclass(init=False)`, but mypy doesn't. https://github.com/microsoft/pyright/issues/1753 https://github.com/python/mypy/issues/10309
2023-05-31mlog: put the module docstring at the top of the fileDylan Baker1-4/+5
Where it belongs. Otherwise it isn't rendered correctly
2023-05-31mlog: use StringProtocol where we said we shouldDylan Baker1-8/+1
Replace a long comment explaining that we need StringProtocol, with StringProtocol
2023-05-31mlog: use a hidden class for stateDylan Baker7-327/+364
This is a pretty common pattern in python (the standard library uses it a ton): A class is created, with a single private instance in the module, and then it's methods are exposed as public API. This removes the need for the global statement, and is generally a little easier to reason about thanks to encapsulation.
2023-05-31mlog: remove out-of-date commentDylan Baker1-2/+0
This comment is out of date, we have StringProtocol which is exactly what we wanted, and it's part of TV_Loggable already
2023-05-31mlog: remove direct calls to log_onceDylan Baker3-8/+8
This was never meant to be public API, log(once=True) is for that.
2023-05-31preprocess: Allow preprocessing any file extensionsXavier Claessens2-5/+11
2023-05-29avoid clearing the dependency cache unnecessarily based on wrap-modeEli Schwartz2-6/+2
We actually do not and should not care about wrap-mode at all for this. We want to cache dependency lookups whenever humanly possible, but only use them in cases where we would anyways be using them -- which in particular means if we said to force a subproject fallback for this dep, we want to bypass the cache. Currently, we handle this by always looking up the cache for all dependencies, but clearing the cache at startup if a reconfigure means we are changing our resolution strategy. This is bad -- we might have many dependencies that are worth caching, and only one dependency that should stop being cached and use a subproject instead. The simple solution is to handle the forcefallback case when doing a cache lookup, and not do a cache lookup at all. Now we don't have to nuke the entire cache. In fact, if a future reconfigure changes the forcefallback state back to not being forced, we can reuse the original cached dependency, which is still there. Closes #11828
2023-05-29avoid endless reconfigure loops when a build directory is copied aroundEli Schwartz1-1/+3
ninja's configured command for regenerating a build directory on any action that *requires* reconfiguring, specifies the source and build directories as they were known during initial project generation. This means that if the build directory is no longer the *same* build directory, we will regenerate... the original location, rather than the location we want. After that, ninja notices that build.ninja is still out of date, so it goes and reconfigures again. And again. And again. This is probably broken intentions, but endless reconfigure loops are a kind of evil beyond all evils. There are no valid options here whatsoever other than: - doing what the user actually meant - spawning a clear error message describing why meson refuses to work, then exiting with a fatal error But it turns out that it's actually pretty easy to do what the user actually meant, and reconfigure the current build directory instead of the original one. This permanently breaks the link between the two. Fixes #6131
2023-05-28tests: bump java compat level up to 8Eli Schwartz1-2/+2
Fedora's java package no longer supports 7.
2023-05-28ciimage: fix pathological brokenness in Debian packaging of pythonEli Schwartz1-0/+2
In this case, PEP 668 was created to allow a thing that Debian wanted, which is for `pip install foobar` to not break the system python. This despite the fact that the system python is fine, unless you use sudo pip which is discouraged for separate reasons, and it is in fact quite natural to install additional packages to the user site-packages. It isn't even the job of the operating system to decide whether the user site-packages is broken, whether the operating system gets the answer correct or not -- it is the job of the operating system to decide whether the operating system is broken, and that can be solved by e.g. enforcing a shebang policy for distribution-packaged software, which distros like Fedora do, and mandating not only that python shebangs do not contain `/usr/bin/env`, but that they *do* contain -s. Anyway, this entire kerfuffle is mostly just a bit of pointless interactive churn, but it bites pretty hard for our use case, which is a container image which is fortunately tested before deployment, so instead of failing to deploy because of theoretical conflicts with the base system (we specifically need base system integration...) we fail to deploy because 5 minutes into pulling apt updates at the very beginning, pip refuses point-blank to work. I especially do not know why it is the job of the operating system to throw errors intended for interactive users at people baking "appliance" containers who cannot "break" the system python anyway. Fix this by doing what Debian and Ubuntu should both have done from the beginning, and opting containers out of this questionable feature entirely. Note that CI images may still not actually complete their build/test cycle and be updated, because e.g. LLVM 16 issues tracked by #11642 or glib ASAN issues tracked by #11754.
2023-05-28Fix test failures on Darwin on a case-sensitive fsRandy Eckenrode3-3/+3
This issue was encounetered while working on a contribution to nixpkgs. Nix allows the store to be installed on a separate, case-sensitive APFS volume. When the store is on a case-sensitive volume, these tests fail because they try to use `foundation` instead of `Foundation`.
2023-05-26add refivar to users.mdNicholas Vinson1-0/+1
2023-05-26Update Users.mdNicholas Vinson1-2/+2
fix package ordering to so Q* and r* packages are in alphabetical order.
2023-05-25Autodetect installer path location.Jussi Pakkanen1-1/+5
2023-05-25run_single_test: add a --quick option to skip compiler/tool checkingDylan Baker1-2/+5
This can be the longest part of the entire test process, often with no benefit because we already know the environment is sane. So, let's have an option save some time.
2023-05-25mtest: wildcard selectionCharles Brunet5-7/+99
Allow the use of wildcards (e.g. *) to match test names in `meson test`. Raise an error is given test name does not match any test. Optimize the search by looping through the list of tests only once.
2023-05-25ProgressBar: Fix some rendering issuesXavier Claessens3-13/+27
- Do not hardcode terminal width of 100 chars, that breaks rendering on smaller terminal. It already uses current console width by default. - Disable progress bar when downloading from msubprojects because it fetches multiple wraps in parallel. - Scale unit when downloading e.g. MB/s. - Do not display rate when it's not a download. - Do not display time elapsed to simplify the rendering.
2023-05-24repair install_mode support for uid/gid effectively everywhereEli Schwartz8-2/+32
We silently dropped all integer values to install_mode since the original implementation of doing this in KwargInfo, in commit 596c8d4af50d0e5a25ee0ee1e177e46b6c7ad22e. This happened because install_mode is supposed to convert False (exactly) to None, and otherwise pass all arguments in place. But a generator is homogeneous and attempting to do this correctly produced a mypy error that FileMode arguments were allowed to be ints -- well of course they are -- so that resulted in the convertor... treating ints like False instead, to make mypy happy. Fixes #11538
2023-05-24remove inaccurate commentEli Schwartz1-6/+1
This convertor was initially implemented doing all the things the TODO says it doesn't yet do. The freestanding interpreter function is what doesn't do this.
2023-05-24Remove pointless install_umask validation check for NoneEli Schwartz1-1/+1
This option can never have a value of None. There are only two sources of values at all: - the class instance initializer when defining BUILTIN_CORE_OPTIONS - user-provided command-line or machine file values etc. which can only be meson types We know we don't construct the Option instance with None, and users cannot pass a None anywhere since that's not a meson type. The only reason this was ever checked for was as an artifact during the initial implementation of the option in commit 8651d55c6a317de37dcaa9965157151095a88292. At the time, a review comment was made that `-Dinstall_umask=none` was a bad UX and "preserve" should be used instead. Before that, this option type accepted `None` (in the BUILTIN_CORE_OPTIONS initializer) and `'none'` (provided by users) which is odd and should have consistently been the latter. Then inside set_value, it checked for the magic initializer value and converted it to the real value. After review comments and a force-push, the patch ended up using `None` in the initializer, and `'preserve'` everywhere else, and still handling both in set_value and converting both to a proper string. In the very next commit in the patch series, the initializer was migrated to use an actual umask of 022, and now `None` was entirely impossible to get anywhere at all. But the wart of checking for it was never removed. Remove it at long last.
2023-05-24azure pipelines: fix branch patterns to support 1.x release branchesEli Schwartz1-1/+1
I would like to use the same pattern rule as github actions uses: '[0-9]+.[0-9]+' But azure pipelines doesn't document what the syntax here is, and it scares me that perhaps the reason we didn't already do this is because it doesn't work at all.
2023-05-23docs: gnome: mention that compile_resources adds dependencies by defaultPablo Correa Gómez1-0/+2
It is not very clear from the documentation that the dependencies in the resource file are added as default dependencies to the target.
2023-05-23deprecate the buildtarget.get_id() methodEli Schwartz1-0/+3
This has never been undocumented and there's no obvious value to having it or using it. We're not even sure anyone ever has used it. Closes #6061
2023-05-23llvm: Bump broken micro version for CINirbheek Chauhan1-2/+2
16.0.4 didn't fix the LLVM breakage.
2023-05-23docs: Fix some typos in feature option examplesNirbheek Chauhan1-2/+2
2023-05-23qt: Allow specifying separate tools for qt4/5/6Nirbheek Chauhan3-11/+15
Currently you can only use one of qt4, qt5, qt6 in a single project when using a machine file because the config-tool lookup for qt only looks at `qmake` in the machine files, instead of looking up the binary names directly. Allow specifying `qmake` `qmake4` `qmake5` and `qmake6`. This is necessary for gstreamer, which can build separate qt5 and qt6 plugins that are distributed as static libraries, so the user can pick which one to use.
2023-05-22i18n module: check for a good enough msgfmt before permitting merge_fileEli Schwartz1-1/+10
The concept of merge_file intrinsically requires some GNU-specific functionality, so let's emit a useful error message during configuration, when we don't have that. The relevant GNU gettext versions date back to around 2015 so *probably* anyone has that too, but we may as well verify that while we are here.
2023-05-22i18n module: be broadly supportive of portable gettext toolsEli Schwartz1-1/+1
There are a number of implementations for msgfmt, supporting various options. The simplest, and most common, use case is to compile .po files into .mo files, and this should be able to work on gettext implementations other than the GNU one. The problem is that we were passing some pretty portable arguments in an unportable manner. The `-o` option-argument and its associated argument came after the input file operand, which violates the POSIX Utility Syntax Guidelines, and happens to not be supported by Solaris gettext. The GNU gettext doesn't care; GNU invented GNU argument permutation. Switch the order around so that our use respects the POSIX style.
2023-05-22intro: add more details to generated files(part 2)Charles Brunet2-2/+9
- add `extra_paths` to intro-tests.json to know paths needed to run a test on Windows; - add `depends` to alias targets in intro-targets.json to know what targets does an alias point to; - add `depends` to intro-dependencies.json to know libraries linked with an internal dependency; - renamed `deps` to `dependencies` in `intro-dependencies.json` for more uniformity.
2023-05-21Allow generator.process(generator.process(...))Volker Weißmann8-65/+148
Fixes #1141
2023-05-20rust: Add system libs used by rust std to staticlib external depsXavier Claessens4-10/+25
2023-05-20rust: Use Popen_safe() for sanity checksXavier Claessens1-11/+2
2023-05-20wrap: Check for common "provides" typoXavier Claessens1-0/+2
It is a common mistake that is hard to find because Meson silently ignore unknown sections. Better have an explicit error message.
2023-05-18Check dub version (#11794)Remi Thebault3-28/+62
* DubDependency._check_dub returns the version * check for compatible Dub version Dub versions starting at 1.32 have a new cache structure into which Meson doesn't know where to find compatible artifacts * skipping D tests involving Dub * refactor _check_dub makes mypy happier * make linters happy * localize some logic
2023-05-17summary: Add from which subproject each subproject have been calledXavier Claessens3-7/+13
2023-05-16rust compiler: use better sanity check logging comparable to the clike oneEli Schwartz1-7/+13
Don't spew debug-level info. Log the actual command line run.
2023-05-16meson_exe: print suitable debug information for DLL not found errorsEli Schwartz1-1/+2
It's particularly inscrutable if you do not know where DLLs weren't found because you don't know what the PATH was in the child process.
2023-05-15Metrowerks: move PCH args to the end of the command lineNomura1-1/+7
2023-05-13Make `dependency('foo', static: true, method: 'cmake') link staticallyVolker Weißmann3-1/+7
Fixes #1709
2023-05-13During reconfigure, show that no compiler was found, if compiler fails ↵Volker Weißmann6-19/+21
sanity check.
2023-05-13Fix paths of Fortran order dependenciesVolker Weißmann5-4/+22
Fixes #11047
2023-05-09docs: mention additional python modules needed for buildingEli Schwartz2-0/+14
Also check that they are available in meson.build. Closes #11772
2023-05-09docs: make the man page installableEli Schwartz1-0/+2
Users now have the *option* to run the documentation build and use `meson install` to install man pages.