aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-14add new FeatureBroken check class for annotating features that are really brokenEli Schwartz3-2/+40
This is useful for totally terrible stuff that we really dislike, but for some reason we are afraid to just use `mlog.deprecation()` and unconditionally tell people so. Apparently this is because it is totally absolutely vital that, when telling people something is so broken they should never ever ever use it no matter what, ever... we can't actually tell them that unless they bump the minimum version of Meson, because that's our standard way of introducing a **version number** to tell them when we first started warning about this. Sigh. We really want to warn people if they are doing totally broken stuff no matter what version of Meson they support, because it's not like fixing the thing that never worked is going to suddenly break old versions of meson. So. Here's some new functionality that always warns you, but also tells you when we started warning.
2023-06-14compilers: fix detection of ifx compilerEli Schwartz1-1/+1
The version output scraping for identifying strings checked for "IFORT" in parentheses after the executable name, which is probably a mistake by Intel. Current versions of ifx have "IFX" in parentheses there. Detect both. Fixes #11873
2023-06-14compilers: add logging for non c_or_cpp language detectionEli Schwartz1-11/+11
2023-06-14WIP: refactor loggable popen calls for consistencyEli Schwartz7-48/+33
2023-06-13coredata: Fix wrong stable_version valueXavier Claessens1-1/+1
2023-06-13Allow targetting Meson 1.2.0 when version is 1.1.99Xavier Claessens2-1/+11
When a project targets a dev version of Meson (e.g. 1.1.99) for experimenting, this allows to use: project(..., meson_version: '>=1.2.0') It avoids getting warnings when using FeatureNew for features introduced in 1.2.0.
2023-06-12env2mfile: Take pkg-config properties from envXavier Claessens1-0/+10
2023-06-12env2mfile: Take binaries from env for cross file tooXavier Claessens1-0/+1
2023-06-12env2mfile: Not all compilers have env for flagsXavier Claessens1-1/+3
2023-06-11ninja backend: fix cleandead deleting files that meson implicitly createsEli Schwartz1-3/+13
Specifically, when those files can be created by a build rule with one version of meson.build, and created as e.g. a shared_library alias symlink in another version of meson.build, the cleandead command will delete important files just because they don't happen to be created by ninja itself. Work around this by making a dummy rule that exists solely to insert the files into the build graph to trick ninja into not deleting them. Closes #11861
2023-06-08Fix name of boost_includedir propertySébastien Villemot1-1/+1
2023-06-08dependencies/llvm: strip default include dirsKarol Herbst4-5/+29
Fixes an issue with rust.bindgen if a cmake LLVM dependency with the system include_type is getting used as a dependency.
2023-06-07cargo/interpreter: Implement an interpreter for Cargo TOMLDylan Baker1-0/+451
This converts a Cargo TOML file into Meson AST Co-Authored-By: Thibault Saunier <tsaunier@igalia.com>
2023-06-07cargo/cfg: Add a parser for the rust/cargo cfg() expressionsDylan Baker3-1/+402
This uses a recursive descent parser + lexer to create an IR from cfg() expressions, which it then converts into meson IR.
2023-06-07cargo/version: add a function to convert cargo versioning to mesonDylan Baker3-0/+158
2023-06-07cargo: Add a builder module to the cargo packageDylan Baker3-0/+285
This is a helper, currently only used by cargo. It could be moved later if there are other users.
2023-06-07cargo/manifest: Add a file with type definitions of the cargo manifest formatDylan Baker1-0/+227
Co-Authored-By: Thibault Saunier <tsaunier@igalia.com>
2023-06-07azure pipelines: force python2 to be installedEli Schwartz1-0/+3
Azure pipelines is removing python2 from the hostedtoolcache, see https://github.com/actions/runner-images/issues/7401 We want to test that meson can still build modules for it, anyway.
2023-06-07unittests: fix incorrect calculation of bytecompile outputsEli Schwartz1-4/+5
If py2 is not found *and* the compiler is MSVC, we didn't take into account that py2 is not found. This also meant that we didn't take into account the expected count when it *is* found, because the python module has a better finder than just "is the binary on PATH".
2023-06-07tests: remove unnecessary non-meson syntax from meson.buildEli Schwartz1-2/+2
We don't use parentheses for the if function, because it's not a function.
2023-06-07tests: update llvm version exclusions for hopefully the last timeEli Schwartz1-6/+4
This is now fixed upstream and expected to be backported to the next point release.
2023-06-07tests: be DRY in llvm framework testEli Schwartz1-14/+15
It's a lot more readable to not repeat big arrays.
2023-06-07tests: avoid hard to debug error when llvm is found with only one methodEli Schwartz1-1/+1
In commit 89146e84c9eab649d3847af101d61047cac45765 we added some complicated code to verify the llvm framework's "combination" matrix lookup. It expects to find llvm with both cmake and config-tool, with the same version. But the sanity check is wonky -- it checks that both have the same found status, instead, so if both are not found then we proceed to try to convert the string "unknown" to a mapping of semver integers, and this is guaranteed to fail. This can happen for example if the system llvm exists in the general case, but actual modules cannot be found because the system llvm does not distribute static modules. For example, this is the case on Gentoo. Abort more obviously by just insisting that both be found. If they aren't both found, then investigative efforts know to look at why they weren't found.
2023-06-07dependencies: add more logging to configtoolEli Schwartz1-0/+5
When retrieving variables from the tool, log some debug output the same way that pkg-config does.
2023-06-08dependencies/qt: add support for Qt frameworks referencing includes in ↵Matthew Waters1-2/+5
include directory e.g. QtQml with Qt 6.4.0 referencing QtQmlIntegration is one such example
2023-06-07rust: PIC is always enabledXavier Claessens2-2/+6
rustc enables PIC by default and Meson currently has no way to force disabling PIC, it can only force enable or use compiler's default.
2023-06-06Override find_program('meson')Tristan Partin3-0/+45
This override transparently upgrades anyone using it to this better functionality. Fixes #8511
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.