Re: [PATCH v2] Support conditional deps using "depends on X if Y"

From: Jani Nikula

Date: Wed Dec 10 2025 - 10:07:56 EST


On Fri, 05 Dec 2025, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> On Fri, Dec 05, 2025 at 09:01:51AM +0100, Arnd Bergmann wrote:
>> This is the bit that frequently confuses developers with the
>> current syntax, and I agree it would be nice to have a better
>> way, but I'm not sure the proposal actually helps enough to
>> warrant a mass-conversion of existing Kconfig files.
>
> I do agree that the 'depends on A || !A' syntax is confusing and that
> this does not really address that but I think that is besides the point
> here. I also agree that it is probably not worth converting existing
> users to this syntax (unless there is solid reasoning), I would not want
> to see cleanup patches of that nature, just use in new code.

I think "depends on A if A" is an improvement over "A || !A". But not a
drastic improvement.

I think the question is, can we figure out an even better syntax for
that use case? Something that conveys the "optionally depends on A"
meaning? Is there something so good that it would warrant cleanup
conversions just for the improved clarity?

If we can't come up with anything, let's just roll with what we have
here?


BR,
Jani.

--
Jani Nikula, Intel