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