git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Toon Claes <toon@iotcl.com>
Date
Jan 21, 2025, 12:59 UTC
Message-ID
<87msfkiaqa.fsf@iotcl.com>
In-Reply-To
<20250114-b4-pks-meson-additions-v2-10-8d7ec676cfd9@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 29 quoted lines
> 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 <ps@pks.im>
> ---
>  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

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 16 of 18 in “meson: a couple of additions”
  1. 00/11 meson: a couple of additionsPatrick Steinhardt, Jan 14, 2025
  2. 01/11 GIT-VERSION-GEN: simplify computing the dirty markerPatrick Steinhardt, Jan 14, 2025
  3. 02/11 GIT-VERSION-GEN: allow running without input and output filesPatrick Steinhardt, Jan 14, 2025
  4. Toon ClaesJan 21, 2025
  5. 03/11 meson: populate project version via GIT-VERSION-GENPatrick Steinhardt, Jan 14, 2025
  6. Toon ClaesJan 21, 2025
  7. 04/11 meson: fix dependencies for generated headersPatrick Steinhardt, Jan 14, 2025
  8. 05/11 meson: wire up development environmentsPatrick Steinhardt, Jan 14, 2025
  9. 06/11 meson: wire up generation of distribution archivePatrick Steinhardt, Jan 14, 2025
  10. Toon ClaesJan 21, 2025
  11. Patrick SteinhardtJan 22, 2025
  12. 07/11 meson: wire up fuzzersPatrick Steinhardt, Jan 14, 2025
  13. 08/11 meson: make the CSPRNG backend configurablePatrick Steinhardt, Jan 14, 2025
  14. 09/11 meson: fix compilation with Visual StudioPatrick Steinhardt, Jan 14, 2025
  15. 10/11 ci: raise error when Meson generates warningsPatrick Steinhardt, Jan 14, 2025
  16. Toon ClaesJan 21, 2025
  17. 11/11 ci: wire up Visual Studio build with MesonPatrick Steinhardt, Jan 14, 2025
  18. Junio C HamanoJan 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.