Skip to content

A PR fixing many small bugs#15585

Open
bonzini wants to merge 13 commits intomesonbuild:masterfrom
bonzini:papercuts
Open

A PR fixing many small bugs#15585
bonzini wants to merge 13 commits intomesonbuild:masterfrom
bonzini:papercuts

Conversation

@bonzini
Copy link
Copy Markdown
Contributor

@bonzini bonzini commented Feb 25, 2026

All of these should be relatively easy to review. The bugs are all pretty simple, but for most of them I don't have easy testcases.

Fixes: #9744
Fixes: #8412
Fixes: #7811
Fixes: #6960
Fixes: #4683
Fixes: #1633
Fixes: #15500
Fixes: #14113
Fixes: #13322
Fixes: #11318
Fixes: #11236

@bonzini bonzini changed the title A draft PR fixing many small bugs A PR fixing many small bugs Feb 25, 2026
@bonzini bonzini marked this pull request as ready for review February 25, 2026 16:30
@bonzini bonzini modified the milestones: 1.11, 1.12 Feb 25, 2026
@bonzini bonzini force-pushed the papercuts branch 2 times, most recently from c3da813 to e7727db Compare March 4, 2026 11:36
@thesamesam
Copy link
Copy Markdown
Member

0d4314d looks good. Can you cherry-pick that one? I can review some (but not all) of the others at another time.

Copy link
Copy Markdown
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small nits for patches 1-2, but with those addressed they're r-b

Patch 3 is r-b

I haven't gotten past that yet.

Comment thread mesonbuild/cmake/common.py Outdated
Comment thread mesonbuild/cmake/common.py
Comment thread mesonbuild/modules/cmake.py Outdated
Comment thread mesonbuild/interpreter/type_checking.py
Copy link
Copy Markdown
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have three commits in this series with comments on them, the rest are r-b.

If you want to start merging the reviewed pieces separately that's fine by me.

Comment thread mesonbuild/interpreter/interpreter.py
Comment thread mesonbuild/interpreter/interpreter.py Outdated
Comment thread mesonbuild/backend/ninjabackend.py Outdated
@bonzini bonzini force-pushed the papercuts branch 4 times, most recently from febbc68 to 1fee791 Compare April 25, 2026 07:54
bonzini added 10 commits May 8, 2026 11:54
For the --system-information case try multiple generators as
done in dependencies/cmake.py.  Then, when actually running
cmake pass -DCMAKE_MAKE_PROGRAM so that cmake and meson's
ninja are consistent.

Fixes: mesonbuild#11236
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The type check fix in _BASE_LANG_KW is all that's needed since
__convert_file_args already handles File objects correctly (converts
to path string + adds to depend_files for rebuild tracking). In fact,
the vala_args case 569 already had (str, File).  This just brings
the other languages in line.

Fixes: mesonbuild#1633
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: mesonbuild#11318
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
When both_libraries() reuses object files from the shared library
for the static library via ExtractedObjects, the object filenames
must match those produced for the shared library. For non-built vala
source files in subdirectories, object_filename_from_source() was
using os.path.basename() which dropped the subdirectory component,
while the actual compilation preserved it.

Use os.path.relpath() against the target's source directory instead,
matching the logic in generate_vala_compile().

Fixes: mesonbuild#6960
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: mesonbuild#8412
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Use -nostdinc++ and -nostdlib++ just like in CPPCompiler.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
When I pass an executable on PATH to SCANBUILD environment variable it fails:

  Could not execute scan-build ""

Using shutil.which looks up bare names like scan-build in PATH and,
on Windows, automatically checks executable extensions.

Fixes: mesonbuild#9744
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The TAP 14 spec says that "A command-line test runner might
exit with a non-zero status code" to "indicate failure to the
user in whatever means are appropriate".  Only force the ERROR
test case if the result was OK or EXPECTEDFAIL.

Fixes: mesonbuild#7811
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
 Meson gives an erroneous warning about the output file for configure_file() being overwritten if multiple configure_file() calls are being made from the same directory with the same output file name, but different build_subdir settings. In this case, the output files are not being overwritten because they are being created in different subdirectories.

The output also does not include the build_subdir:

Configuring file using configuration
WARNING: Output file "file" for configure_file() at meson.build:4 overwrites configure_file() output at meson.build:4
Configuring file using configuration

Now:

Configuring hello/file using configuration
Configuring world/file using configuration

Fixes: mesonbuild#15500
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
After the maximum number of failures is reached, any running test is
canceled. However in this case the partial output of the test might not
be a symptom of a hung test in the same way as it is after CTRL-C, so
hide it.

Fixes: mesonbuild#13322
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
bonzini added 3 commits May 8, 2026 11:54
meson is instructing msgmerge to output to the same file
as the input, but this means that interrupting the
execution of msgmerge results in an empty .po file.

Instead, go through scripts.meson_exe and make msgmerge
print to stdout.  This is more effective because it also
skips the update if the contents did not change.

Fixes: mesonbuild#4683
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
An executable in a subdirectory does not result in a forbidden target
name, allow it if it's not named "meson-*" or "meson-internal__*".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
If the link_language is not one of the languages used to compile
the sources, looking it up in target.compilers results in a KeyError.
Add it manually, and also skip languages that are not part of the target;
this avoids inconsistent behavior for targets that conditionally have
sources from one language:

  srcs = ['a.c']
  if host_machine.system() == 'windows'
     srcs.append('windows.cpp')
  endif
  build_target(
     'target',
     srcs,
     c_args : ['-DDEFINE'],
     cpp_args : ['-DDEFINE'],  # ignored for !windows automatically
     c_pch : 'c_pch.c',
     cpp_pch : 'cpp_pch.c', # always ends up doing work even on !windows
  )

Fixes: mesonbuild#14113
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment