Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist/tools/kconfiglib: add configuration evaluation function #18192

Conversation

leandrolanzieri
Copy link
Contributor

Contribution description

This removes the existing hack, in which we wrote the configuration to /dev/null to trigger its evaluation. Instead a function for this specific purpose is added. Besides being cleaner, it avoids issues like the one reported at https://forum.riot-os.org/t/kconfig-issues-in-riot/3646.

Testing procedure

  • To verify that configuration issues are still being caught, you can apply an invalid one like the following in the kconfig test app, and run make:
diff --git a/tests/kconfig/Kconfig b/tests/kconfig/Kconfig
index c18dffdd8f..cbfec4b519 100644
--- a/tests/kconfig/Kconfig
+++ b/tests/kconfig/Kconfig
@@ -20,3 +20,8 @@ config APP_MSG_2
         Activate printing the second message
 
 endmenu # Application
+
+config FOO_VALUE
+    int "Foo"
+    range 1 3
+    default 4
  • Green CI

Issues/PRs references

Forum post https://forum.riot-os.org/t/kconfig-issues-in-riot/3646

This removes the existing hack, in which we wrote the configuration to
/dev/null to trigger its evaluation. Instead a function for this
specific purpose is added.
@leandrolanzieri leandrolanzieri added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jun 10, 2022
@github-actions github-actions bot added Area: Kconfig Area: Kconfig integration Area: tools Area: Supplementary tools labels Jun 10, 2022
@leandrolanzieri leandrolanzieri added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 10, 2022
Copy link
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, even though it is using a private function the kconfig library seems stable enough...

@MrKevinWeiss MrKevinWeiss merged commit 22977ea into RIOT-OS:master Jun 13, 2022
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Kconfig Area: Kconfig integration Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants