Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Richard Purdie" <richard.purdie@linuxfoundation.org>,
	<michalwsieron@gmail.com>, <bitbake-devel@lists.openembedded.org>
Subject: Re: [docs] [bitbake-devel] [PATCH 3/4] knotty: convert warnings to errors when -W is passed
Date: Wed, 21 Oct 2026 16:42:38 +0200	[thread overview]
Message-ID: <DMALGC6JACT5.1W26Q9VEIAV9K@bootlin.com> (raw)
In-Reply-To: <3cb5e5d5db79f81b58c943752dcff67e7c603308.camel@linuxfoundation.org>

On Sat Oct 17, 2026 at 5:02 PM CEST, Richard Purdie wrote:
> On Fri, 2026-10-16 at 15:11 +0200, Antonin Godard via lists.openembedded.org wrote:
>> Hi,
>> 
>> On Fri Oct 16, 2026 at 9:59 AM CEST, Michal Sieron via lists.openembedded.org wrote:
>> > Hi,
>> > 
>> > two cents from my side. I think that warnings as errors would ideally work like normal -Werror in compilers.
>> > 
>> > 1. Regarding name: -W doesn't indicate anything about errors. Only something
>> >    with warnings. I am not sure if having this short option is worth it.
>> 
>> I agree.
>> 
>> > 2. This might be controversial, but ability to do -Wno-error, would be great.
>> >    Problem is we don't have categorized/named warnings/errors. But I think
>> >    that it could support a syntax where we use file name (or partial match on
>> >    its path) and disable warnings-as-errors for that source file. Or this
>> >    might be even easier to implement: regex for warning message. It it
>> >    matches, it won't be treated as an error.
>> 
>> That sounds like an interesting idea - but maybe as a follow-up of this though?
>> 
>> > 3. Exit code only change won't force developers to immediately fix their code
>> >    as it's really easy to ignore in interactive terminals. Sure, later CI
>> >    would catch it, but I would prefer early fail if possible.
>> 
>> That's true - however, I checked again, and error messages originating from
>> bb.error (or bberror) do NOT stop the execution of bitbake. This is the role of
>> bb.fatal (or bbfatal). bb.error only affects the return code of bitbake, but
>> goes as far as possible - for example I was able to build an image recipe even
>> though one of its recipes emitted a bb.error.
>> 
>> So if we want warnings to act like errors, I think this is already what this
>> series does. If we want warnings/errors to act like bb.fatal, that's another
>> question.
>
> I should also mention that ERROR_QA and WARN_QA allow many warnings to
> actually become errors. That is the mechanism we should really be
> pointing people at if they want errors IMO...

Sure, but this couldn't possibly cover all warnings?

Maybe I can reword the intent of this series: give users an easy way of knowing
when one or more warnings were emitted so that they look at them instead of
ignoring them.

Whether we should stop bitbake immediately on a warning or not seems to be
another question as per my previous email.

From your answers, I'm not really sure of whether you approve or deny of this
idea though. Should I send a v2 with a long option only (--fail-on-warnings),
and keep the rest as-is?

Antonin

  reply	other threads:[~2026-10-21 14:42 UTC|newest]

Thread overview: 16+ 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     ` [docs] " Antonin Godard
2026-10-15 11:49       ` 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-16  7:59               ` Michal Sieron
2026-10-16 13:11                 ` Antonin Godard
2026-10-17 15:02                   ` Richard Purdie
2026-10-21 14:42                     ` Antonin Godard [this message]
2026-10-22 12:51                       ` Richard Purdie
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=DMALGC6JACT5.1W26Q9VEIAV9K@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=michalwsieron@gmail.com \
    --cc=richard.purdie@linuxfoundation.org \
    /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