From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <richard.purdie@linuxfoundation.org>,
<bitbake-devel@lists.openembedded.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
<docs@lists.yoctoproject.org>
Subject: Re: [docs] [bitbake-devel] [PATCH 3/4] knotty: convert warnings to errors when -W is passed
Date: Thu, 15 Oct 2026 12:25:13 +0200 [thread overview]
Message-ID: <DM5C7YSFK5Y8.14E684HX5TS18@bootlin.com> (raw)
In-Reply-To: <5d6d74ea44bf61549823ccde83e4c4ed1e274dc4.camel@linuxfoundation.org>
On Thu Oct 15, 2026 at 10:58 AM CEST, Richard Purdie via lists.yoctoproject.org wrote:
> On Tue, 2026-10-13 at 14:13 +0200, Antonin Godard via lists.openembedded.org wrote:
>> When -W is passed, modify the handlers to show warnings in red and set
>> the return value to 1. Add a summary line informing the user that the -W
>> option was used as it might not be obvious when looking at the bottom
>> the end of the console log.
>
> The trouble is this doesn't make warnings behave exactly as errors and
> I think that is going to confuse people :/.
>
> Specifically, if an error is encountered in a task, it will error and
> fail. The warning will show an error but continue anyway. I also
> suspect the warnings will still show as warnings in the log files and
> only appear as errors on the console.
Good point. So there's two directions this could take (if we want that feature):
- Make this option change the behavior of warnings, and make them _act_ (not
just look) like errors, so a given task would stop in case of warning.
- Rename the option and make it clearer: warnings are still warnings but the
return code will be 1 if there are any.
Maybe "-W,--fail-on-warnings: Make bitbake return 1 if any warning is
emitted"?
I feel like the second option might be best as the first one is changing the
behavior of tasks and I also think this might not be desirable.
With the second option it allows having a positive exit code on warnings while
still being able to have a look at all of them (not only the single one that
stopped the build as would happen with the first option), just as you would with
a normal bitbake execution.
Antonin
next prev parent reply other threads:[~2026-10-15 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 12:13 [PATCH 0/4] Add -W to treat warnings as errors Antonin Godard
2026-10-13 12:13 ` [PATCH 1/4] main: add an argument for showing " Antonin Godard
2026-10-13 12:13 ` [PATCH 2/4] msg: add a helper to show warnings in red color Antonin Godard
2026-10-13 12:13 ` [PATCH 3/4] knotty: convert warnings to errors when -W is passed Antonin Godard
2026-10-15 8:58 ` [bitbake-devel] " Richard Purdie
2026-10-15 10:25 ` Antonin Godard [this message]
2026-10-15 11:49 ` [docs] " Richard Purdie
2026-10-15 12:23 ` Antonin Godard
2026-10-15 13:04 ` Richard Purdie
2026-10-15 14:07 ` Antonin Godard
2026-10-13 12:13 ` [PATCH 4/4] doc/bitbake-user-manual-intro.rst: refresh bitbake's help message Antonin Godard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5C7YSFK5Y8.14E684HX5TS18@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=docs@lists.yoctoproject.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox