Skip to content

arch/risc-v/src/eic7700x/Kconfig: fix broken kconfig-frontends parsing - #20092

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
michallenc:eic7700x-kconfig-fix
Sep 9, 2026
Merged

arch/risc-v/src/eic7700x/Kconfig: fix broken kconfig-frontends parsing#20092
xiaoxiang781216 merged 1 commit into
apache:masterfrom
michallenc:eic7700x-kconfig-fix

Conversation

@michallenc

@michallenc michallenc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

kconfig-frontends package needs newline at the end of Kconfig file, otherwise the parsing fails.

Impact

Fixes broken NuttX build for any board if kconfig-frontends is used introduced in 1686bb6

Testing

./tools/configure.sh samv71-xult:nsh results with prior to the change:

arch/risc-v/src/eic7700x/Kconfig:50: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/risc-v/Kconfig:956: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/risc-v/Kconfig:961: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
arch/Kconfig:257: 'endif' in different file than 'if'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'if'
Kconfig:2996: 'endmenu' in different file than 'menu'
arch/risc-v/src/eic7700x/Kconfig:39: location of the 'menu'
make: *** [tools/Unix.mk:756: olddefconfig] Error 1
ERROR: failed to refresh

It configures and builds fine after the fix.

kconfig-frontends package needs newline at the end of Kconfig file,
otherwise the parsing fails.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
@michallenc
michallenc requested a review from lupyuen as a code owner September 8, 2026 14:01
@michallenc

Copy link
Copy Markdown
Contributor Author

We should check this in CI somewhere, this is the second exactly same issue in relatively short time (see #19142). kconfiglib doesn't have the issue, so standard CI build can't discover this and it's obviously hard to notice for developers that don't use kconfig-frontends.

@michallenc

Copy link
Copy Markdown
Contributor Author

We should check this in CI somewhere, this is the second exactly same issue in relatively short time (see #19142). kconfiglib doesn't have the issue, so standard CI build can't discover this and it's obviously hard to notice for developers that don't use kconfig-frontends.

We can add insert_final_newline = true to Kconfig section in .editoconfig file and then use editorconfig-checker in CI to check it.

@@ -18,9 +18,10 @@ indent_brace_style = GNU
 indent_style = tab
 [Make.defs]
 indent_style = tab
 [Kconfig]
 indent_style = tab
+insert_final_newline = true
 
 [*.sh]
 indent_style = tab
 max_line_length = 80

Anyone experienced with how to add new linter to NuttX CI?

@github-actions github-actions Bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small labels Sep 8, 2026
@acassis

acassis commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

We should check this in CI somewhere, this is the second exactly same issue in relatively short time (see #19142). kconfiglib doesn't have the issue, so standard CI build can't discover this and it's obviously hard to notice for developers that don't use kconfig-frontends.

We can add insert_final_newline = true to Kconfig section in .editoconfig file and then use editorconfig-checker in CI to check it.

@@ -18,9 +18,10 @@ indent_brace_style = GNU
 indent_style = tab
 [Make.defs]
 indent_style = tab
 [Kconfig]
 indent_style = tab
+insert_final_newline = true
 
 [*.sh]
 indent_style = tab
 max_line_length = 80

Anyone experienced with how to add new linter to NuttX CI?

I think we need to test if this .editconfig will work with default kconfig-frontend and kconfig-lib (since we support both). Hey @simbit18 do you have some suggestions here?

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216
xiaoxiang781216 merged commit 48c75c5 into apache:master Sep 9, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants