aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-22fix up some message strings that don't include "setup" in the configure commandEli Schwartz2-2/+2
2022-08-18modules/pkgconfig: make it a NewExtensionModuleDylan Baker1-5/+5
Since we no longer need Interpreter.extract_variables, we can remove the interpreter from the module!
2022-08-18run_mypy: Add modules/pkgconfig to the list of checked modulesDylan Baker1-0/+1
2022-08-18modules/pkgconfig: mypy clean!Dylan Baker1-22/+25
2022-08-18modules/pkgconfig: Fix code to handle CustomTarget and CustomTargetIndexDylan Baker1-3/+4
2022-08-18modules/pkgconfig: remove type checking abstractionDylan Baker1-8/+7
Which confuses the heck out of mypy
2022-08-18modules/pkgconfig: get rid of modifications to the BuildTarget objectsDylan Baker1-24/+40
This would tack on extra attributes for meta data tracking. Do that with our own datastructures instead
2022-08-18modules/pkgconfig: ensure "name" is not NoneDylan Baker1-2/+9
The name can be None if a library is not passed as a positional argument, and the name keyword argument is not provided. We shouldn't allow that to happen.
2022-08-18modules/pkgconfig: Get most type annotations addedDylan Baker1-50/+80
There are still a lot of errors here due to a mixture of really bad design (adding extra attributes to objects), and legitimate type errors (passing a str where a List[str] is expected). I suspect a lot of these cases aren't hit for some reason.
2022-08-18modules/pkgconfig: Use typed_kwargsDylan Baker5-86/+101
2022-08-18modules/pkgconfig: use typed_pos_argsDylan Baker1-8/+6
2022-08-18modules/pkgconfig: fix typo in blocked variableDylan Baker1-1/+1
require_private -> requires_private.
2022-08-18modules/pkgconfig: Fix some low hanging typing issuesDylan Baker1-18/+20
2022-08-18build: Add a Union alias for all build targetsDylan Baker2-8/+10
2022-08-18unittests: Add additional tests for KwargInfo::since valuesDylan Baker1-0/+16
The first test is checking the added support for keys as either `dict` or `list`. The second checks that a default value which would otherwise trigger a value_since check doesn't, and that passing the default value explicitly does.
2022-08-18interpreterbase: fix type annotations for KwargInfo::since_valuesDylan Baker1-4/+4
These are now allowed to be `Dict[_T | Type[list] | Type[dict], str]`, but the type annotations weren't updated
2022-08-18modules/fs: Replace configure_file(copy:) with fs.copyfileDylan Baker5-7/+129
`configure_file` is both an extremely complicated implementation, and a strange place for copying. It's a bit of a historical artifact, since the fs module didn't yet exist. It makes more sense to move this to the fs module and deprecate this `configure_file` version. This new version works at build time rather than configure time, which has the disadvantage it can't be passed to `run_command`, but with the advantage that changes to the input don't require a full reconfigure.
2022-08-18minstall: do not trample install_mode by rpath fixerEli Schwartz2-1/+3
install_mode can include the setuid bit, which has the special property (mentioned in the set_mode logic for minstall itself) of needing to come last, because it "will get wiped by chmod" (or at least chown). In fact, it's not just chown that wipes setuid, but other changes as well, such as the file contents. This is not an issue for install_data / custom_target, but for compiled outputs, we run depfixer to handle rpaths. This may or may not cause edits to the binary, depending on whether we have a build rpath to wipe, or an install rpath to add. (We also may run `strip`, but that external program already has its own mode restoration logic.) Fix this by switching the order of operations around, so that setting the permissions happens last. Fixes https://github.com/void-linux/void-packages/issues/38682
2022-08-17build: actually check for targets with no sourcesDylan Baker1-2/+4
Do to a bug in which a method, rather than an attribute, was checked we would never detect that a target had no sources, even though we meant to. As a result we would never actually error out when a target has no sources. When fixing the check, I've changed the error to a warning so that existing projects will continue to build without errors, only warnings.
2022-08-17tests/common/215: Save some time by only checking pkg-configDylan Baker1-1/+1
2022-08-17tests: fix targets with no sourcesDylan Baker9-6/+10
This was never supposed to be possible, so stop doing it.
2022-08-17interpreter: deprecate the ability import unstable modules as `unstable_*`Dylan Baker3-0/+7
This was never meant to work, it's an implementation detail of using `importlib.import_module` and that our modules used to be named `unstable_` that this ever worked.
2022-08-17interpreter: move handling of module stability to interpreterDylan Baker15-38/+74
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of `unstable_foo.py`, which simplifies the import method a bit. This also allows for accurate FeatureNew/FeatureDeprecated use, as we know when the module was added and if/when it was stabilized.
2022-08-17modules: Add stabilization information to ModuleInfoDylan Baker8-7/+9
We're going to do more with this in the next commit, but this just adds the information for now. This allows the next commit have 100% mv changes for some of the modules, which makes review easier
2022-08-17modules: use module level information about new and deprecationDylan Baker27-54/+128
Instead of using FeatureNew/FeatureDeprecated in the module. The goal here is to be able to handle information about modules in a single place, instead of having to handle it separately. Each module simply defines some metadata, and then the interpreter handles the rest.
2022-08-17tests: remove deprecated `import('unstable_')`Dylan Baker2-2/+2
2022-08-17allplatformstests: use subTests with test_warning_locationDylan Baker1-9/+11
2022-08-17run_project_tests: also change paths for DEPRECATION messagesDylan Baker1-1/+1
Not just WARNING and ERROR
2022-08-16fixup! deprecate running "meson builddir" without setup subcommandEli Schwartz1-1/+1
Also pass the setup command when rewriting --internal regenerate. This avoids the issue where `ninja` triggers a reconfigure, and this warning gets printed as a side effect.
2022-08-16deprecate running "meson builddir" without setup subcommandEli Schwartz4-4/+11
This is ambiguous, if the build directory has the same name as a subcommand then we end up running the subcommand. It also means we have a hard time adding *new* subcommands, because if it is a popular name of a build directory then suddenly scripts that try to set up a build directory end up running a subcommand instead. The fact that we support this at all is a legacy design. Back in the day, the "meson" program was for setting up a build directory and all other tools were their own entry points, e.g. `mesontest` or `mesonconf`. Then in commit fa278f351fe3d6924b4d1961f77b5b4a36e133f8 we migrated to the subcommand mechanism. So, for backwards compatibility, we made those tools print a warning and then invoke `meson <tool>`. We also made the `meson` tool default to setup. However, we only warned for the other tools whose entry points were eventually deleted. We never warned for setup itself, we just continued to silently default to setup if no tool was provided. `meson setup` has worked since 0.42, which is 5 years old this week. It's available essentially everywhere. No one needs to use the old backwards-compatible invocation method, but it continues to drag down our ability to innovate. Let's finally do what we should have done a long time ago, and sunset it.
2022-08-16docs: fix various references to "meson builddir"Eli Schwartz14-21/+21
This is wrong, it should use "meson setup builddir".
2022-08-15make add_project_dependencies respect build version of include dirsEli Schwartz1-1/+1
Fixes #10695
2022-08-12add AdwCustomizer0xMRTT1-0/+1
2022-08-12mesonbuild/mtest.py: filter more invalid googletest JUnit4 attributesDimitri John Ledkov1-0/+4
googletest 1.12.1 generates new JUnit4 invalid attributes file and line. Maybe all gtest "invalid" attributes are actually valid JUnit5 attributes, and maybe schema should be upgraded to JUni5. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2022-08-12mcompile: provide user visibility into what actually happensEli Schwartz1-2/+8
This command is magical and I hate it. Mostly because it seems people have no clue what it does, and what it doesn't do. Provide informational messages to the user indicating how it works, e.g. for debugging. Point out if we ran vsenv before shelling out to the backend.
2022-08-11CI: fix error when mixing clang 14 with released valgrind versionsEli Schwartz2-0/+8
Because clang now defaults to a dwarf version that valgrind does not yet support. There's support in valgrind git master, though.
2022-08-11add compilers from extracted objects directly to build targetsEli Schwartz7-4/+49
In order to reliably link to static libraries or individual object files, we need to take their languages into account as well. For static libraries this is easy: we just add the static library's list of compilers to the build target. For extracted objects, we need to only add the ones for the objects we use. But we did this really inefficiently -- in fact, downright terribly. We iterated over all source files from the extracted objects, then tried to look up a new compiler for them. Even though the extracted objects already had a list of compilers! This broke once compilers were made per-subproject, because while the extracted objects have a reference to all the compilers it needs (just like static archives do, actually) we might not actually be able to look up that compiler from scratch inside the current subproject. Fix this by asking the extracted objects to categorize all its own sources and return the compilers we want. Fixes #10579
2022-08-10cmake: Add rule relaxations for CMake subprojectsDaniel Mensinger2-3/+28
fixes #10566
2022-08-09dependencies: reject Qt6 pkg-config dependency if libexecdir is not knownEli Schwartz1-0/+7
This is needed for 6.1 support as noted in commit a606ce22eb0dd05eef56384d59954edad7da131d but at the time there was no pkg-config detection method at all. The stub code for Qt6 didn't support libexecdir at all, and the pkg-config files added to newer versions of Qt6 didn't export that information either until a further bugfix release. Enforce that this information is required.
2022-08-09qt: fix qt 6 tools detection for pkg-configKonstantin1-1/+21
Add correct reading of pkgconfig-announced bindir and pkgconfig-announced libexecdir. Will work only on 6.3+
2022-08-09CI: include zlib devel package for the mingw cross testsEli Schwartz1-1/+1
After a recent CI image builder update successfully ran the tests, but didn't run the cross tests, it updated the image that then got used by the regular CI cross tests. Somehow this resulted in a bunch of tests now failing because zlib could not be picked up. We probably dropped a transitive dependency somewhere. Anyway, it's correct to explicitly specify it if we need it.
2022-08-07linkers: detection should invoke the linker with lang_link_args onlyEli Schwartz1-3/+3
Currently we invoke it with lang_args only, which is wrong and probably useless. Fixes misdetecting the linker when overridden as -fuse-ld, which led to Meson trying to pass incompatible flags, outright failing if CFLAGS contained flags that only work with a non-default linker, or in the most benevolent case, having the status log report the wrong linker.
2022-08-07mtest: unify parsed and non-parsed output handlingHemmo Nieminen4-25/+97
Use the same routines to handle output both when parsing the output and when not. Also fixes broken stderr handling for parsed tests.
2022-08-05CI: remove nim from the ubuntu rolling install listEli Schwartz1-1/+1
We've never used it for anything, it was originally added for #3776 but that never got finished so it's just a waste. This also prevents successful regeneration of the build image, because nim is not available for Ubuntu rolling. It's available in 20.04 and 22.10, but vanished in between for reasons best known to Ubuntu.
2022-08-04typing: simplify type annotations for librariesEli Schwartz3-6/+7
In a bunch of places we need to list various types of libraries including custom_target outputs, and it gets very long. Use a common T.Union for this.
2022-08-04cmake: Change assertion into a more useful error (fixes #9925)Daniel Mensinger1-1/+2
2022-08-03azure CI: remove vs2017 tests without replacement now that the image is deletedEli Schwartz1-59/+0
The Windows 2016 images have been deprecated for a while now and regularly browning out. There's no viable replacement for testing that we can generate a usable `--backend=vs2017` project, so we cannot migrate this to anything else. The deprecated images are finally fully removed. See https://github.com/actions/virtual-environments/issues/5403 And now we get universal red CI, we cannot just wait for the brownout to end to get a tiny little bit of final testing. Simply remove the jobs so that we can tell if all the CI that actually runs, is passing.
2022-08-02Handle garbage in environment more gracefully when setting vsenvDenis Fortin1-2/+7
Environment line may not contain '=' and thus fail to decompose into a key/value pair.
2022-08-01Inline try_wait_one using asyncio.wait_forElliott Sales de Andrade1-8/+7
Although the former accepts multiple awaitables, it is only ever called with a single one, so just use `wait_for` instead. Additionally, the `try_wait_one` fails in Python 3.11, as `Process.wait()` returns a coroutine, and `asyncio.wait` only accepts tasks, so it errors out.
2022-08-01fix Popen_safe writeZhangyuan Nie1-6/+9