mbox series

[0/2] kconfig: Improve comment blocks in the .config file

Message ID 20211213100043.45645-1-arielmarcovitch@gmail.com (mailing list archive)
Headers show
Series kconfig: Improve comment blocks in the .config file | expand

Message

Ariel Marcovitch Dec. 13, 2021, 10 a.m. UTC
Hi there!

This series attempts to make the .config file format make more sense.
Currently menuconfig blocks look exactly like regular configs while
comment blocks look almost exactly like menu blocks.

The first patch makes menuconfig blocks look the same as menu blocks.

The second makes comment blocks look different than menu blocks.

The format for comment blocks in the second patch is a suggestion. I
realize some people will think the '###' prefix is distasteful. I'm open
to other options as well, I just couldn't think of a better option that
starts with '#', looks different from a menu and can't be confused with
a disabled config.

Ariel Marcovitch (2):
  kconfig: Show menuconfigs as menus in the .config file
  kconfig: Make comments look different than menus in .config

 scripts/kconfig/confdata.c | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)


base-commit: e06a61a89ccd3edda046c78f9d08aa045b8c4d32

Comments

Boris Kolpackov Dec. 13, 2021, 11:47 a.m. UTC | #1
Ariel Marcovitch <arielmarcovitch@gmail.com> writes:

> The format for comment blocks in the second patch is a suggestion. I
> realize some people will think the '###' prefix is distasteful. I'm open
> to other options as well, I just couldn't think of a better option that
> starts with '#', looks different from a menu and can't be confused with
> a disabled config.

Maybe instead of decorating the comment, it makes sense to decorate
(and improve, while at it) the menu? Something along these lines:

#-
# Foo
#

CONFIG_FOO=y

# Comment.

# CONFIG_BAR is not defined

#
# Foo
#-

I also don't think a command is likely to confused with disabled option.
Ariel Marcovitch Dec. 14, 2021, 8:27 a.m. UTC | #2
On 13/12/2021 13:47, Boris Kolpackov wrote:
> Ariel Marcovitch <arielmarcovitch@gmail.com> writes:
>
>> The format for comment blocks in the second patch is a suggestion. I
>> realize some people will think the '###' prefix is distasteful. I'm open
>> to other options as well, I just couldn't think of a better option that
>> starts with '#', looks different from a menu and can't be confused with
>> a disabled config.
> Maybe instead of decorating the comment, it makes sense to decorate
> (and improve, while at it) the menu? Something along these lines:
>
> #-
> # Foo
> #
>
> CONFIG_FOO=y
>
> # Comment.
>
> # CONFIG_BAR is not defined
>
> #
> # Foo
> #-
>
> I also don't think a command is likely to confused with disabled option.

I mean that a comment like this - "CONFIG_FOO is not defined" will be 
considered by kconfig as a config, rather than a comment. Apart from 
this theoretical case which is not really likely to happen, making a 
comment only one line and similar to other lines that start with '#' 
really decreases the visibility of these comments.

As for the other suggestions, I think a bigger change will be even 
harder for people to accept, but I will leave it to the people to decide.

Thanks for the feedback!

- Ariel Marcovitch
Ariel Marcovitch Jan. 15, 2022, 1:58 p.m. UTC | #3
Ping (would really like some feedback on this)

On 13/12/2021 12:00, Ariel Marcovitch wrote:
> Hi there!
>
> This series attempts to make the .config file format make more sense.
> Currently menuconfig blocks look exactly like regular configs while
> comment blocks look almost exactly like menu blocks.
>
> The first patch makes menuconfig blocks look the same as menu blocks.
>
> The second makes comment blocks look different than menu blocks.
>
> The format for comment blocks in the second patch is a suggestion. I
> realize some people will think the '###' prefix is distasteful. I'm open
> to other options as well, I just couldn't think of a better option that
> starts with '#', looks different from a menu and can't be confused with
> a disabled config.
>
> Ariel Marcovitch (2):
>    kconfig: Show menuconfigs as menus in the .config file
>    kconfig: Make comments look different than menus in .config
>
>   scripts/kconfig/confdata.c | 34 +++++++++++++++++++++++-----------
>   1 file changed, 23 insertions(+), 11 deletions(-)
>
>
> base-commit: e06a61a89ccd3edda046c78f9d08aa045b8c4d32
Ariel Marcovitch Jan. 15, 2022, 1:58 p.m. UTC | #4
Ping (would really like some feedback :) )

On 13/12/2021 12:00, Ariel Marcovitch wrote:
> Hi there!
>
> This series attempts to make the .config file format make more sense.
> Currently menuconfig blocks look exactly like regular configs while
> comment blocks look almost exactly like menu blocks.
>
> The first patch makes menuconfig blocks look the same as menu blocks.
>
> The second makes comment blocks look different than menu blocks.
>
> The format for comment blocks in the second patch is a suggestion. I
> realize some people will think the '###' prefix is distasteful. I'm open
> to other options as well, I just couldn't think of a better option that
> starts with '#', looks different from a menu and can't be confused with
> a disabled config.
>
> Ariel Marcovitch (2):
>    kconfig: Show menuconfigs as menus in the .config file
>    kconfig: Make comments look different than menus in .config
>
>   scripts/kconfig/confdata.c | 34 +++++++++++++++++++++++-----------
>   1 file changed, 23 insertions(+), 11 deletions(-)
>
>
> base-commit: e06a61a89ccd3edda046c78f9d08aa045b8c4d32