mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julian Braha <julianbraha@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: nsc@kernel.org, ojeda@kernel.org, a.hindborg@kernel.org,
	nico@fluxnic.net, rdunlap@infradead.org,
	grahamr@qti.qualcomm.com, jakub.git@horky.net,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] kconfig: wrap long expressions in menuconfig
Date: Fri, 6 Nov 2026 16:58:07 +0000	[thread overview]
Message-ID: <c855ad2d-2d30-4a49-8bdc-3adde0ead951@gmail.com> (raw)
In-Reply-To: <179385226473.826739.16877681288448258281.b4-review@b4>


[-- Attachment #1.1: Type: text/plain, Size: 2542 bytes --]

On 11/5/26 04:17, Nathan Chancellor wrote:
>> In an offline conversation, Miguel Ojeda reported that scrolling
>> horizontally in menuconfig's search to read RUST's dependencies has been
>> slowing down debugging.
>>
>> Let's wrap expressions (like in the 'Depends on', 'Selected by', or
>> 'Range' sections) between tokens at the end of the window, such that each
>> line begins with the same indentation. Ensure the '!' negation stays
>> attached to the left side of the option symbol, and keep the value
>> annotation attached to the right side when wrapping.
>>
>> Note that the 'help' textbox uses the same expression printer as search,
>> so this has the side effect of improving the formatting in 'help', too.
>>
>> In the future, we should consider a larger revamp that would wrap all text
>> in the search window, allowing us to safely disable horizontal scrolling.
>>
>> Assisted-by: LLM
>> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> I spend some time searching for random symbols to see if all long
> depends or selects lines looked seriously broken and I did not find
> anything.
> 
> Tested-by: Nathan Chancellor <nathan@kernel.org>
> 
> Like you said down thread, this seems much better than what we currently
> have, which is nothing. The Sashiko comments [1] seem rather contrived
> (if valid at all, I did not check closely) but it seems reasonable not
> to get things wrong off rip so with those fixed (if necessary), we can
> probably get this into -next to see if there is anyting we immediately
> need to tweak.

Thanks for taking a look!

I can confirm that the findings are true positives, but it's a mixed
amount of contrived-ness:
(1) there actually are some Kconfig string constants in use with
trailing '!' characters. Rare usage, but not overly contrived.
(2) the leading space problem is much less realistic: technically yes,
Kconfig allows strings to have leading spaces. But no constants in-tree
are using that and I can't imagine potential use cases.

I've thought about tightening input validation to disallow leading
spaces in strings, but I suppose it's _possible_ the host has a poorly
formatted env var, and preprocessing Kconfig macros should probably not
be the place where that gets caught...

Okay, so resolving sashiko's alarms belongs here.

It's taking me longer than expected (why is expression printing this
complicated?) so let's see if I can finish v2 this weekend; I agree on
giving this its fair time in -next.

- Julian Braha

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      reply	other threads:[~2026-11-06 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10  9:50 Julian Braha
2026-10-11 16:20 ` Miguel Ojeda
2026-10-11 18:22   ` Julian Braha
2026-11-05  4:17 ` Nathan Chancellor
2026-11-06 16:58   ` Julian Braha [this message]

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=c855ad2d-2d30-4a49-8bdc-3adde0ead951@gmail.com \
    --to=julianbraha@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=grahamr@qti.qualcomm.com \
    --cc=jakub.git@horky.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nico@fluxnic.net \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rust-for-linux@vger.kernel.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

all inboxes | Powered by JetHome®