nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
301 stars 136 forks source link

Search in guiconfig broken due to missing Python import #176

Open stefanct opened 4 months ago

stefanct commented 4 months ago

The GUI of kconfig allows users to search in its database (e.g., via make guiconfig, ctrl+f) but in the MCUX SDK this is broken due to re missing. When search for any string nothing happens in the GUI but one can see this in the text output:

  File ".../scripts/kconfig/guiconfig.py", line 1867, in _update_jump_to_matches
    except re.error as e:
           ^^
NameError: name 're' is not defined

https://github.com/nxp-mcuxpresso/mcux-sdk/blob/acc105f1e6304bf3a16ebbb503f8882a4daa1408/scripts/kconfig/guiconfig.py#L1867

A simple import re at the top of the file fixes the issue. I have not checked how other projects have handled this.

FelixWang47831 commented 3 months ago

Hi @stefanct Thanks for your feedback. Actually I have found this issue before and created the ticket here: https://github.com/ulfalizer/Kconfiglib/issues/136. But I don't receive any feedback. I'll fix it in our repo later anyway.