Thread (41 messages) flat view 41 messages, 3 authors, 2025-01-22

Re: [PATCH v2 10/11] ci: raise error when Meson generates warnings

From: Toon Claes <hidden>
Date: 2025-01-21 12:59:36

Patrick Steinhardt [off-list ref] writes:
quoted hunk ↗ jump to hunk
Meson prints warnings in several cases, like for example when using a
feature supported by the current version of Meson, but not yet supported
by the minimum required version as declared by the project. These
warnings will not cause the setup to fail by default, which makes it
quite easy to miss them.

Improve this by passing `--fatal-meson-warnings` to `meson setup` so
that our CI jobs will fail on warnings.

Signed-off-by: Patrick Steinhardt <redacted>
---
 ci/run-build-and-tests.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index 6c828c3b755153dab179f73346e7124bda49c90e..964322055f5db0eae0c794b543664e24ae4249f7 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -52,6 +52,7 @@ esac
 case "$jobname" in
 *-meson)
 	group "Configure" meson setup build . \
+		--fatal-meson-warnings \
 		--warnlevel 2 --werror \
 		--wrap-mode nofallback \
 		-Dfuzzers=true
-- 
2.48.0.257.gd3603152ad.dirty
Cool, this would have caught me trying to use `fs.copyfile`:

    $ meson setup build --fatal-meson-warnings

    # ... [snip] ...

    ../meson.build:1466: WARNING: Project targets '>=0.61.0' but uses feature introduced in '0.64.0': fs.copyfile.

    ../meson.build:1466:3: ERROR: Fatal warnings enabled, aborting


(I missed that warning)

--
Toon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help