aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-12docs: fix broken porting advice for intl dependency in release notesEli Schwartz1-1/+1
See https://github.com/theimpossibleastronaut/rmw/pull/345#discussion_r967876201 The check for `.found()` implies the dependency lookup should be optional, but the example didn't make it optional.
2022-09-12mcompile: Remove useless sleepXavier Claessens1-2/+0
There is no reason to wait 2s before starting the compilation command. Fixes: #10698.
2022-09-12modules: Fix paths to (sub)project source/build directoriesDavid Ward2-5/+4
The subproject directory name (i.e. 'subprojects') was being added to the path even for the main project.
2022-09-12i18n: Fix source root in Gettext targets for subprojectsDavid Ward2-6/+10
Gettext should search for input files relative to the (sub)project source root, not the global source root. This change exposes a root_subdir member in ModuleState.
2022-09-11backends: limit maximum path of generated filenamesEli Schwartz1-1/+9
When calculating the output filename for a compiled object, we sanitize the whole input path, more or less. In cases where the input path is very long, this can overflow the max length of an individual filename component. At the same time, we do want unique names so people can recognize what these outputs actually are. Compromise: - for filepaths with >5 components (which are a lot more likely to cause problems, and simultanously less likely to have crucial information that far back in the filepath) - if an sha1 hash of the full path, replacing all *but* those last 5 components, produces a path that is *shorter* than the original path ... then use that modified path canonicalization via a hash. Due to the use of hashes, it's unique enough to guarantee correct builds. Because we keep the last 5 components intact, it's easy to tell what the output file is compiled from. Fixes building in ecosystems such as spack, where the build environment is a very long path containing repetitions of `__spack_path_placeholder__/` for... reasons of making the path long.
2022-09-09tests: Add a test for a target with no sourcesDylan Baker2-0/+10
Since this was broken for a long time, we should have a test for it.
2022-09-09vs: Fix CustomBuild contents.Andres Freund1-9/+9
%% survived into the output since 038b31e72bc02f0a9b. That failed to fail, at least in the common cases, because the whole command sequence is unnecessary / redundant - it appears to come from cmake, which executes multiple commands within a single CustomBuild element.
2022-09-09doc: Recommend tags for libraries utilitiesXavier Claessens1-0/+6
GLib installs a few executables that are not needed by applications that use the glib libraries, but are used either by build systems or by user scripts. Debian splits them into libglib2.0-dev-bin and libglib2.0-bin packages. Another example is GStreamer tools (e.g. gst-launch-1.0) that Debian packages separately in gstreamer1.0-tools. It is common enough that Meson documentation should recommend a tag for consistency across projects.
2022-09-09compilers: drop some useless info from CompileResultEli Schwartz1-5/+2
text_mode was never set, nor used, and pid was set but never used.
2022-09-09compilers: fix regression in logging cached compile commandsEli Schwartz1-4/+3
In commit d326c87fe22507b8c25078a7cd7ed88499ba7dc1 we added a special holder object for cached compilation results, with some broken attributes: - "command", that was never set, but used to print the log - "args", that was set to some, but not all, of the information a fresh compilation would log, but never used Remove the useless args attribute, call it command, and use it properly.
2022-09-07compilers: correct the MSVC version comparison for turning on __cplusplusEli Schwartz1-1/+1
We compared a Visual Studio (the IDE) version, but we wanted a MSVC (the compiler) version. This caused the option to be passed for a few too many versions of MSVC, and emit a "D9002 : ignoring unknown option" on those systems. Compare the correct version using the version mapping from https://walbourn.github.io/vs-2017-15-7-update/ Fixes #10787 Co-authored-by: CorrodedCoder <38778644+CorrodedCoder@users.noreply.github.com>
2022-09-07wrap: correctly override dependency names with capital lettersEli Schwartz1-3/+5
When we do wrap resolution, we do a case-insensitive lookup because keys, i.e. `dep_name = variable_name`, are case insensitive. In order to check whether we should process a subproject, we need to know if the lowercased dependency name matches. We do this by looking up the lowercase name, and assuming that the stored name is also lowercase. But for dependency_names, this isn't "case insensitive and stored in lowercase" so we need to manually force it to be consistent. Likewise, when looking up the wrap name (which works like dependency_names and doesn't need a provide section at all) the disk filename of the wrap file is case sensitive, but needs to be manually forced for consistency.
2022-09-07Fixed string escaping in AstPrinterVolker Weißmann1-1/+5
2022-09-07minstall: handle extra error for selinuxenabledRosen Penev1-1/+1
Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
2022-09-07modules/wayland: Change default value of include_core_only to trueMark Bolhuis2-2/+2
The use of wayland-<client|server>.h is discouraged, therefore change the default value of include_core_only to true.
2022-09-07modules/wayland: Rename core_only to include_core_onlyMark Bolhuis3-7/+8
Rename the core_only option in scan_xml to include_core_only to match the flag used by wayland-scanner.
2022-09-06modules/wayland: Support --include-core-onlyMark Bolhuis5-1/+38
wayland-scanner can generate header files that only include wayland-client-core.h using a flag. Add a core_only option to scan_xml to support this use case.
2022-09-06Fix install_subdirs not showing up in intro-install_plan.jsonThomas Li6-2/+19
2022-09-05interpreter: name typing-only kwargs import with an underscoreEli Schwartz1-41/+41
To differentiate it from the function parameter itself. Annotating a function as ``` def func_foo(kwargs: kwargs.FooKwargs): ``` is confusing, both visually and to static linters.
2022-09-05interpreter: add a few small func annotationsEli Schwartz1-4/+4
2022-09-04mtest: Run ninja build.ninja before loading testsAndres Freund2-0/+30
When the build definition has changed since the last ninja invocation meson test operated on an outdated list of tests and their dependencies. That could lead to some tests not being run / not all dependencies being built. This was particularly confusing because the user would see the output of reconfiguration and rebuilding, and the next mtest invocation would have the updated configuration. One issue with this is that that we will now output more useless ninja output when nothing needs to be done (the "Entering directory" part is not repeated, as we happen to be in the build directory already). It likely is worth removing that output, perhaps by testing if anything needs to be done with ninja -n, but that seems better addressed separately. Fixes: #9852
2022-09-04mtest: pull detection of ninja into TestHarnessAndres Freund1-10/+24
A later commit will add a second invocation of ninja, no point in having the detection code twice. This changes the exit code in case ninja isn't found from 125 to 127, which seems more appropriate given the justification for returning 125 (to make git bisect run skip that commit). If we can't find ninja we'll not succeed in other commits either.
2022-09-04mtest: Move loading of test data into its own functionAndres Freund1-10/+13
A subsequent commit will do a bit more during test data loading, making a dedicated function seem advisable. The diff looks a bit odd, using git show --diff-algorithm=patience will make it clearer.
2022-09-04Add missing cdata update in genmarshal testsJan Alexander Steffens (heftig)1-0/+3
Otherwise the test is flaky, as it may try to include a header that's not generated yet.
2022-09-03tests/7 gnome: Fix incorrect unref of GResourceNirbheek Chauhan2-4/+3
The returned GResource is transfer-none, since the generated function basically calls g_static_resource_get_resource(). It should not be unreffed. Causes an abort on Debian: GLib-GIO:ERROR:../../../gio/gresource.c:1451:g_static_resource_fini: assertion failed: (g_atomic_int_get (&resource->ref_count) >= 2)
2022-09-03ci: Fix macOS qt4 detectionNirbheek Chauhan1-0/+3
Need to link the qt4 install so it's in PATH. Also need to use a symlink to fix breakage in the Tap.
2022-09-02backend/ninja: omit --backend when regenerating build dirKonstantin Kharlamov1-3/+1
Currently a cosmetic bug is present: once a build dir was regenerated, meson would start showing: User defined options backend: ninja This is not true as user have not defined the option, it is default. Fix this by omitting the `--backend ninja` parameter from "regenerate" In my tests this does not affect the situation when one specifies `--backend ninja` explicitly, it still shows the backend as user-defined after reconfiguration. Fixes: https://github.com/mesonbuild/meson/issues/10632
2022-08-31Fix 2 typos in a single string which can be shown in error messages.Jehan1-1/+1
2022-09-01env2mfile: reuse logical lists of interesting facts from meson itselfEli Schwartz3-46/+19
Meson internally knows about many languages and tools, and *FLAGS variables, and which languages to use them for. Instead of duplicating this logic, import it from mesonbuild.* This logic was originally standalone, but now that it is merged into the Meson tree we can have a single source of truth.
2022-08-31modules/cmake: Fix typoaleksander1-1/+1
2022-08-30fix obscure crash on unbound variableEli Schwartz1-4/+5
This can be triggered if someone tries to call a non-ID. The example reproducer was: ``` if (var = dependency(...)).found() ``` This produced a traceback ending in ``` raise InvalidArguments(f'Variable "{object_name}" is not callable.') UnboundLocalError: local variable 'object_name' referenced before assignment ``` After this commit, the error is reported as: ``` ERROR: AssignmentNode is not callable. ```
2022-08-30Add LLVM_CONFIG supportSamay Sharma1-0/+1
2022-08-29flake8: run in CIEli Schwartz1-0/+10
We should have full coverage now, so make sure we don't regress in the future.
2022-08-29flake8: fix typing casts to not have actual objectsEli Schwartz1-1/+1
We use `__future__.annotations` to good effect everywhere we can, and one of the effects of this is that annotations are automatically stringized and don't need to be evaluated, using less memory and computation. But this only affects actual annotations -- a cast is just a function with an argument, so the compiler has no idea that it's an annotation to be stringized. Do this manually.
2022-08-29flake8: move typing-only imports into T.TYPE_CHECKINGEli Schwartz2-2/+6
2022-08-29flake8: fix warnings for unused importsEli Schwartz1-0/+2
This is supposed to expose all primitives together, but to do that we need to actually "use" each variable in `__all__`, which we... didn't. Sorry about that.
2022-08-29flake8: fix unnecessary f-strings without any format placeholdersEli Schwartz2-3/+3
These can just be ordinary strings.
2022-08-29flake8: fix lingering whitespace errorsEli Schwartz1-2/+0
2022-08-29flake8: fix missing importEli Schwartz1-0/+1
This sort of worked, because it was a typing-only import and this file isn't actually tested by mypy yet.
2022-08-29docs: make note of the path restriction on subdir()Eli Schwartz1-1/+4
It's mentioned in the error message if you try to do it, that you cannot use `..`, but it is probably useful to mention this in the online docs too.
2022-08-29docs: mention in the native-file docs, the command line argument to useEli Schwartz1-0/+7
We mention --cross-file in the relevant page, but the fact that --native-file is the command line argument to use is mentioned nowhere other than a couple of release notes and the --help text for meson setup. This should be described in the docs.
2022-08-27Users.md: Add AudaciousThomas Lange1-0/+1
2022-08-26Fix indentation issues reported by flake8, requiring code restructuringAlf Henrik Sauge2-14/+20
Strictly speaking code restructuring isn't needed, but making this PEP8 compliant results in indentation of the code that reduces the readability. By moving the offending code on the outside of the method call, the readability is maintained.
2022-08-26Remove redundant backslash and fix white space issueAlf Henrik Sauge2-5/+6
2022-08-26Fix purely white space issues reported by flake8Alf Henrik Sauge22-190/+188
2022-08-25Revert "Windows: Improve Python 3.8+ module check on Windows"Eli Schwartz1-13/+1
This reverts commit 99ad11bd9c3249f548dda0b275d9f8dd1b3f6d14. This breaks working setups in conda. It is either wrong or incomplete and thus cannot be used. Fixes #10737
2022-08-25wrap: Support netrc filesFabian Orccon1-1/+37
2022-08-24fix linker regression for compilers that don't accept LDFLAGS directlyEli Schwartz7-14/+34
e.g. ldc -- the compiler needs to process args before consuming them. Fixes #10693
2022-08-24fix incorrect type annotations for coredata compile/link argsEli Schwartz1-2/+2
These make no sense as single strings.
2022-08-24build: don't add targets to link_whole_targets if we took their objectsDylan Baker1-3/+5
What happens is this: - liba is a convenience static library - libb is an installed static library - libb links in liba with --link-whole - libc links to libb - we generate a link line with libb *and* liba, even though libb is a strict superset of liba This is a bug that has existed since the we stopped using link-whole to combine convenience libraries, and to instead propagate their dependencies up. For most linkers this is harmless, if inefficient. However, for apple's ld64 with the addition calling `ranlib -c`, this ends up causing multiple copies of symbols to clash (I think that other linkers recognize that these symbols are the same and combine them), and linking to fail. The fix is to stop adding libraries to a target's `link_whole_targets` when we take its objects instead. This is an all around win since it fixes this bug, shortens linker command lines, and avoids opening archives that no new symbols will be found in anyway.