Kconfiglib icon indicating copy to clipboard operation
Kconfiglib copied to clipboard

Boolean default not taken if written after help

Open DonBrus opened this issue 3 years ago • 0 comments

Hi,

I recently encountered an error when trying to setup a default value for boolean options, whenever I also include a help instruction within the menu.

The following works in setting the default value correctly

menu "General options"
	config Kconf_Options_Foo
		bool "This is the foo option"
		default y
endmenu

working-bool-default

This, in turn, does not work:

menu "General options"
	config Kconf_Options_Foo
		bool "This is the foo option"
                help "This setups foo, which causes baz"
		default y
endmenu

non-working-bool-default

Inverting default and help prevents parsing of KConfig file

menu "General options"
	config Kconf_Options_Foo
		bool "This is the foo option"
                default y
                help "This setups foo, which causes baz"
endmenu

produces

menuconfig.py: error: expected 'endmenu' at end of 'Kconfig'

I'm using the latest pip package (14.1.0). Is this expected behavior? Am I doing something wrong?

Btw I've seen issue #121 however it's not clear to me whether a takeover is already taking place or not; if so, I'd like to report this issue over to the new repo, if any exist.

Thanks!

DonBrus avatar Jan 13 '23 09:01 DonBrus