All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <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: Fri, 16 Oct 2026 15:11:33 +0200	[thread overview]
Message-ID: <DM6ADVADR7L1.F48JUYUSVTMF@bootlin.com> (raw)
In-Reply-To: <2040945.1792137545176168291@lists.openembedded.org>

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.

Antonin


  reply	other threads:[~2026-10-16 13:11 UTC|newest]

Thread overview: 13+ 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 [this message]
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=DM6ADVADR7L1.F48JUYUSVTMF@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=michalwsieron@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.