aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-07-20ci: Add Rust Windows cross toolchain on ubuntu-rolling imageXavier Claessens2-0/+13
2023-07-19move various bits of type-checking only code to TYPE_CHECKING blocksEli Schwartz9-12/+16
Mostly detected with flake8-type-checking. Also quote T.cast() first arguments, since those are not affected by future annotations.
2023-07-19avoid module indirection in name resolution for imported objectsEli Schwartz1-56/+56
We already import a bunch of objects directly from ..build but don't use them nearly as much as we can. This resulted both in longer lines and s minor performance difference since python has to resolve the name binding the long way. There's no reason not to rewrite these names to use the direct imports. Found while investigating the fact that Executable was imported but never used. It's easier to just use it.
2023-07-19fix implicit_reexport issues and enforce them going forwardEli Schwartz32-100/+98
This detects cases where module A imports a function from B, and C imports that same function from A instead of B. It's not part of the API contract of A, and causes innocent refactoring to break things.
2023-07-19mypy: add more mixin base classesEli Schwartz1-3/+3
These don't have new errors or old ignored ones, but add them anyway so we can generally validate their sanity.
2023-07-19linkers: fix mypy errors that were ignored due to lack of inheritanceEli Schwartz1-4/+11
A linker mixin has to be able to align with the base linker it will be used for, in order to reference super(). Since they weren't inherited, calls to super() resulted in mypy errors, which we ignored, and casting. Use the same trick we use for compilers, and make the linker inherit from the base linker type when running under mypy, and from object at runtime.
2023-07-19linkers: reorganize code so that linker base classes always come firstEli Schwartz1-199/+200
So that we can later reference them.
2023-07-19add better comments for mypy suppressionsEli Schwartz2-2/+3
2023-07-19cmake: fix empty BOOL generator expression evaluating to truekiwixz1-1/+1
2023-07-19cmake: find dependencies with bare library names on all platformskiwixz1-2/+2
2023-07-18CI image builder: log commands a bitEli Schwartz1-1/+1
2023-07-18CI: change ubuntu cross exe_wrapper to un-suffixed wineEli Schwartz1-1/+1
wine64 used to be the way to run a 64-bit wineserver. It was removed due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029536 despite that bug report being about a bug in an unrelated symlink -- apparently there's no recommended solution to starting a specific bitness of wine on demand. The automagic `wine` I believe creates a wineprefix with both, which is... probably not exactly efficient here? But whatever, not worth fighting it. Just get this more or less working again.
2023-07-18mtest: avoid meddling with stdout by defaultEli Schwartz1-1/+1
The original point of specifying Optional was to default to None... oops. The practical effect of this change is that the testsuite no longer repeatedly logs "No tests defined." in between more meaningful output.
2023-07-18CI: install a newer java on opensuseEli Schwartz1-1/+1
They do not appear to have 15 in their repos anymore, and no traces can be found of it in the history, as usual. They do have 11, 17, and 20, so choose one randomly and hope it doesn't keep changing value.
2023-07-18tests: bump the C++ std for protobuf testsEli Schwartz1-1/+1
Based on https://opensource.google/documentation/policies/cplusplus-support Google no longer supports C++11, and protobuf spawns an `#error` if you don't have at least 14. So, perform our currently scheduled automatic bump.
2023-07-18tests: mark gpgme test skippable on Ubuntu rollingEli Schwartz1-1/+1
It has been rebuilt to no longer provide the deprecated gpgme-config tool.
2023-07-18docs: improve formatting of the Rust modulePeter Hutterer1-17/+20
This brings the formatting more in line with other modules, in particular the headers do not include the full function signature for readability, keyword arguments are listed one-by-one, etc.
2023-07-18docs: fix typos and keyword markdown for the Rust module pagePeter Hutterer1-11/+11
Two typos and mark the keyword arguments with backticks so they render nicely.
2023-07-18ci: Skip test_generate_gir_with_address_sanitizerXavier Claessens1-0/+9
It fails with glib >= 2.76 and gobject-introspection <= 1.76.1. Fixes: #11754
2023-07-17Whoopsie, forgot to create the release notes.Jussi Pakkanen21-160/+188
2023-07-17Merge pull request #11976 from tristan957/cleanupsJussi Pakkanen23-463/+494
Some various type related cleanups
2023-07-17Bump version number for new development.Jussi Pakkanen1-1/+1
2023-07-17Bump version number for release.1.2.0Jussi Pakkanen1-1/+1
2023-07-16Fix build using GDC 13Jussi Pakkanen2-32/+47
Do not run tests that use integers in versions with compiler that do not support them. Old versions of GDC supported plain integers in version and debug strings but they are deprecated and GDC 13 hard errors on them.
2023-07-15rust: disable overflow-checks by defaultDylan Baker5-7/+43
These result in very large binaries when linked, and are not generally useful. A user can turn them back on by passing `-C overflow-checks=yes` manually via `-Drust_args` or the `RUSTFLAGS` environment variable fixes: #11785
2023-07-14compiler.compiles/links: fix failure when compiling a built File objectEli Schwartz2-7/+20
In order to pass a File object down into the compiler impl and compile it, we cannot pass a string with the filename, and we cannot either pass the File object as-is, since it relies on being given Environment attributes to calculate the relative location. So we build a fresh File object as an absolute path. But the code to do this was totally broken. Instead of using the File method to get an absolute path, we used one that expected to create builddir-relative paths... and then gave it the absolute source dir as the "relative path portion" prefix. This worked by accident as long as it wasn't a built File, but if it was a built file then we intentionally didn't include that prefix -- which was wrong anyway, since we need the build directory! Use the correct method to get an absolute path in all cases, and emit a warning if it was a built file. This never worked. Sometimes it crashed, sometimes it silently returned false. Fixes #11983
2023-07-14c++: add support for c++23/c++26 standard and aliasesSteven Noonan1-2/+20
GCC 12.3 and Clang 16 support -std flags for c++23/c++2b. The unreleased GCC 14 and Clang 17 will support -std flags for c++26/c++2c. Signed-off-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2023-07-14c++: add fallback mappings for C++23 and C++26Steven Noonan1-0/+4
The c++23 mappings apply to current production compilers (GCC, Clang). None of the production c++ compilers support c++26 flags yet, but this mapping will be ready once they do. Signed-off-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2023-07-14tests: add support for c++23/c++26 detectionSteven Noonan1-0/+15
Signed-off-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2023-07-13cmake: fix directory separators in generated packageConfig.cmake filesMatthieu Rogez4-1/+27
On windows, meson would mix posix and windows dir separators in the computed PACKAGE_RELATIVE_PATH. Here we force posix directory separator even on Windows. This matches the CMake behavior and fixes interpretation of the resulting path. Fixes #6955 Fixes #9702
2023-07-13macos: map arm64e to aarch64, map "whole" architecture stringsAndres Freund2-6/+19
Some macos libraries use arm64e instead of arm64 as architecture. Due to the string replace approach taken so far, we'd end up with aarch64e as architecture, which the rest of meson doesn't know. Move architecture mapping to map whole architecture names and add arm64e -> aarch64 mapping. This change doesn't touch the case for armv7[s], where we add arm, rather than replace armv7[s], but it's certainly not in line with the other mappings. Fixes: #9493 Co-authored-by: Tristan Partin <tristan@partin.io>
2023-07-13Fix display of generatorCharles Brunet2-2/+8
2023-07-13Silence some encoding warningsTristan Partin7-20/+20
By specifiying explicit encodings, we can silence warnings like: /__w/meson/meson/test cases/common/100 postconf with args/postconf.py:15: EncodingWarning: 'encoding' argument not specified with open(input_file) as f: in CI.
2023-07-13mtest: fix unencodable XML charsNazir Bilal Yavuz4-2/+121
Replace unencodable XML chars with their printable representation, so that, xmllint can parse test outputs without error. Closes #9894 Co-authored-by: Tristan Partin <tristan@partin.io>
2023-07-13Add import instructions for filesystem moduleMiroPalmu1-0/+8
2023-07-12Remove do_conf_str(encoding:)Tristan Partin1-2/+2
It wasn't being used.
2023-07-12Use underscore for variables that we don't referenceTristan Partin1-3/+3
This pleases pyright/pylance and is a pattern that we use in other portions of the code.
2023-07-12Fix return type of debugfile functionsTristan Partin4-6/+6
It was returning None in some cases while being marked as returning string.
2023-07-12Add typing to portions of machine file parsingTristan Partin1-7/+8
2023-07-12Add type annotations where they previously didn't existTristan Partin2-7/+7
2023-07-12Use more specific typesTristan Partin2-9/+10
Added type arguments where needed.
2023-07-12Remove Compiler._build_wrapper(temp_dir:)Tristan Partin2-5/+4
The function wasn't using the keyword argument and all the callers were using env.scratch_dir anyway.
2023-07-12Match the method signatures of parent classesTristan Partin10-28/+28
Names and types of some methods did not match their parent methods.
2023-07-12Make CPPCompiler.get_display_language() a classmethodTristan Partin1-2/+2
This matches the parent declaration.
2023-07-12Fix the typing around Compiler._get_compile_output()Tristan Partin2-7/+7
This function says it returns a string, but was returning None in some cases.
2023-07-12Annotate naked fundamental Python typesTristan Partin17-57/+57
Although mypy wasn't complaining, pyright was.
2023-07-12Replace some type comments with annotationsTristan Partin16-251/+275
2023-07-12Use CompileCheckMode enumTristan Partin10-47/+47
There were a ton of naked strings with TODOs telling us to use the enum.
2023-07-12compilers: detect cython version on stdout for newer cython versionsEli Schwartz1-3/+9
Cython historically, when asked to print the version and exit successfully, would do so on stderr, which is weird and inconsistent. Recently, it fixed this UX bug by printing on stdout instead: https://github.com/cython/cython/issues/5504 This then broke meson detection because we assumed it was on stderr due to historically being there: https://github.com/scipy/scipy/issues/18865 Cython is right, and shouldn't have to revert this reasonable change for backwards compatibility. Instead, check both.
2023-07-12Remove type comments from compilers.pyTristan Partin1-53/+59