ulfalizer / Kconfiglib

A flexible Python 2/3 Kconfig implementation and library
ISC License
448 stars 160 forks source link

fix(menuconfig): allow choice override menuconfig #123

Closed MrKevinWeiss closed 1 year ago

MrKevinWeiss commented 1 year ago

Hi :wave:

I have encountered this issue when spending far too much time with kconfig and RIOT...

Handle special cases when having a choice override with a menuconfig.

This is a bit more complete solution to #94

The failure can be checked with: ```kconfig config PRE bool "Pre prompt" choice OVERRIDE_ME menuconfig PRE_MENUCONFIG bool "PRE_MENUCONFIG prompt" config PRE_CONFIG bool "PRE_CONFIG prompt" depends on PRE_MENUCONFIG endchoice menuconfig FOO bool "FOO prompt" if FOO config FOOPRE bool "FOOPRE prompt" choice OVERRIDE_ME bool "OVERRIDE_ME prompt" menuconfig DOES_NOT_CRASH_MENUCONFIG bool "DOES_NOT_CRASH_MENUCONFIG prompt" config DOES_NOT_CRASH_CONFIG bool "DOES_NOT_CRASH_CONFIG prompt" depends on DOES_NOT_CRASH_MENUCONFIG endchoice config FOOPOST bool "FOOPOST prompt" endif choice OVERRIDE_ME menuconfig POST_MENUCONFIG bool "POST_MENUCONFIG prompt" config POST_CONFIG bool "POST_CONFIG prompt" depends on POST_MENUCONFIG endchoice config POST bool "POST prompt" ```

Here is the failure and solution in action... Peek 2023-01-03 12-42