Re: [bitbake-devel] [PATCH] parse: warn on trailing whitespace after line continuation backslash

Richard Purdie <[email protected]>
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <34211867d74a9757b5b0ff10e7ac3c0b4811ceda.camel@linuxfoundation.org>
On Tue, 2026-08-04 at 12:37 +0200, Jaipaul Cheernam wrote:
>   Hi Richard,
> 
>    Fair point — it doesn't break parsing itself and the code churn is
> larger than ideal for a warning.
> 
>    Would you prefer if I just submitted the oe-core fixes to clean up
> the affected recipes instead and dropped this bitbake change? That 
> solves the immediate problem without adding complexity to the parser.

You should definitely send that clean up for oe-core.

I was toying with the idea we just make whitespace after a line break
character a fatal parsing error. Most of the fatal errors are inside
feeder() rather than where you changed the code.

I then looked at the code further and it isn't just trailing whitespace
after "\" that is an issue. For example, after "}" closing a function
could also be an issue in the same way. I didn't look in detail beyond
that, there will be further similar issues though and that does mean
your patch is incomplete :/.

>   Alternatively, I could reduce this to a bb.note() (debug-level) so
> it's only visible with -v, keeping it minimal.

I think this needs further thought and some wider testing of how
widespread trailing whitespace is.

We might just want to make any trailing spaces a warning since we
currently just swallow and hide it unconditionally?

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.